Wednesday, November 23, 2011

Re: Django : CSRF and variable handling in a view

no problem.

I also pass has_account=True in the view if the user is authenticated.

in this case in your template you can just do:

{% if user.is_authenticated and user.is_active %}

That is the advantage of using RequestContext.

No comments:

Post a Comment