-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIXES #344] Real Cause of 'rest_framework namespace is not Unique' is not Fixed #345
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asgharsir please fix the issue on master branch and then assigned the backport 3.3.x and backport 3.2.x labels to the PR
mapstore2_adapter/api/urls.py
Outdated
@@ -19,5 +19,6 @@ | |||
|
|||
urlpatterns = [ | |||
url(r'^rest/', include(router.urls)), | |||
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')) | |||
# rest_framework.urls may be skipped, if it is supposed to be always inside geonode | |||
url(r'^api-auth/', include('rest_framework.urls', namespace='mapstore2_adapter_apis')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this one, GeoNode already includes it.
But @giohappy both has different issues, so different fixes. Master doesn't have the issue of the unique namespace. It is much refactored and in Django 3.2. The only thing here is it is missing 3.2.x which is used in Geonode 3s, that has the unique namespace problem, plus duplicate urls issue. So now? |
@@ -28,5 +29,6 @@ class AppConfig(BaseAppConfig): | |||
label = "geonode_mapstore_client" | |||
|
|||
def ready(self): | |||
run_setup_hooks() | |||
if not apps.ready: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks to me that by adding this check the run_setup_hooks()
will never be executed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No Alessio. It still gets executed.
- Adds the urls.
- Also tested with breakpoints at different places,
api/urls.py
inclusive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I trust you, haven't tested on my side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My pleasure. And I had to.
@asgharsir in that case make the PR target 3.3.x and only add the backport to 3.2.x label. |
Created a new PR #349 branching from 3.3.x. I am not sure if I could label it well, only found |
It clears this:
It also fixes duplicate URLs, as we see for
mapstore/rest/
.Before it was:
Now it is: