added mail template callback functions
This commit is contained in:
parent
89fce872f3
commit
a05205289f
12
frontend.py
12
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/<city>')
|
||||
@view('template/mail.tpl')
|
||||
def display_mail_page(city, user):
|
||||
return user.state()
|
||||
|
||||
|
||||
@post('/city/mail/submit/<city>')
|
||||
def subscribe_mail(user, city):
|
||||
email = request.forms['mailaddress']
|
||||
redirect('/city/' + city)
|
||||
|
||||
|
||||
@get('/settings')
|
||||
@view('template/settings.tpl')
|
||||
def settings(user):
|
||||
|
|
|
@ -6,7 +6,7 @@ import markdown as md
|
|||
html = md.markdown(markdown)
|
||||
%>
|
||||
|
||||
<form action="/city/mail/<% print(city) %>" method="post">
|
||||
<form action="/city/mail/submit/<% print(city) %>" method="post">
|
||||
<input type="text" name="mailaddress" placeholder="E-Mail address" id="mailaddress">
|
||||
<input name='confirm' value='Subscribe to E-Mail notifications' type='submit'/>
|
||||
</form>
|
||||
|
|
Loading…
Reference in a new issue