equal
deleted
inserted
replaced
3 from django.contrib.auth.decorators import login_required |
3 from django.contrib.auth.decorators import login_required |
4 |
4 |
5 from django.contrib.auth import authenticate, login, logout |
5 from django.contrib.auth import authenticate, login, logout |
6 |
6 |
7 from sage_days.sdi.models import Registrant |
7 from sage_days.sdi.models import Registrant |
8 from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm |
8 from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm, LoginForm, UserSelectForm |
9 from sage_days.sdi.events import send_reg_complete_mail, mail_invi |
9 from sage_days.sdi.events import send_reg_complete_mail, mail_invi |
10 from sage_days.settings import APACHE_URL_PREFIX as aup |
10 from sage_days.settings import APACHE_URL_PREFIX as aup |
11 |
11 |
12 def register(request): |
12 def register(request): |
13 """ The user register page. |
13 """ The user register page. |
105 return render_to_response("send_invi.html", {"form":form}) |
105 return render_to_response("send_invi.html", {"form":form}) |
106 else: |
106 else: |
107 form = EmailForm() |
107 form = EmailForm() |
108 return render_to_response("send_invi.html", {"form":form}) |
108 return render_to_response("send_invi.html", {"form":form}) |
109 |
109 |
|
110 @login_required |
|
111 def send_workshop_confirm(request): |
|
112 """ Show a list of all the ppl who requested for a workshop and |
|
113 send a confirmation mail to them if not sent. |
|
114 """ |
|
115 |
|
116 matches = Registrant.objects.filter(need_for_python_workshop=True, registrantinfo__status_of_attending_workshop="1") |
|
117 if request.method == "POST": |
|
118 pass |
|
119 else: |
|
120 form = UserSelectForm(matches) |
|
121 return render_to_response("send_workshop_confirm.html", {"form":form}) |
|
122 |
110 def admin_login(request): |
123 def admin_login(request): |
111 """ basic login. |
124 """ basic login. |
112 """ |
125 """ |
113 |
126 |
114 redirect_url = "/%s/registration/stats"%aup |
127 redirect_url = "/%s/registration/stats"%aup |