summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-08-27 22:08:58 +0200
committerGitHub <noreply@github.com>2016-08-27 22:08:58 +0200
commit3043c404e42901a1234d150e43daee99810b46f5 (patch)
tree853a41827fe4ee4bc030a50e91e0155c5f561286 /searx
parentb72aec0a9b2b548d7f6a8ddecedd58f5392b8372 (diff)
parent0056c4035e80c7899985dcb38d8d4d1570ac514b (diff)
downloadsearxng-3043c404e42901a1234d150e43daee99810b46f5.tar.gz
searxng-3043c404e42901a1234d150e43daee99810b46f5.zip
Merge pull request #671 from kvch/custom-404
Custom 404 message - fixes #317
Diffstat (limited to 'searx')
-rw-r--r--searx/templates/courgette/404.html7
-rw-r--r--searx/templates/default/404.html7
-rw-r--r--searx/templates/oscar/404.html7
-rw-r--r--searx/templates/pix-art/404.html7
-rw-r--r--searx/webapp.py5
5 files changed, 33 insertions, 0 deletions
diff --git a/searx/templates/courgette/404.html b/searx/templates/courgette/404.html
new file mode 100644
index 000000000..465039e3a
--- /dev/null
+++ b/searx/templates/courgette/404.html
@@ -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 %}
diff --git a/searx/templates/default/404.html b/searx/templates/default/404.html
new file mode 100644
index 000000000..18012f2ac
--- /dev/null
+++ b/searx/templates/default/404.html
@@ -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 %}
diff --git a/searx/templates/oscar/404.html b/searx/templates/oscar/404.html
new file mode 100644
index 000000000..39836ce0e
--- /dev/null
+++ b/searx/templates/oscar/404.html
@@ -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 %}
diff --git a/searx/templates/pix-art/404.html b/searx/templates/pix-art/404.html
new file mode 100644
index 000000000..27e89ae02
--- /dev/null
+++ b/searx/templates/pix-art/404.html
@@ -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 %}
diff --git a/searx/webapp.py b/searx/webapp.py
index 460681b35..e118fee2b 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -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'],