mirror of
https://github.com/searxng/searxng.git
synced 2025-12-28 06:30:02 +00:00
add custom 404 page
This commit is contained in:
7
searx/templates/courgette/404.html
Normal file
7
searx/templates/courgette/404.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% extends "courgette/base.html" %}
|
||||
{% block content %}
|
||||
<div class="center">
|
||||
<h1>{{ _('Page not found') }}</h1>
|
||||
<p>{{ _('Go to <a href="/">search page</a>.') }}</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
7
searx/templates/default/404.html
Normal file
7
searx/templates/default/404.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% extends "default/base.html" %}
|
||||
{% block content %}
|
||||
<div class="center">
|
||||
<h1>{{ _('Page not found') }}</h1>
|
||||
<p>{{ _('Go to <a href="/">search page</a>.') }}</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
7
searx/templates/oscar/404.html
Normal file
7
searx/templates/oscar/404.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% extends "oscar/base.html" %}
|
||||
{% block content %}
|
||||
<div class="text-center">
|
||||
<h1>{{ _('Page not found') }}</h1>
|
||||
<p>{{ _('Go to <a href="/">search page</a>.') }}</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
7
searx/templates/pix-art/404.html
Normal file
7
searx/templates/pix-art/404.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% extends "pix-art/base.html" %}
|
||||
{% block content %}
|
||||
<div class="center">
|
||||
<h1>{{ _('Page not found') }}</h1>
|
||||
<p>{{ _('Go to <a href="/">search page</a>.') }}</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -715,6 +715,11 @@ def config():
|
||||
'default_theme': settings['ui']['default_theme']})
|
||||
|
||||
|
||||
@app.errorhandler(404)
|
||||
def page_not_found(e):
|
||||
return render('404.html')
|
||||
|
||||
|
||||
def run():
|
||||
app.run(
|
||||
debug=settings['general']['debug'],
|
||||
|
||||
Reference in New Issue
Block a user