Is there any way to use HyperlinkedModelSerializer without having to define the url view_name? #7946
Unanswered
brunodantas
asked this question in
Question & Answer
Replies: 1 comment 1 reply
-
If you're not setting the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is basically a duplicate of a stackoverflow question that had no answer.
When I implement a
HyperlinkedModelSerializer
subclass without redefining the url, I get the following error.It only works if I manually set the url attribute as follows.
url = HyperlinkedIdentityField(view_name='myapp:myview-detail')
Is there any way to do this without having to set the url attribute for every serializer class?
Beta Was this translation helpful? Give feedback.
All reactions