Compare commits

...

2 Commits

4 changed files with 45 additions and 9 deletions

21
app.py
View File

@ -4,12 +4,15 @@ 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>')
@app.route('/sauveteur/<int:idsauveteur>')
def sauveteur(idsauveteur):
@ -25,5 +28,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)

View File

@ -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>

View File

@ -14,7 +14,7 @@ description
<meta charset="utf-8">
<title>{{nom}} {{prenom}} - Sauveuteurs du dunkerquois</title>
<link href="../static/style.css" rel="stylesheet" type="text/css" />
</head>
</head>
<body>
<header id="banner">
<img src="../static/icon.png" width="150" height="75">

19
templates/search.html Normal file
View 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>