mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-11 00:33:17 +00:00
Merge branch 'master' into kaedroho-project-template
This commit is contained in:
commit
f5282af3d9
1 changed files with 7 additions and 1 deletions
|
|
@ -37,7 +37,13 @@ def check_old_style_urlconf():
|
|||
# A faulty urls.py will place wagtail.wagtailimages.urls at the same path that
|
||||
# wagtail.wagtailimages.admin_urls is loaded to, resulting in the wagtailimages_serve path
|
||||
# being equal to wagtailimages_index followed by three arbitrary args
|
||||
wagtailimages_serve_path = urlresolvers.reverse('wagtailimages_serve', args = ['123', '456', '789'])
|
||||
try:
|
||||
wagtailimages_serve_path = urlresolvers.reverse('wagtailimages_serve', args = ['123', '456', '789'])
|
||||
except urlresolvers.NoReverseMatch:
|
||||
# wagtailimages_serve is not defined at all, so there's no collision
|
||||
OLD_STYLE_URLCONF_CHECK_PASSED = True
|
||||
return
|
||||
|
||||
wagtailimages_index_path = urlresolvers.reverse('wagtailimages_index')
|
||||
if wagtailimages_serve_path == wagtailimages_index_path + '123/456/789/':
|
||||
raise ImproperlyConfigured("""Your urls.py contains an entry for %s that needs to be removed.
|
||||
|
|
|
|||
Loading…
Reference in a new issue