> How do you check that user is logged in ? If it's via request.user,
> then it doesn't work 'cause you
> aren't passing the request object to your template's context. The
> recomended way to do this is using RequestContext:
>
> from django.template import RequestContext
>
> return render_to_response('forms/contact.html', {'form': form},
> context_instance=RequestContext(request))
and add the context processor:
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
)
--
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment