equal
deleted
inserted
replaced
1 from django.shortcuts import render_to_response, redirect |
1 from django.shortcuts import render_to_response, redirect |
2 from django.http import HttpResponse |
2 from django.http import HttpResponse |
3 |
3 from django.contrib.auth.decorators import login_required |
4 |
4 |
5 from sage_days.sdi.models import Registrant |
5 from sage_days.sdi.models import Registrant |
6 from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm |
6 from sage_days.sdi.forms import RegisterForm, SearchForm, EmailForm |
7 from sage_days.sdi.events import send_reg_complete_mail, mail_invi |
7 from sage_days.sdi.events import send_reg_complete_mail, mail_invi |
8 |
8 |
32 """ Tell the registration is successful. |
32 """ Tell the registration is successful. |
33 """ |
33 """ |
34 |
34 |
35 return render_to_response("reg_complete.html") |
35 return render_to_response("reg_complete.html") |
36 |
36 |
|
37 @login_required |
37 def list_stats(request): |
38 def list_stats(request): |
38 """ List the statiscs of registered participants. |
39 """ List the statiscs of registered participants. |
39 """ |
40 """ |
40 |
41 |
41 if request.method == "POST": |
42 if request.method == "POST": |
79 return render_to_response("list_stats.html", {"form":form}) |
80 return render_to_response("list_stats.html", {"form":form}) |
80 else: |
81 else: |
81 form = SearchForm() |
82 form = SearchForm() |
82 return render_to_response("list_stats.html", {"form":form}) |
83 return render_to_response("list_stats.html", {"form":form}) |
83 |
84 |
|
85 @login_required |
84 def send_invi(request): |
86 def send_invi(request): |
85 """ Take a list of csv email addresses and send mails to them. |
87 """ Take a list of csv email addresses and send mails to them. |
86 """ |
88 """ |
87 |
89 |
88 if request.method == "POST": |
90 if request.method == "POST": |