diff --git a/frontend.py b/frontend.py index 969bea6..d53bd28 100755 --- a/frontend.py +++ b/frontend.py @@ -87,6 +87,18 @@ def city_page(city): return dict(info='There is no Ticketfrei bot in your city yet. Create one yourself!') +@get('/city/mail/') +@view('template/mail.tpl') +def display_mail_page(city, user): + return user.state() + + +@post('/city/mail/submit/') +def subscribe_mail(user, city): + email = request.forms['mailaddress'] + redirect('/city/' + city) + + @get('/settings') @view('template/settings.tpl') def settings(user): diff --git a/template/mail.tpl b/template/mail.tpl index 2813e17..2b16981 100644 --- a/template/mail.tpl +++ b/template/mail.tpl @@ -6,7 +6,7 @@ import markdown as md html = md.markdown(markdown) %> -
+