I have a site on which I’m including a userBox with some data shown for each logged user (your name, avatar etc). From what I already know about django it seems obvious, that I should add query for user to context processor (so that I can use{{user}} variable in this included userBox ). But while using django-lfs shop I’ve noticed, that it’s templates are using {{ user }} variable which is nowhere added to context processors nor template tags. Is there any other way to obtain user in my template than those 2 ?
I have a site on which I’m including a userBox with some data shown
Share
It’s added by
And the answer for the question is: if you need something to be in every template, you should use context_processor.