-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Can't reverse non-API URLs with NamespaceVersioning #2711
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
Labels
Milestone
Comments
That sounds okay, yes. Maybe consider having a look at making that change in the |
Sure, I'll do that! |
This was referenced Mar 9, 2017
This was referenced Oct 16, 2017
This was referenced Nov 6, 2017
This was referenced Nov 14, 2017
This was referenced Dec 10, 2017
This was referenced Dec 20, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm trying to setup a versioning mechanism using NamespaceVersioning as the method. Everything is fine except for the serializer fields that are using non-API views. The
reverse
function shipped with DRF will raise an exception because it's trying to reverse the non-API views from the same namespace as inrequest.version
.Here's an example:
I feel we should do something about this in DRF itself, but I'm not sure how to tackle the issue (at least to document this behavior). One idea would be to automatically fallback to default reversal if the namespaced one fails.
Any thoughts?
The text was updated successfully, but these errors were encountered: