diff --git a/app/routes.py b/app/routes.py index 06ad4b1..7c81258 100644 --- a/app/routes.py +++ b/app/routes.py @@ -17,7 +17,7 @@ def index(): return redirect(url_for('index')) login_user(user, remember=form.remember_me.data) - return render_template('index.html', form=form) + return render_template('index.html.j2', form=form) @app.route('/logout/') @@ -45,7 +45,7 @@ def register(): db.session.commit() flash('Congratulations, you are now a registered user!') return redirect(url_for('validation')) - return render_template('register.html', title='Register', form=form, form2 = form2) + return render_template('register.html.j2', title='Register', form=form, form2 = form2) @app.route('/register/validation/') def validation(): @@ -58,7 +58,7 @@ def validation(): flash('pseudo ou mot de passe invalide') return redirect(url_for('index')) login_user(user, remember=form.remember_me.data) - return render_template('validation.html', form = form) + return render_template('validation.html.j2', form = form) @app.route('/error/') @app.errorhandler(400) @@ -78,6 +78,6 @@ def errors(error): return redirect(url_for('index')) login_user(user, remember=form.remember_me.data) try: - return render_template("base/errors.html", error_code = error, form=form), error + return render_template("base/errors.html.j2", error_code = error, form=form), error except: - return render_template("base/errors.html", error_code = error.code, form=form), error.code + return render_template("base/errors.html.j2", error_code = error.code, form=form), error.code diff --git a/app/templates/base/alerts.html b/app/templates/base/alerts.html.j2 similarity index 100% rename from app/templates/base/alerts.html rename to app/templates/base/alerts.html.j2 diff --git a/app/templates/base/base.html b/app/templates/base/base.html deleted file mode 100644 index fb755d1..0000000 --- a/app/templates/base/base.html +++ /dev/null @@ -1,16 +0,0 @@ - - - {% include "base/head.html" %} - - {% include "base/navbar.html" %} - - {% block container %} - {% endblock container %} - - {% include "base/footer.html" %} - - {% include "base/alerts.html" %} - - {% include "base/scripts.html" %} - - diff --git a/app/templates/base/base.html.j2 b/app/templates/base/base.html.j2 new file mode 100644 index 0000000..2650ee8 --- /dev/null +++ b/app/templates/base/base.html.j2 @@ -0,0 +1,16 @@ + + + {% include "base/head.html.j2" %} + + {% include "base/navbar.html.j2" %} + + {% block container %} + {% endblock container %} + + {% include "base/footer.html.j2" %} + + {% include "base/alerts.html.j2" %} + + {% include "base/scripts.html.j2" %} + + diff --git a/app/templates/base/container.html b/app/templates/base/container.html.j2 similarity index 63% rename from app/templates/base/container.html rename to app/templates/base/container.html.j2 index cf4302e..9cfa4f7 100644 --- a/app/templates/base/container.html +++ b/app/templates/base/container.html.j2 @@ -1,8 +1,8 @@ -{% extends "base/base.html" %} +{% extends "base/base.html.j2" %} {% block container %}
- {% include "base/header.html" %} + {% include "base/header.html.j2" %} {% block content %} {% endblock content %} diff --git a/app/templates/base/errors.html b/app/templates/base/errors.html.j2 similarity index 98% rename from app/templates/base/errors.html rename to app/templates/base/errors.html.j2 index 53f80d1..58ffc6d 100644 --- a/app/templates/base/errors.html +++ b/app/templates/base/errors.html.j2 @@ -1,4 +1,4 @@ -{% extends "base/container.html" %} +{% extends "base/container.html.j2" %} {% block content %}
diff --git a/app/templates/base/footer.html b/app/templates/base/footer.html.j2 similarity index 100% rename from app/templates/base/footer.html rename to app/templates/base/footer.html.j2 diff --git a/app/templates/base/head.html b/app/templates/base/head.html.j2 similarity index 100% rename from app/templates/base/head.html rename to app/templates/base/head.html.j2 diff --git a/app/templates/base/header.html b/app/templates/base/header.html.j2 similarity index 100% rename from app/templates/base/header.html rename to app/templates/base/header.html.j2 diff --git a/app/templates/base/navbar.html b/app/templates/base/navbar.html.j2 similarity index 89% rename from app/templates/base/navbar.html rename to app/templates/base/navbar.html.j2 index bcb2423..967f2b9 100644 --- a/app/templates/base/navbar.html +++ b/app/templates/base/navbar.html.j2 @@ -70,19 +70,19 @@