summaryrefslogtreecommitdiff
path: root/workshop_app/forms.py
diff options
context:
space:
mode:
authorpnshiralkar2020-05-04 13:44:48 +0530
committerpnshiralkar2020-05-04 13:44:48 +0530
commit477c4cd6057a97cb401c2d3227febf2b40533ff6 (patch)
tree1d93bb252b1cdf5aed7dcaa4c24dc7b0da9e201d /workshop_app/forms.py
parent473343cb64a7e85f0f020b3c1fdf3fc8f8dbd64c (diff)
downloadworkshop_booking-477c4cd6057a97cb401c2d3227febf2b40533ff6.tar.gz
workshop_booking-477c4cd6057a97cb401c2d3227febf2b40533ff6.tar.bz2
workshop_booking-477c4cd6057a97cb401c2d3227febf2b40533ff6.zip
Done minor code refractors
Diffstat (limited to 'workshop_app/forms.py')
-rw-r--r--workshop_app/forms.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/workshop_app/forms.py b/workshop_app/forms.py
index 7c799d7..334bd4e 100644
--- a/workshop_app/forms.py
+++ b/workshop_app/forms.py
@@ -91,7 +91,6 @@ class UserRegistrationForm(forms.Form):
new_profile = Profile(user=new_user)
new_profile.institute = cleaned_data["institute"]
new_profile.department = cleaned_data["department"]
- # new_profile.position = cleaned_data["position"]
new_profile.phone_number = cleaned_data["phone_number"]
new_profile.location = cleaned_data["location"]
new_profile.title = cleaned_data["title"]
@@ -100,8 +99,7 @@ class UserRegistrationForm(forms.Form):
new_profile.activation_key = generate_activation_key(new_user.username)
new_profile.key_expiry_time = timezone.now() + timezone.timedelta(days=1)
new_profile.save()
- key = Profile.objects.get(user=new_user).activation_key
- return u_name, pwd, key
+ return u_name, pwd, new_profile.activation_key
class UserLoginForm(forms.Form):
@@ -144,7 +142,6 @@ class ProfileForm(forms.ModelForm):
self.fields['last_name'].initial = user.last_name
-# debug : Changed this
class WorkshopForm(forms.ModelForm):
"""
Coordinators will propose a workshop and date