From 3d49dc17e96fa2726c60942a44d8571d353542d4 Mon Sep 17 00:00:00 2001 From: adityacp Date: Fri, 22 Apr 2016 11:30:02 +0530 Subject: profile form name changes --- yaksh/forms.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'yaksh/forms.py') 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 -- cgit