mirror of https://github.com/searxng/searxng.git
Merge pull request #671 from kvch/custom-404
Custom 404 message - fixes #317
This commit is contained in:
commit
3043c404e4
|
@ -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 %}
|
|
@ -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 %}
|
|
@ -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 %}
|
|
@ -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']})
|
'default_theme': settings['ui']['default_theme']})
|
||||||
|
|
||||||
|
|
||||||
|
@app.errorhandler(404)
|
||||||
|
def page_not_found(e):
|
||||||
|
return render('404.html')
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
app.run(
|
app.run(
|
||||||
debug=settings['general']['debug'],
|
debug=settings['general']['debug'],
|
||||||
|
|
|
@ -9,6 +9,11 @@ Front page
|
||||||
Page Should Contain about
|
Page Should Contain about
|
||||||
Page Should Contain preferences
|
Page Should Contain preferences
|
||||||
|
|
||||||
|
404 page
|
||||||
|
Go To http://localhost:11111/no-such-page
|
||||||
|
Page Should Contain Page not found
|
||||||
|
Page Should Contain Go to search page
|
||||||
|
|
||||||
About page
|
About page
|
||||||
Click Element link=about
|
Click Element link=about
|
||||||
Page Should Contain Why use searx?
|
Page Should Contain Why use searx?
|
||||||
|
|
Loading…
Reference in New Issue