How to get all objects that match certain value in non-id field #8164
Unanswered
kruppy
asked this question in
Question & Answer
Replies: 2 comments 1 reply
-
The field |
Beta Was this translation helpful? Give feedback.
1 reply
-
hi guys, I added the code in a repository. Maybe it helps to recreate my problem... |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hello,
when trying to query objects on their foreignkey field, I dont manage to get any details. The company ID is and uuid (uuid4) field.
I have a Model called "contacts":
I want to get all Contacts, that work for the same company. Therefore I have created a ListAPIView whitin views.py
Views.py
And to get a URL I added the path in urls.py
Problem is, that when i try to go for that path and enter an UUID of an company that exists and has related contacts, I get the following error
Is it possible, that my URL is wrong and therefore cant query the ListAPIView?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions