mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-01-14 01:48:40 +01:00
fix reload_urlconf test helper so it supports a third party urlconf
This commit is contained in:
parent
e82c17567a
commit
2681f6340c
@ -26,8 +26,15 @@ def reload_urlconf(urlconf=None):
|
||||
from django.conf import settings
|
||||
|
||||
urlconf = settings.ROOT_URLCONF
|
||||
if urlconf in sys.modules:
|
||||
from django.core.urlresolvers import clear_url_caches
|
||||
|
||||
if HELPDESK_URLCONF in sys.modules:
|
||||
reload(sys.modules[HELPDESK_URLCONF])
|
||||
|
||||
if urlconf in sys.modules:
|
||||
reload(sys.modules[urlconf])
|
||||
clear_url_caches()
|
||||
|
||||
from django.core.urlresolvers import clear_url_caches
|
||||
clear_url_caches()
|
||||
|
||||
|
||||
HELPDESK_URLCONF = 'helpdesk.urls'
|
||||
|
Loading…
Reference in New Issue
Block a user