diff options
author | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2013-09-04 16:16:30 +0000 |
---|---|---|
committer | pad <pad@vm-pad-b.spline.inf.fu-berlin.de> | 2013-09-04 16:16:30 +0000 |
commit | 9442c09eebcd0f67f6f15a1a919504c7678b7ce8 (patch) | |
tree | dae9f27328c84022c31697058171a387574e81ba | |
parent | ad1c6e8417a0200268aa415b13a5adab58f9f5ad (diff) | |
download | padlite-teams-9442c09eebcd0f67f6f15a1a919504c7678b7ce8.tar.gz padlite-teams-9442c09eebcd0f67f6f15a1a919504c7678b7ce8.tar.bz2 padlite-teams-9442c09eebcd0f67f6f15a1a919504c7678b7ce8.zip |
forms: group name should not start with special character
The route /<group_name>/ is used for displaying the group infos. If you
want to support additional sites (like all public browsable groups),
you need a possibility to recognize such urls. So the group name now
has to start with a non special characters. So we could support paths
like /_all/ for special pages.
-rw-r--r-- | forms.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -7,6 +7,8 @@ class CreateGroup(Form): validators.Required(), validators.Regexp('^[a-zA-Z1-9_-]+$', message=u'Invalid group name (only simple characters, numbers, - and _).'), + validators.Regexp('^[a-zA-Z1-9]', + message=u'Group name should not start with a special character.'), Unique(Group, Group.name, message=u'A group with this name already exists.')]) |