Keywords are not required to have a definition
authorCharles Connell <charles@connells.org>
Sun, 11 May 2014 04:04:12 +0000 (00:04 -0400)
committerCharles Connell <charles@connells.org>
Sun, 11 May 2014 04:04:12 +0000 (00:04 -0400)
karmaworld/apps/quizzes/forms.py

index 0708b3bb5f26e95f7cf7b5475fa02e244e95f1db..47de948b7787b5c1b8eae4464dd14e2757a5a484 100644 (file)
@@ -5,7 +5,9 @@ from django.forms import TextInput, Textarea, HiddenInput, Form, CharField, Inte
 
 
 class KeywordForm(Form):
-    keyword = CharField(widget=TextInput(attrs={'placeholder': 'Keyword', 'class': 'keyword'}))
-    definition = CharField(widget=Textarea(attrs={'placeholder': 'Definition', 'class': 'definition'}))
+    keyword = CharField(widget=TextInput(attrs={'placeholder': 'Keyword', 'class': 'keyword'}),
+                        required=True)
+    definition = CharField(widget=Textarea(attrs={'placeholder': 'Definition', 'class': 'definition'}),
+                           required=False)
     id = IntegerField(widget=HiddenInput(attrs={'class': 'object-id'}), required=False)