Skip to content
Browse files

issue 11 add a confirmation page

  • Loading branch information...
1 parent a4f9ae7 commit 87868cf340f4360a424668bebfe477968ab7adf3 jonathan committed Feb 28, 2011
Showing with 28 additions and 2 deletions.
  1. +10 −2 main.py
  2. +18 −0 templates/confirmation.html
View
12 main.py
@@ -429,7 +429,9 @@ def post(self):
notify_owner_confirmation(event)
notify_new_event(event)
set_cookie(self.response.headers, 'formvalues', None)
- self.redirect('/event/%s-%s' % (event.key().id(), slugify(event.name)))
+ #self.redirect('/event/%s-%s' % (event.key().id(), slugify(event.name)))
+ self.redirect('/confirm/%s-%s' % (event.key().id(), slugify(event.name)))
+
except Exception, e:
message = str(e)
if 'match format' in message:
@@ -442,7 +444,12 @@ def post(self):
#self.redirect('/new')
error = message
self.response.out.write(template.render('templates/error.html', locals()))
-
+
+class ConfirmationHandler(webapp.RequestHandler):
+ def get(self, id):
+ event = Event.get_by_id(int(id))
+ self.response.out.write(template.render('templates/confirmation.html', locals()))
+
class LogsHandler(webapp.RequestHandler):
@util.login_required
def get(self):
@@ -494,6 +501,7 @@ def main():
('/cronbugowners', CronBugOwnersHandler),
('/myevents', MyEventsHandler),
('/new', NewHandler),
+ ('/confirm/(\d+).*', ConfirmationHandler),
('/edit/(\d+).*', EditHandler),
# single event views
('/event/(\d+).*', EventHandler),
View
18 templates/confirmation.html
@@ -0,0 +1,18 @@
+{% extends 'base.html' %}
+{% block content %}
+
+<div id="primary">
+
+<h3>Thank you for registering an event at Hacker Dojo!</h3>
+
+
+<h1>{{event.name}}</h1>
+
+<div class='b-block'><div class='b-label'>Date:</div><div class='b-data'>{{event.start_time|date:"l, F j Y"}}</div></div>
+<div class='b-block'><div class='b-label'>Time:</div><div class='b-data'>{{event.start_time|date:"g:iA"|lower}} to {{event.end_time|date:"g:iA"|lower}}</div></div>
+
+
+
+</div>
+
+{% endblock %}

0 comments on commit 87868cf

Please sign in to comment.
Something went wrong with that request. Please try again.