summaryrefslogtreecommitdiff
path: root/yaksh/forms.py
diff options
context:
space:
mode:
authoradityacp2016-04-15 18:47:01 +0530
committeradityacp2016-04-15 18:47:01 +0530
commit09e77a6065f019fe9b9d00fbedce2c11188e4589 (patch)
tree209a6b0f3deede63677a77b586179d6d355a2c6e /yaksh/forms.py
parent351203587422455d803a2b92296cb8e7a8ba59a9 (diff)
downloadonline_test-09e77a6065f019fe9b9d00fbedce2c11188e4589.tar.gz
online_test-09e77a6065f019fe9b9d00fbedce2c11188e4589.tar.bz2
online_test-09e77a6065f019fe9b9d00fbedce2c11188e4589.zip
changes after rebase
Diffstat (limited to 'yaksh/forms.py')
-rw-r--r--yaksh/forms.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yaksh/forms.py b/yaksh/forms.py
index 8cd18a2..271b503 100644
--- a/yaksh/forms.py
+++ b/yaksh/forms.py
@@ -197,7 +197,9 @@ class EditProfile(forms.ModelForm):
first_name = forms.CharField(max_length=30)
last_name = forms.CharField(max_length=30)
- def __init__(self, user, *args, **kwargs):
+ def __init__(self, *args, **kwargs):
+ if 'user' in kwargs:
+ user = kwargs.pop('user')
super(EditProfile, self).__init__(*args, **kwargs)
self.fields['first_name'].initial = user.first_name
self.fields['last_name'].initial = user.last_name