mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-02 12:34:46 +00:00
Fix admin 404 page (#3705) for Django 1.8
This commit is contained in:
parent
f9de02b806
commit
4a325421f5
1 changed files with 5 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import functools
|
||||
|
||||
import django
|
||||
from django.conf.urls import url, include
|
||||
from django.views.decorators.cache import cache_control
|
||||
from django.views.generic import TemplateView
|
||||
|
|
@ -94,7 +95,10 @@ def display_custom_404(view_func):
|
|||
try:
|
||||
return view_func(request, *args, **kwargs)
|
||||
except Http404:
|
||||
return page_not_found(request, '', template_name='wagtailadmin/404.html')
|
||||
if django.VERSION < (1, 9):
|
||||
return page_not_found(request, template_name='wagtailadmin/404.html')
|
||||
else:
|
||||
return page_not_found(request, '', template_name='wagtailadmin/404.html')
|
||||
|
||||
return wrapper
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue