summaryrefslogtreecommitdiff
path: root/yaksh/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/forms.py')
-rw-r--r--yaksh/forms.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/yaksh/forms.py b/yaksh/forms.py
index 271b503..681eca0 100644
--- a/yaksh/forms.py
+++ b/yaksh/forms.py
@@ -187,12 +187,13 @@ class CourseForm(forms.ModelForm):
model = Course
fields = ['name', 'active', 'enrollment']
-class EditProfile(forms.ModelForm):
- """ edit profile form for students and moderators """
+class ProfileForm(forms.ModelForm):
+ """ profile form for students and moderators """
class Meta:
model = Profile
- fields = ['first_name', 'last_name', 'institute', 'department', 'roll_number', 'position']
+ fields = ['first_name', 'last_name', 'institute',
+ 'department', 'roll_number', 'position']
first_name = forms.CharField(max_length=30)
last_name = forms.CharField(max_length=30)
@@ -200,6 +201,6 @@ class EditProfile(forms.ModelForm):
def __init__(self, *args, **kwargs):
if 'user' in kwargs:
user = kwargs.pop('user')
- super(EditProfile, self).__init__(*args, **kwargs)
+ super(ProfileForm, self).__init__(*args, **kwargs)
self.fields['first_name'].initial = user.first_name
self.fields['last_name'].initial = user.last_name