Saturday, October 1, 2016

Re: Can someone help me to fix ForeignKey related filter issues

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

On Sunday, September 25, 2016 at 5:01:43 PM UTC+5:30, Shazia Nusrat wrote:
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

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/42e6348d-d127-40fa-b9b2-162c39658e43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment