Skip to content

Conversation

@nazarewk
Copy link

Description

This both fixes the misleading error message for NamespaceVersioning and adds proper (at least according to me) nested namespaces handling.

#4009

@nazarewk nazarewk changed the title Nestes NamespaceVersioning Nested NamespaceVersioning Mar 21, 2016
@toxinu
Copy link

toxinu commented Apr 12, 2016

👍

@alanjds
Copy link
Contributor

alanjds commented Apr 29, 2016

This breaks my URLs scheme that have another namespace before the versions one, as seem:

# urls.py (root)
urlpatterns = [
    url(r'^api/', include('api.urls', namespace='api')),
]
# api/urls.py (app)
api_v1_patterns = [
    url(r'^', include(router.urls)),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
]

urlpatterns = [
    url(r'^v1/', include(api_v1_patterns, namespace='v1')),
]

Actual master works. With this PR applied it breaks.

@alanjds
Copy link
Contributor

alanjds commented Apr 29, 2016

...maybe in conjunction with #3816 it works, but I had not tested.

@nazarewk
Copy link
Author

@alanjds it wouldn't work with master if you had any extra namespace after the version, which imho is they way they should be used

I guess I'll have to come up with some idea to handle both before and after cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants