forked from fossgect/HACKTOBER-FIESTA21
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
33 lines (23 loc) · 729 Bytes
/
app.py
File metadata and controls
33 lines (23 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from flask import Flask, render_template, url_for
import os
app = Flask(__name__)
@app.route('/')
def home():
return render_template('main/index.html')
@app.route('/&namelist')
def namelist_not_allowed():
return render_template('main/404.html', content="Page")
@app.route('/participants')
def participants():
return render_template('main/all-participants.html')
@app.route('/<name>')
def card(name):
try:
return render_template('%s.html' %name)
except Exception as e:
return render_template('main/404.html', content="Template")
@app.errorhandler(404)
def page_not_found(e):
return render_template('main/404.html', content="Page")
if __name__ == '__main__':
app.run(debug=True)