2👍
✅
You have different options to add the {{ user }}
to your templates context:
a) add django.contrib.auth.context_processors.auth
to your TEMPLATE_CONTEXT_PROCESSORS
setting. This will make a {{ user }}
template variable available in all context’s when rendering templates.
b) do it by hand and add a user
variable to pass it to the context in your view. user
can be retrieved from request.user
c) Make sure you are not overwrting {{ user }}
somewhere.
Source:stackexchange.com