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
NestedSimplerRouter with nested>0 doesn't allow for no prefix in the url parameter #212
Comments
Hi, I think there is no such possibility. lookup parameter in the NestedSimpleRouter ensures that every URL kwarg will be unique. I guess it would be better to have a lookups named 'name' or 'slug' for username as 'username' is an instance and 'name' or 'slug' could be his lookups. |
If I have a URL path such as:
/api/users/{username}
When I nest this with some child element, I get the the
lookup
value given toNestedSimpleRouter
prepended:routers.NestedSimpleRouter(router, api_path_users, lookup="username")
/api/users/{username_username}/books/
Is there a way to not have this prepend happen? I've tried working with
parent_lookup_kwargs
and so on, but to no avail. Any ideas how to make it so the url would be/api/users/{username}/books/
?Thanks!
The text was updated successfully, but these errors were encountered: