fix document create form validation
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Thu, 12 Aug 2010 14:19:39 +0000 (16:19 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Thu, 12 Aug 2010 14:19:39 +0000 (16:19 +0200)
apps/wiki/forms.py

index 0a5be8c..e48c5ea 100644 (file)
@@ -23,7 +23,7 @@ class DocumentCreateForm(forms.Form):
         Form used for creating new documents.
     """
     title = forms.CharField()
-    id = forms.RegexField(regex=ur"\w+")
+    id = forms.RegexField(regex=ur"^[\wąćęłńóśźżĄĆĘŁŃÓŚŹŻ]+$")
     file = forms.FileField(required=False)
     text = forms.CharField(required=False, widget=forms.Textarea)