diff --git a/src/ralph/urls/base.py b/src/ralph/urls/base.py index 49ed831dc0..44a9ab3100 100644 --- a/src/ralph/urls/base.py +++ b/src/ralph/urls/base.py @@ -1,10 +1,16 @@ from django.conf import settings from django.conf.urls import include, url from rest_framework.authtoken import views +from sitetree.sitetreeapp import SiteTree # noqa from ralph.admin import ralph_site as admin from ralph.api import router +# monkey patch for sitetree until +# https://github.com/idlesign/django-sitetree/issues/226 will be discussed +# and resolved +SiteTree.current_app_is_admin = lambda self: False + # import custom urls from each api module # notice that each module should have `urlpatters` variable defined # (as empty list if there is any custom url) @@ -47,10 +53,3 @@ if getattr(settings, 'ENABLE_HERMES_INTEGRATION', False): urlpatterns += url(r'^hermes/', include('pyhermes.apps.django.urls')), - - -# monkey patch for sitetree until -# https://github.com/idlesign/django-sitetree/issues/226 will be discussed -# and resolved -from sitetree.sitetreeapp import SiteTree # noqa -SiteTree.current_app_is_admin = lambda self: False