Skip to content

Commit

Permalink
Merge pull request #2116 from laws-africa/error-pages
Browse files Browse the repository at this point in the history
Add explicit indigo error pages
  • Loading branch information
longhotsummer authored Jun 7, 2024
2 parents 1364cc1 + 85900f4 commit 2984cfc
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
13 changes: 13 additions & 0 deletions indigo_app/templates/400.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% load i18n %}

<!DOCTYPE html>
<html>
<head>
<title>{% trans "400 Bad Request" %}</title>
</head>
<body>
<h1>{% trans "400 Bad Request" %}</h1>

<p><a href="/">{% trans "Home" %}</a></p>
</body>
</html>
15 changes: 15 additions & 0 deletions indigo_app/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% load i18n %}

<!DOCTYPE html>
<html>
<head>
<title>{% trans "404 Not Found" %}</title>
</head>
<body>
<h1>{% trans "404 Not Found" %}</h1>

<p>{% trans "We could not find that page." %}</p>

<p><a href="/">{% trans "Home" %}</a></p>
</body>
</html>
15 changes: 15 additions & 0 deletions indigo_app/templates/500.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% load i18n %}

<!DOCTYPE html>
<html>
<head>
<title>{% trans "400 Server Error" %}</title>
</head>
<body>
<h1>{% trans "500 Server Error" %}</h1>

<p>{% trans "Whoops, something went wrong." %}</p>

<p><a href="/">{% trans "Home" %}</a></p>
</body>
</html>
3 changes: 3 additions & 0 deletions indigo_content_api/tests/v3/test_taxonomies_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from django.test import override_settings

from rest_framework.test import APITestCase


@override_settings(STATICFILES_STORAGE='django.contrib.staticfiles.storage.StaticFilesStorage')
class TaxonomyTopicsAPIV3Test(APITestCase):
fixtures = ['languages_data', 'countries', 'user', 'editor', 'taxonomy_topics', 'work', 'published', 'colophon',
'attachments', 'commencements']
Expand Down

0 comments on commit 2984cfc

Please sign in to comment.