author | Madhusudan.C.S <madhusudancs@gmail.com> |
Tue, 20 Jul 2010 19:27:16 +0530 | |
changeset 126 | f185cb8316cf |
parent 111 | 0e2c94c6a9e8 |
child 137 | ec6e58c639bf |
permissions | -rw-r--r-- |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
1 |
import cStringIO as StringIO |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
2 |
import csv |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
3 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
4 |
from django.shortcuts import render_to_response |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
5 |
from django.template.loader import render_to_string |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
6 |
from django.shortcuts import get_object_or_404 |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
7 |
from django.template import RequestContext |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
8 |
from django.core.urlresolvers import reverse |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
9 |
from django.http import HttpResponse |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
10 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
11 |
from django.contrib.auth.decorators import login_required |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
12 |
from django.contrib.auth.forms import AuthenticationForm |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
13 |
from django.contrib.auth.models import User |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
14 |
from django.core.exceptions import ObjectDoesNotExist |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
15 |
|
96
178b89a3ca4f
Removed unwanted files and made more changes to make SciPyCon a clean app.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
16 |
from project.scipycon.utils import set_message_cookie |
178b89a3ca4f
Removed unwanted files and made more changes to make SciPyCon a clean app.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
17 |
from project.scipycon.user.models import UserProfile |
178b89a3ca4f
Removed unwanted files and made more changes to make SciPyCon a clean app.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
18 |
from project.scipycon.user.utils import scipycon_createregistrant |
178b89a3ca4f
Removed unwanted files and made more changes to make SciPyCon a clean app.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
19 |
from project.scipycon.user.forms import RegistrantForm |
178b89a3ca4f
Removed unwanted files and made more changes to make SciPyCon a clean app.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
20 |
from project.scipycon.talk.models import Talk |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
21 |
|
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
22 |
from project.scipycon.registration.models import Registration |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
23 |
from project.scipycon.registration.forms import RegistrationSubmitForm |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
24 |
from project.scipycon.registration.forms import RegistrationEditForm |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
25 |
from project.scipycon.registration.forms import RegistrationAdminSelectForm |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
26 |
from project.scipycon.registration.forms import WifiForm |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
27 |
from project.scipycon.registration.utils import send_confirmation |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
28 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
29 |
from .forms import IC |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
30 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
31 |
REG_TOTAL = 1000 |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
32 |
|
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
33 |
|
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
34 |
def registrations(request, scope, |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
35 |
template_name='registration/registrations.html'): |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
36 |
"""Simple page to count registrations""" |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
37 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
38 |
registrations = Registration.objects.all().count() |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
39 |
return render_to_response(template_name, RequestContext(request, { |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
40 |
'params': {'scope': scope}, |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
41 |
'over_reg' : registrations >= REG_TOTAL and True or False, |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
42 |
'registrations' : registrations})) |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
43 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
44 |
@login_required |
111
0e2c94c6a9e8
Adjusted views to send the scope in params.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
106
diff
changeset
|
45 |
def edit_registration(request, scope, id, |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
46 |
template_name='registration/edit-registration.html'): |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
47 |
"""Allows users that submitted a registration to edit it. |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
48 |
""" |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
49 |
|
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
50 |
reg = Registration.objects.get(pk=id) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
51 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
52 |
if reg.registrant != request.user: |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
53 |
redirect_to = reverse('scipycon_account', kwargs={'scope': scope}) |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
54 |
|
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
55 |
return set_message_cookie( |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
56 |
redirect_to, |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
57 |
msg = u'Redirected because the registration you selected' \ |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
58 |
+ ' is not your own.') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
59 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
60 |
if request.method == 'POST': |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
61 |
form = RegistrationEditForm(data=request.POST) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
62 |
if form.is_valid(): |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
63 |
reg.organisation = form.data.get('organisation') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
64 |
reg.occupation = form.data.get('occupation') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
65 |
reg.city = form.data.get('city') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
66 |
reg.tshirt = form.data.get('tshirt') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
67 |
reg.allow_contact = form.data.get('allow_contact') and True or False |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
68 |
reg.conference = form.data.get('conference') and True or False |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
69 |
reg.tutorial = form.data.get('tutorial') and True or False |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
70 |
reg.sprint = form.data.get('sprint') and True or False |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
71 |
reg.save() |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
72 |
|
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
73 |
# Saved.. redirect |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
74 |
redirect_to = reverse('scipycon_account', kwargs={'scope': scope}) |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
75 |
|
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
76 |
return set_message_cookie(redirect_to, |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
77 |
msg = u'Your changes have been saved.') |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
78 |
else: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
79 |
form = RegistrationEditForm(initial={ |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
80 |
'id' : id, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
81 |
'organisation' : reg.organisation, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
82 |
'occupation' : reg.occupation, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
83 |
'city' : reg.city, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
84 |
'tshirt' : reg.tshirt, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
85 |
'conference': reg.conference, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
86 |
'tutorial': reg.tutorial, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
87 |
'postcode' : reg.postcode, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
88 |
'sprint' : reg.sprint, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
89 |
'allow_contact' : reg.allow_contact, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
90 |
}) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
91 |
|
111
0e2c94c6a9e8
Adjusted views to send the scope in params.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
106
diff
changeset
|
92 |
return render_to_response( |
0e2c94c6a9e8
Adjusted views to send the scope in params.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
106
diff
changeset
|
93 |
template_name, RequestContext(request, { |
0e2c94c6a9e8
Adjusted views to send the scope in params.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
106
diff
changeset
|
94 |
'params': {'scope': scope}})) |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
95 |
|
106
3a31881564ba
Add a scope pattern to the URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
96
diff
changeset
|
96 |
def submit_registration(request, scope, |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
97 |
template_name='registration/submit-registration.html'): |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
98 |
"""Allows user to edit registration |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
99 |
""" |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
100 |
|
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
101 |
user = request.user |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
102 |
reg_count = Registration.objects.all().count() |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
103 |
|
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
104 |
if user.is_authenticated(): |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
105 |
try: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
106 |
profile = user.get_profile() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
107 |
except: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
108 |
profile, new = UserProfile.objects.get_or_create(user=user) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
109 |
if new: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
110 |
profile.save() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
111 |
try: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
112 |
registration = Registration.objects.get(registrant=user) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
113 |
if registration: |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
114 |
redirect_to = reverse('scipycon_account', |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
115 |
kwargs={'scope': scope}) |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
116 |
return set_message_cookie( |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
117 |
redirect_to, msg = u'You have already been registered.') |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
118 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
119 |
except ObjectDoesNotExist: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
120 |
pass |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
121 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
122 |
message = None |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
123 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
124 |
if request.method == 'POST': |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
125 |
registration_form = RegistrationSubmitForm(data=request.POST) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
126 |
registrant_form = RegistrantForm(data=request.POST) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
127 |
wifi_form = WifiForm(data=request.POST) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
128 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
129 |
if request.POST.get('action', None) == 'login': |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
130 |
login_form = AuthenticationForm(data=request.POST) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
131 |
if login_form.is_valid(): |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
132 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
133 |
from django.contrib.auth import login |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
134 |
login(request, login_form.get_user()) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
135 |
|
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
136 |
redirect_to = reverse('scipycon_submit_registration', |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
137 |
kwargs={'scope': scope}) |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
138 |
return set_message_cookie(redirect_to, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
139 |
msg = u'You have been logged in please continue' + \ |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
140 |
'with registration.') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
141 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
142 |
newuser = None |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
143 |
passwd = None |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
144 |
if not user.is_authenticated(): |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
145 |
if registrant_form.is_valid(): |
96
178b89a3ca4f
Removed unwanted files and made more changes to make SciPyCon a clean app.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
146 |
newuser = scipycon_createregistrant(request, registrant_form.data) |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
147 |
# Log in user |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
148 |
passwd = User.objects.make_random_password() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
149 |
newuser.set_password(passwd) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
150 |
newuser.save() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
151 |
from django.contrib.auth import authenticate |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
152 |
user = authenticate(username=newuser.username, password=passwd) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
153 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
154 |
login(request, user) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
155 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
156 |
newuser = user |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
157 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
158 |
else: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
159 |
newuser = user |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
160 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
161 |
if registration_form.is_valid() and newuser: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
162 |
allow_contact = registration_form.data.get('allow_contact') and \ |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
163 |
True or False |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
164 |
conference = registration_form.data.get('conference') and \ |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
165 |
True or False |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
166 |
tutorial = registration_form.data.get('tutorial') and \ |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
167 |
True or False |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
168 |
sprint = registration_form.data.get('sprint') and \ |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
169 |
True or False |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
170 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
171 |
registrant = User.objects.get(pk=newuser.id) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
172 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
173 |
presenter = None |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
174 |
talks = Talk.objects.filter( |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
175 |
speaker=registrant).filter(approved=True) |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
176 |
if talks: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
177 |
for talk in talks: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
178 |
if talk.duration == '30': |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
179 |
presenter = True |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
180 |
elif talk.duration == '60': |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
181 |
presenter = True |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
182 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
183 |
reg = Registration( |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
184 |
# slug = newuser.username, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
185 |
registrant = registrant, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
186 |
organisation = registration_form.data.get('organisation'), |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
187 |
occupation = registration_form.data.get('occupation'), |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
188 |
city = registration_form.data.get('city'), |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
189 |
tshirt = registration_form.data.get('tshirt'), |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
190 |
postcode = registration_form.cleaned_data.get('postcode'), |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
191 |
allow_contact = allow_contact, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
192 |
conference = conference, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
193 |
tutorial = tutorial, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
194 |
sprint = sprint) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
195 |
reg.save() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
196 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
197 |
# get id and use as slug and invoice number |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
198 |
id = reg.id |
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
199 |
slug = 'SPYIN10%03d' % id |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
200 |
reg.slug = slug |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
201 |
reg.save() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
202 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
203 |
# additional tasks: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
204 |
if wifi_form.is_valid(): |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
205 |
wifi = wifi_form.save(registrant) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
206 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
207 |
# 1. include random password if we are a new user |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
208 |
if passwd: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
209 |
send_confirmation(registrant, slug, password=passwd) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
210 |
else: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
211 |
# 2. send user email with registration id |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
212 |
send_confirmation(registrant, slug) |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
213 |
|
126
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
214 |
redirect_to = reverse('scipycon_registrations', |
f185cb8316cf
Added scope to all URLs, all reverse functions and all view methods and removed unnecessary functions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
111
diff
changeset
|
215 |
kwargs={'scope': scope}) |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
216 |
return set_message_cookie(redirect_to, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
217 |
msg = u'Thank you, your registration has been submitted '\ |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
218 |
'and an email has been sent with payment details.') |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
219 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
220 |
else: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
221 |
registration_form = RegistrationSubmitForm() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
222 |
registrant_form = RegistrantForm() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
223 |
wifi_form = WifiForm() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
224 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
225 |
login_form = AuthenticationForm() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
226 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
227 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
228 |
return render_to_response(template_name, RequestContext(request, { |
111
0e2c94c6a9e8
Adjusted views to send the scope in params.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
106
diff
changeset
|
229 |
'params': {'scope': scope}, |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
230 |
'registration_form': registration_form, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
231 |
'registrant_form' : registrant_form, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
232 |
'over_reg' : reg_count >= REG_TOTAL and True or False, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
233 |
'wifi_form' : wifi_form, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
234 |
'message' : message, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
235 |
'login_form' : login_form |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
236 |
})) |