Display Users Posts also whether it is logged in or logged out

16 views
Skip to first unread message

objectiv...@gmail.com

unread,
May 10, 2018, 10:07:14 PM5/10/18
to Django users

I want to Display Users Posts also whether it is logged in or logged out When I click the everyone User It will show me users Profile Info but I want everyone user's posts also How Can I Solve This

Here is my code
https://dpaste.de/KBcF

Thank You in Advance

James Farris

unread,
May 11, 2018, 9:15:07 AM5/11/18
to django...@googlegroups.com
If you want to show posts, which I assume is blog posts or something (not seen in your code) 
You would add an additional queryset that is passed to your template

Something like 
Posts.objects.filter(user_id=pk)

Sent from my mobile device
--
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...@googlegroups.com.
To post to this group, send email to django...@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/aa97858a-71a7-4c65-b5c0-b7afe0ac0364%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages