File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 78
78
# wagtail paths
79
79
path ("cms/" , include (wagtailadmin_urls )),
80
80
path ("documents/" , include (wagtaildocs_urls )),
81
- # let wagtail handle everything else
82
- path ("" , include (wagtail_urls )),
83
81
]
84
82
85
83
if settings .DEBUG :
90
88
urlpatterns += static (settings .MEDIA_URL , document_root = settings .MEDIA_ROOT )
91
89
urlpatterns += staticfiles_urlpatterns ()
92
90
91
+ # Serve 404 and 500 page templates(seeing as errors are masked with debug)
92
+ urlpatterns .extend (
93
+ [
94
+ path ("404/" , TemplateView .as_view (template_name = "404.html" )),
95
+ path ("500/" , TemplateView .as_view (template_name = "500.html" )),
96
+ ]
97
+ )
93
98
try :
94
99
import debug_toolbar
95
100
96
101
# must come before wagtail catch-all route or else debug urls 404
97
102
urlpatterns .insert (0 , path ("__debug__/" , include (debug_toolbar .urls )))
98
103
except ImportError :
99
104
pass
105
+
106
+ urlpatterns .append (
107
+ # let wagtail handle everything else
108
+ path ("" , include (wagtail_urls )),
109
+ )
You can’t perform that action at this time.
0 commit comments