2021-12-02 19:05:44 +01:00
|
|
|
# Fichier principal
|
2021-12-02 19:41:51 +01:00
|
|
|
from flask import Flask, escape, request, url_for
|
2021-12-02 19:05:44 +01:00
|
|
|
import pages
|
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
|
|
@app.route('/')
|
2021-12-02 20:14:13 +01:00
|
|
|
@app.route('/home')
|
|
|
|
@app.route('/home/')
|
2021-12-02 19:05:44 +01:00
|
|
|
def main():
|
|
|
|
return pages.main()
|
2021-12-02 19:41:51 +01:00
|
|
|
|
2021-12-03 01:08:46 +01:00
|
|
|
@app.route('/sauveteurs/<int:idsauveteur>')
|
|
|
|
def sauveteur(idsauveteur):
|
|
|
|
return pages.sauveteur(idsauveteur)
|
|
|
|
|
2021-12-02 20:14:13 +01:00
|
|
|
@app.errorhandler(404)
|
|
|
|
def error(e):
|
|
|
|
return pages.error()
|
|
|
|
|
|
|
|
|
2021-12-02 19:41:51 +01:00
|
|
|
if __name__=="__main__":
|
|
|
|
app.run(debug=True)
|