Adding DRF to Polls Tutorial to get my arms around DRF but getting AttributeError at /api/questions/3/ #8729
Unanswered
trexmo
asked this question in
Question & Answer
Replies: 0 comments
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.
-
I did a startapp api and populated serializers.py, urls.py and views.py
I have two other models in other apps for Instructions and Parameters
And the Web page is working
Instructions and Parameters works great with List, detail, create and even Patch.
questions also worked great on the single Question model.
The problem came with I tried to join the Question and Choice models together.
Here are the Serializers involved.
Now when I hit /api/questions/
I get
and no options for POST or PUT.
When I try the pk http://localhost:8000/api/questions/1/
I get this error.
I don't see it. 'matchingKey' is a field in Parameter model but I don't see it being referenced in Question but it is in ParameterSerializer. PUZZLED.
Beta Was this translation helpful? Give feedback.
All reactions