Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Lalliantluanga Hauhnar
334 PointsHow to fetch rows and update using djangorestframework
I have four models
- member fields 1) name 2)group - foreignkey to group 3) supervisor- foreignkey to supervisor
- supervisor fields 1) name 2) group - foreignkey to group
- group - fields 1) name 2) description
- session - fields - 1) name 2) description 5) promisetopay fields - 1) member -foreign key to member 2) session - foreign key to session 3) amount 6) monthofpay fields - 1) month 2) is_active 7) TransactionPay 1) promisetopay - foreignkey to promisetopay 2) monthofpay 3) amountpaid
I WANT TO ACHIEVE THE FOLLOWING TASK USIND DJANGORESTFRAMEWORK
i want to fetch the transaction promisetopay and list all member who promised to pay, and return the following depending on their group and supervisor
- filter - group and supervisor
- field to be fetch and update 1) name - group-supervisor-amount(promisetopay) - read only fields 2) amountpaid(transactionpay) - this to be updated