mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
401 error handler page #78
This commit is contained in:
parent
bbf345e689
commit
e35a5da500
2 changed files with 27 additions and 0 deletions
|
@ -14,3 +14,9 @@ from app.errors import bp
|
|||
def internal_error(error):
|
||||
db.session.rollback()
|
||||
return render_template('errors/500.html'), 500
|
||||
|
||||
|
||||
@bp.app_errorhandler(401)
|
||||
def internal_error(error):
|
||||
db.session.rollback()
|
||||
return render_template('errors/401.html'), 401
|
21
app/templates/errors/401.html
Normal file
21
app/templates/errors/401.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
|
||||
{% extends 'themes/' + theme() + '/base.html' %}
|
||||
{% else %}
|
||||
{% extends "base.html" %}
|
||||
{% endif %} %}
|
||||
|
||||
{% block app_content %}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">{{ _('Sorry, access is denied') }}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>{{ _('You cannot access this area.') }}</p>
|
||||
<p><a href="#" class="go_back">{{ _('Back') }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in a new issue