From cfca652deecb3e46fcbdec822af43b0c6735c8c7 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 4 Feb 2021 11:14:22 -0500 Subject: [PATCH] feat: Add paths to easily view various error pages. Currently it's hard to see the content of an error without knowing how to cause an existing view to make that error in production. Adding these default paths should make that a lot easier. --- lms/urls.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lms/urls.py b/lms/urls.py index f3fd44c15b..5e9f0a523b 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -7,6 +7,7 @@ from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib.admin import autodiscover as django_autodiscover +from django.urls import path from django.utils.translation import ugettext_lazy as _ from django.views.generic.base import RedirectView from edx_api_doc_tools import make_docs_urls @@ -71,6 +72,7 @@ if settings.DEBUG or settings.FEATURES.get('ENABLE_DJANGO_ADMIN_SITE'): # pylint: disable=invalid-name handler403 = static_template_view_views.render_403 handler404 = static_template_view_views.render_404 +handler429 = static_template_view_views.render_429 handler500 = static_template_view_views.render_500 notification_prefs_urls = [ @@ -199,6 +201,10 @@ urlpatterns = [ ), url(r'^api/discounts/', include(('openedx.features.discounts.urls', 'openedx.features.discounts'), namespace='api_discounts')), + path('403', handler403), + path('404', handler404), + path('429', handler429), + path('500', handler500), ] if settings.FEATURES.get('ENABLE_MOBILE_REST_API'):