Commit 141be651 authored by ConstiDami's avatar ConstiDami
Browse files

routes site

parent 53cfd0b9
......@@ -3,32 +3,32 @@ from prince import app, db
from prince.models import Language, Sound
@app.route('/')
@app.route('/home')
@app.route('/projet_19-20/petit_prince')
@app.route('/projet_19-20/petit_prince/home')
def home():
prince_language = Language.query.filter_by(actif=1)
sounds = Sound.query.all()
return render_template('home.html', title='Petit Prince', prince_language = prince_language, sounds = sounds)
@app.route('/liste_langues')
@app.route('/projet_19-20/petit_prince/liste_langues')
def liste_langues():
prince_language = Language.query.filter_by(actif=1)
sounds = Sound.query.all()
return render_template('liste_langues.html', title='Liste des langues', prince_language = prince_language, sounds = sounds)
@app.route('/langue/<lang>')
@app.route('/projet_19-20/petit_prince/langue/<lang>')
def langue(lang):
langue_complet = Language.query.filter_by(french = lang).first()
sounds = Sound.query.filter_by(language = langue_complet.iso)
return render_template('langue.html', langue=langue_complet, title=lang, sounds = sounds)
@app.route('/carte')
@app.route('/projet_19-20/petit_prince/carte')
def carte():
french = Language.french
prince_language = Language.query.filter_by(actif=1)
sounds = Sound.query.all()
return render_template('carte.html', title='Carte', prince_language=prince_language, sounds = sounds)
@app.route('/enregistrement')
@app.route('/projet_19-20/petit_prince/enregistrement')
def enregistrement():
return render_template('enregistrement.html', title='Enregistrer un audio')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment