Django rest framework filtering foreign key value and setting userId = current user

13 views
Skip to first unread message

chern...@gmail.com

unread,
Jan 4, 2018, 12:09:20 AM1/4/18
to Django users
So i have a family and schedule model. Family is to add family member and schedule is to create schedule with family as a foreign key in it.

But in both api, userId field is a drop down field to select which a user instead of using fix at the current userId.


Sorry for my inexperience as this is my first time creating such a huge API. Please give me guidance on how to do this.
Reply all
Reply to author
Forward
0 new messages