]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/forms/qanda.py
Adding full width and site width banner placeholders. Might be useful while creating...
[osqa.git] / forum / forms / qanda.py
index 672ffd8683d41a7c41b1f3f2889e26afb75d2eba..b499cbdebdd8e4f1f80c0722134838870efa740f 100644 (file)
@@ -42,7 +42,7 @@ class QuestionEditorField(EditorField):
 
 
     def clean(self, value):
-        if self.required and (len(re.sub('[ ]{2,}', ' ', value)) < settings.FORM_MIN_QUESTION_BODY):
+        if not bool(settings.FORM_EMPTY_QUESTION_BODY) and (len(re.sub('[ ]{2,}', ' ', value)) < settings.FORM_MIN_QUESTION_BODY):
             raise forms.ValidationError(_('question content must be at least %s characters') % settings.FORM_MIN_QUESTION_BODY)
 
         return value
@@ -168,8 +168,8 @@ class AnswerForm(forms.Form):
         if settings.WIKI_ON:
             self.fields['wiki'] = WikiField()
 
-            if question.nis.wiki:
-                self.fields['wiki'].initial = True
+            #if question.nis.wiki:
+            #    self.fields['wiki'].initial = True
 
 
 class RetagQuestionForm(forms.Form):