Closed paramburu closed 11 years ago
This, according to the docs, may stay the same in 1.5 but, on the view layer may need to change a little.
Don't understand this.
What is your TEMPLATE_CONTEXT_PROCESSORS? You are probably missing django.core.context_processors.request.
Actually, yes. I don't have it because I mainly don't need it (and it's not "on" by default on 1.4). Maybe, if the user context is automatically "on" with the auth context processor (needed by the auth module), the template should rely on that context instead of the request?
Just an opinion, because it didn't work for me and didn't realized I needed the request context processor.
Agreed.
request.user
can be accessed from views not from templates (according to the documentation).https://docs.djangoproject.com/en/1.4/topics/auth/#authentication-in-web-requests
From templates it's the context variable user, from: https://docs.djangoproject.com/en/1.4/topics/auth/#id8
At least since 1.0 (in the docs) can be accessed this way.
This, according to the docs, may stay the same in 1.5 but, on the view layer may need to change a little.