# HG changeset patch # User nishanth # Date 1279118739 -19800 # Node ID 1f0be76a18fc319d683da299fe61e6bc46f19173 # Parent 7007ec492eac1a74b52ce4138e1a160d0af01d4e added a view for sending confirmation for workshop diff -r 7007ec492eac -r 1f0be76a18fc sdi/site/urls.py --- a/sdi/site/urls.py Wed Jul 14 18:27:17 2010 +0530 +++ b/sdi/site/urls.py Wed Jul 14 20:15:39 2010 +0530 @@ -1,6 +1,7 @@ from django.conf.urls.defaults import * from sage_days.sdi.views import register, reg_complete, list_stats, homepage, send_invi, admin_login, admin_logout +from sage_days.sdi.views import send_workshop_confirm urlpatterns = patterns('', (r'^register/$', register), @@ -9,5 +10,6 @@ (r'^send_invi/$', send_invi), (r'^login/$', admin_login), (r'^logout/$', admin_logout), + (r'^send_wsp_cnf/$', send_workshop_confirm), ) diff -r 7007ec492eac -r 1f0be76a18fc sdi/views.py --- a/sdi/views.py Wed Jul 14 18:27:17 2010 +0530 +++ b/sdi/views.py Wed Jul 14 20:15:39 2010 +0530 @@ -107,6 +107,18 @@ form = EmailForm() return render_to_response("send_invi.html", {"form":form}) +@login_required +def send_workshop_confirm(request): + """ Show a list of all the ppl who requested for a workshop and + send a confirmation mail to them if not sent. + """ + + matches = Registrant.objects.filter(need_for_python_workshop=True, registrantinfo__status_of_attending_workshop="0") + if request.method == "POST": + pass + else: + return render_to_response("send_workshop_confirm.html", {"matches":matches}) + def admin_login(request): """ basic login. """ diff -r 7007ec492eac -r 1f0be76a18fc templates/send_workshop_confirm.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/send_workshop_confirm.html Wed Jul 14 20:15:39 2010 +0530 @@ -0,0 +1,9 @@ +{% extends 'base.html' %} +{% block title %} +Workshop Confirmaton Mail +{% endblock %} +{% block content %} +{% for user in matches %} +user +{% endfor %} +{% endblock %}