From 5b5814c9577bbd123c7dd0c8641a2645101a2934 Mon Sep 17 00:00:00 2001 From: Asghar Syed <47123144+asgharsir@users.noreply.github.com> Date: Wed, 21 Jul 2021 08:48:51 +0100 Subject: [PATCH] [FIXES #344] rest_framework namespace and duplicate URLs (#349) --- geonode_mapstore_client/apps.py | 4 +++- mapstore2_adapter/api/urls.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) 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..2755901de5 100644 --- a/mapstore2_adapter/api/urls.py +++ b/mapstore2_adapter/api/urls.py @@ -19,5 +19,4 @@ urlpatterns = [ url(r'^rest/', include(router.urls)), - url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')) ]