Posts by Vitor Vicente • 11 points
2 posts
-
1
votes1
answer18
viewsA: How to use "Objects.filter" by selecting only the logged in user in the application?
Digging a little and filling the code with print(), I discovered a way to do, follows: class IndexView(TemplateView): template_name = 'index.html' def get_context_data(self, **kwargs): context =…
-
0
votes1
answer18
viewsQ: How to use "Objects.filter" by selecting only the logged in user in the application?
I am using Django authentication and in HTML templates works very well when I use for example: {% if user.is_anonymous %} ... {% else %} ... {% endif %} I would like to use this same "user", which…