misc: use minimal default 404 page when templating is down (#42162)
This commit is contained in:
parent
67a6caaf70
commit
a621919221
|
@ -0,0 +1,2 @@
|
|||
<h1>Not Found</h1>
|
||||
<p>The requested resource was not found on this server.</p>
|
|
@ -567,7 +567,7 @@ def error404(request, *args, **kwargs):
|
|||
if Page.objects.exists() and all((not x.is_visible(request.user) for x in Page.objects.filter(parent_id__isnull=True))):
|
||||
# if none of the first-level pages can be viewed by the user, display
|
||||
# native django error page.
|
||||
return page_not_found(request, *args, **kwargs)
|
||||
return page_not_found(request, *args, template_name='combo/native-404.html', **kwargs)
|
||||
|
||||
try:
|
||||
page = Page.objects.get(slug='404')
|
||||
|
|
Loading…
Reference in New Issue