Fait de la merde sur app.py...
This commit is contained in:
parent
4c550380b6
commit
c4986d6aef
19
app.py
19
app.py
@ -4,11 +4,14 @@ import pages
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
@app.route('/home')
|
||||
@app.route('/home/')
|
||||
@app.route('/', methods=['GET', 'POST'])
|
||||
@app.route('/home', methods=['GET', 'POST'])
|
||||
@app.route('/home/', methods=['GET', 'POST'])
|
||||
def main():
|
||||
return pages.main()
|
||||
if request.method == 'GET':
|
||||
print(request)
|
||||
else:
|
||||
return pages.main()
|
||||
|
||||
@app.route('/sauveteurs/<int:idsauveteur>')
|
||||
def sauveteur(idsauveteur):
|
||||
@ -19,5 +22,13 @@ def error(e):
|
||||
return pages.error()
|
||||
|
||||
|
||||
@app.route('/login', methods=['GET', 'POST'])
|
||||
def login():
|
||||
if request.method == 'POST':
|
||||
return do_the_login()
|
||||
else:
|
||||
return show_the_login_form()
|
||||
|
||||
|
||||
if __name__=="__main__":
|
||||
app.run(debug=True)
|
||||
|
@ -1,11 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link href="/static/style.css" rel="stylesheet" type="text/css" />
|
||||
<meta charset="utf-8">
|
||||
<title>404 Not Found - Sauveuteurs du dunkerquois</title>
|
||||
<link href="../static/style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Erreur !</h1>
|
||||
<p>Retour à <a href="/home">la page d'accueil</a></p>
|
||||
<header id="banner">
|
||||
<img src="../static/icon.png" width="150" height="75">
|
||||
<span id="logo_title">Sauveuteurs du dunkerquois</span>
|
||||
</header>
|
||||
<h1>Page introuvable !</h1>
|
||||
<p>Retour à <a href="/home">la page d'accueil</a>.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
19
templates/search.html
Normal file
19
templates/search.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{nom}} {{prenom}} - Sauveuteurs du dunkerquois</title>
|
||||
<link href="../static/style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<header id="banner">
|
||||
<img src="../static/icon.png" width="150" height="75">
|
||||
<span id="logo_title">Sauveuteurs du dunkerquois</span>
|
||||
</header>
|
||||
<br>
|
||||
<form class="searchbar" method=get>
|
||||
<input type="text" placeholder="Saisissez votre recherche..." size=20>
|
||||
<input type="submit" value="Rechercher">
|
||||
</form>
|
||||
<table
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user