summaryrefslogtreecommitdiff
path: root/yaksh/forms.py
diff options
context:
space:
mode:
authoradityacp2016-04-13 19:26:01 +0530
committeradityacp2016-04-15 15:11:01 +0530
commit351203587422455d803a2b92296cb8e7a8ba59a9 (patch)
tree91cf2065deb97e0dce72911dba451eebe7d953fa /yaksh/forms.py
parentead5d6db868a95916ebbb4e81003d42bdec2c871 (diff)
downloadonline_test-351203587422455d803a2b92296cb8e7a8ba59a9.tar.gz
online_test-351203587422455d803a2b92296cb8e7a8ba59a9.tar.bz2
online_test-351203587422455d803a2b92296cb8e7a8ba59a9.zip
changes in forms and views
Diffstat (limited to 'yaksh/forms.py')
-rw-r--r--yaksh/forms.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/yaksh/forms.py b/yaksh/forms.py
index 54eb21f..8cd18a2 100644
--- a/yaksh/forms.py
+++ b/yaksh/forms.py
@@ -198,16 +198,6 @@ class EditProfile(forms.ModelForm):
last_name = forms.CharField(max_length=30)
def __init__(self, user, *args, **kwargs):
- initial = ''
- if 'instance' in kwargs:
- initial = kwargs["instance"]
- if 'user' in kwargs:
- user = kwargs["user"]
- del kwargs["user"]
super(EditProfile, self).__init__(*args, **kwargs)
self.fields['first_name'].initial = user.first_name
self.fields['last_name'].initial = user.last_name
- self.fields['roll_number'].initial = user.profile.roll_number
- self.fields['department'].initial = user.profile.department
- self.fields['institute'].initial = user.profile.institute
- self.fields['position'].initial = user.profile.position