diff options
Diffstat (limited to 'yaksh/forms.py')
-rw-r--r-- | yaksh/forms.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/yaksh/forms.py b/yaksh/forms.py index e66c898..819bb49 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -1,7 +1,7 @@ from django import forms from yaksh.models import ( get_model_class, Profile, Quiz, Question, Course, QuestionPaper, Lesson, - LearningModule, TestCase, languages, question_types, Thread, Comment + LearningModule, TestCase, languages, question_types, Post, Comment ) from grades.models import GradingSystem from django.contrib.auth import authenticate @@ -32,7 +32,7 @@ test_case_types = ( ) status_types = ( - ('select','Select Status'), + ('select', 'Select Status'), ('active', 'Active'), ('closed', 'Inactive'), ) @@ -369,7 +369,7 @@ class SearchFilterForm(forms.Form): search_tags = forms.CharField( label='Search Tags', widget=forms.TextInput(attrs={'placeholder': 'Search', - 'class': form_input_class,}), + 'class': form_input_class, }), required=False ) search_status = forms.CharField(max_length=16, widget=forms.Select( @@ -554,23 +554,23 @@ class TestcaseForm(forms.ModelForm): fields = ["type"] -class ThreadForm(forms.ModelForm): +class PostForm(forms.ModelForm): class Meta: - model = Thread + model = Post fields = ["title", "description", "image"] widgets = { 'title': forms.TextInput( - attrs = { + attrs={ 'class': 'form-control' } ), 'description': forms.Textarea( - attrs = { + attrs={ 'class': 'form-control' } ), 'image': forms.FileInput( - attrs = { + attrs={ 'class': 'form-control-file' } ) @@ -583,12 +583,12 @@ class CommentForm(forms.ModelForm): fields = ["description", "image"] widgets = { 'description': forms.Textarea( - attrs = { + attrs={ 'class': 'form-control' } ), 'image': forms.FileInput( - attrs = { + attrs={ 'class': 'form-control-file' } ) |