Re: auth context processor setup

2008-06-22 Thread mcordes
That was it. Thanks! --~--~-~--~~~---~--~~ 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 [EMAIL PROTE

Re: auth context processor setup

2008-06-22 Thread Nick Sandford
On Sun, Jun 22, 2008 at 10:20 PM, mcordes <[EMAIL PROTECTED]> wrote: > > I seem to already have the auth middleware enabled too. From what I'm > seeing, generic views _do_ have the user object available in their > templates. It's just my custom views that don't automatically have > this. It's easy

Re: auth context processor setup

2008-06-22 Thread Vasiliy Gladkov
Maybe you forgot to use context_instance parameter in render() call? If you want to use context processors, it must look like return render_to_response('template.html', context, context_instance=RequestContext(request)) context_instance parameter passes contexts from processors to your templates

Re: auth context processor setup

2008-06-22 Thread mcordes
I seem to already have the auth middleware enabled too. From what I'm seeing, generic views _do_ have the user object available in their templates. It's just my custom views that don't automatically have this. It's easy enough for me to pass in the request.user object from each of my templates, bu

Re: auth context processor setup

2008-06-22 Thread Vasiliy Gladkov
You have to enable auth middleware and application in settings.py - http://djangobook.com/en/1.0/chapter12/ Then you can use user specific variables in your templates - {{ user.username }}, {{ user.is_staff }} and so on On 22 июн, 14:43, mcordes <[EMAIL PROTECTED]> wrote: > Hello, > > Is there an

auth context processor setup

2008-06-21 Thread mcordes
Hello, Is there anything I need to do to enable the auth context processor other than adding "django.core.context_processors.auth" to TEMPLATE_CONTEXT_PROCESSORS in my settings.py? I'd like to be able to access the 'auth user' object in my various templates, which from what I understand this pro