Skip to content
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

DefaultRouter root view should use namespaced view names if needed. #2351

Closed
tomchristie opened this issue Dec 24, 2014 · 5 comments
Closed

Comments

@tomchristie
Copy link
Member

tomchristie commented Dec 24, 2014

Add support for the root API view to use appropriately namespaced view names. Won't need any changes to the router API, just an implementation detail.

Refs #2333, #2350.

@thedrow
Copy link
Contributor

thedrow commented Dec 24, 2014

How can we implement this without changing the router API?
We can create our own version of include that modifies the URL patterns accordingly but that will require the users to decide between two implementations of include. I don't really like that approach but I don't see any other way it could be done.

@tomchristie
Copy link
Member Author

tomchristie commented Dec 24, 2014

The API root view can inspect the incoming request, determine the namespace if there is one on the request object, and modify the view names accordingly if so.

@rockymeza
Copy link
Contributor

rockymeza commented Dec 24, 2014

That sounds pretty badass, I think that would work. Do you think it could also be added to the HyperlinkedRelatedField (I'm not sure if that is correct behavior)? I wonder if that is too magical.

@tomchristie
Copy link
Member Author

tomchristie commented Dec 26, 2014

Note to self: Ensure this doesn't conflict with namespaced versioning.

@tomchristie tomchristie added this to the 3.0.3 Release milestone Dec 28, 2014
@tomchristie
Copy link
Member Author

tomchristie commented Dec 28, 2014

Closed via efa5942.

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

No branches or pull requests

3 participants