404 plus marante et l'erreur dans les routes est corrigée

This commit is contained in:
Eragon 2018-04-16 13:27:05 +02:00
parent 2da7634951
commit 22814fc145
2 changed files with 23 additions and 2 deletions

View File

@ -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.j2", error_code = error, form=form), error
return render_template("base/errors.html", error_code = error, form=form), error
except:
return render_template("base/errors.html.j2", error_code = error.code, form=form), error.code
return render_template("base/errors.html", error_code = error.code, form=form), error.code

View File

@ -13,6 +13,27 @@
Forbidden : La page vous est interdit.
{% elif error_code == 404 %}
Not Found : La page n'existe pas ou plus, si vous avez rentré l'url à la main vérifiez de ne pas vous être trompé.
<pre> /| /‾‾‾‾‾‾‾\ /| |\ | /‾‾‾‾‾\
/ | / \ / | | \ | / \ |
/ | | | / | | \ | / \ |
/ | | | / | | \ | | | |
/ | | | / | | \ | | | |
/ | | | / | | \ | | | |
/______|_ | | /______|_ | \ | | | |
| | | | | \ | \ / |
| \ / | | \ | \ / |
| \_______/ | | \| \_____/ |
|‾‾‾‾‾‾‾‾‾‾ /‾‾‾‾‾\ | | |\ | |‾‾‾‾‾‾‾\
| / \ | | | \ | | \
| / \ | | | \ | | \
| | | | | | \ | | |
| | | | | | \ | | |
| | | | | | \ | | |
| | | | | | \ | | |
| \ / \ / | \ | | /
| \ / \ / | \ | | /
| \_____/ \_____/ | \| |_______/</pre>
{% elif error_code == 418 %}
Im a teapot : Je suis une théière
{% elif error_code == 500 %}