From 79257ddf56ef6e993a9e4891ac34d2498f1d024d Mon Sep 17 00:00:00 2001 From: Eragonfr Date: Mon, 16 Apr 2018 18:16:46 +0200 Subject: [PATCH] rename all .html file to filename.html.j2 --- app/routes.py | 10 +++++----- .../base/{alerts.html => alerts.html.j2} | 0 app/templates/base/base.html | 16 ---------------- app/templates/base/base.html.j2 | 16 ++++++++++++++++ .../base/{container.html => container.html.j2} | 4 ++-- .../base/{errors.html => errors.html.j2} | 2 +- .../base/{footer.html => footer.html.j2} | 0 app/templates/base/{head.html => head.html.j2} | 0 .../base/{header.html => header.html.j2} | 0 .../base/{navbar.html => navbar.html.j2} | 14 +++++++------- .../navbar/{account.html => account.html.j2} | 2 +- .../base/navbar/{forum.html => forum.html.j2} | 0 .../base/navbar/{news.html => news.html.j2} | 0 .../navbar/{programs.html => programs.html.j2} | 0 .../navbar/{sprites.html => sprites.html.j2} | 0 .../base/navbar/{tools.html => tools.html.j2} | 0 .../navbar/{tutorials.html => tutorials.html.j2} | 0 .../base/{scripts.html => scripts.html.j2} | 0 app/templates/{index.html => index.html.j2} | 2 +- app/templates/{login.html => login.html.j2} | 2 +- .../{register.html => register.html.j2} | 2 +- .../{validation.html => validation.html.j2} | 2 +- 22 files changed, 36 insertions(+), 36 deletions(-) rename app/templates/base/{alerts.html => alerts.html.j2} (100%) delete mode 100644 app/templates/base/base.html create mode 100644 app/templates/base/base.html.j2 rename app/templates/base/{container.html => container.html.j2} (63%) rename app/templates/base/{errors.html => errors.html.j2} (98%) rename app/templates/base/{footer.html => footer.html.j2} (100%) rename app/templates/base/{head.html => head.html.j2} (100%) rename app/templates/base/{header.html => header.html.j2} (100%) rename app/templates/base/{navbar.html => navbar.html.j2} (89%) rename app/templates/base/navbar/{account.html => account.html.j2} (99%) rename app/templates/base/navbar/{forum.html => forum.html.j2} (100%) rename app/templates/base/navbar/{news.html => news.html.j2} (100%) rename app/templates/base/navbar/{programs.html => programs.html.j2} (100%) rename app/templates/base/navbar/{sprites.html => sprites.html.j2} (100%) rename app/templates/base/navbar/{tools.html => tools.html.j2} (100%) rename app/templates/base/navbar/{tutorials.html => tutorials.html.j2} (100%) rename app/templates/base/{scripts.html => scripts.html.j2} (100%) rename app/templates/{index.html => index.html.j2} (76%) rename app/templates/{login.html => login.html.j2} (95%) rename app/templates/{register.html => register.html.j2} (96%) rename app/templates/{validation.html => validation.html.j2} (86%) 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 @@