Compare commits

...

2 Commits

4 changed files with 24 additions and 0 deletions

9
app.py Normal file
View File

@ -0,0 +1,9 @@
# Fichier principal
from flask import Flask, escape, request
import pages
app = Flask(__name__)
@app.route('/')
def main():
return pages.main()

8
definitions.py Normal file
View File

@ -0,0 +1,8 @@
### Fonctions communes
def read(path):
# Retourne le contenu texte d'un fichier
f = open(path,'r')
result = f.read()
f.close()
return result

4
pages.py Normal file
View File

@ -0,0 +1,4 @@
import definitions as lib
def main():
return lib.read("templates/main.html")

3
templates/main.html Normal file
View File

@ -0,0 +1,3 @@
<h1>Bienvenue !</h1>
<p>Ceci est la page d'accueil !</p>