Can someone help me to fix ForeignKey related filter issues

32 views
Skip to first unread message

Shazia Nusrat

unread,
Sep 25, 2016, 7:31:43 AM9/25/16
to django...@googlegroups.com
Hi,

Following is the link and kindly assist as I've been trying to do this for hours now.

http://stackoverflow.com/questions/39685833/django-filter-with-foreignkey-not-working?noredirect=1#comment66671635_39685833

Regards,
Shazia

Aditya Suman Maharana

unread,
Oct 1, 2016, 9:58:24 AM10/1/16
to Django users
Hi,

Use request.user instead of self.user.

You're getting the error because SellerDashboard class has no attribute called user. The user object you need is stored as user attribute in the request parameter sent with get().

Regards,
Aditya
Reply all
Reply to author
Forward
0 new messages