diff --git a/geonode_mapstore_client/apps.py b/geonode_mapstore_client/apps.py index 5115312928..838705223f 100644 --- a/geonode_mapstore_client/apps.py +++ b/geonode_mapstore_client/apps.py @@ -10,6 +10,7 @@ ######################################################################### from django.apps import AppConfig as BaseAppConfig from django.utils.translation import ugettext_lazy as _ +from django.apps import apps def run_setup_hooks(*args, **kwargs): @@ -28,5 +29,6 @@ class AppConfig(BaseAppConfig): label = "geonode_mapstore_client" def ready(self): - run_setup_hooks() + if not apps.ready: + run_setup_hooks() super(AppConfig, self).ready() diff --git a/mapstore2_adapter/api/urls.py b/mapstore2_adapter/api/urls.py index ae51a72305..b97c73ab63 100644 --- a/mapstore2_adapter/api/urls.py +++ b/mapstore2_adapter/api/urls.py @@ -18,6 +18,5 @@ router.register(r'resources', views.MapStoreResourceViewSet, basename="resources") urlpatterns = [ - url(r'^rest/', include(router.urls)), - url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')) + url(r'^rest/', include(router.urls)) ]