Re: How get user, included in generic views?

2006-07-12 Thread hotani
I got it finally... changed this: return render_to_response('main/index.html') to this: return render_to_response('main/index.html', RequestContext(request, {'request': request})) and that took care of it. Only took a few hours of staring at the generic views code and plenty of trial

Re: How get user, included in generic views?

2006-07-12 Thread hotani
this is what I'm sending out in the view. Basically this is an empty section of the site that will be created later. However, it bothers me that the menus and such will not work correctly since it seems I'm not passing the correct info. from views.py: def index(request): return

Re: How get user, included in generic views?

2006-07-12 Thread Guillermo Fernandez Castellanos
Hi, I did identify my problem (user not in context) doing this (thanks Joshua): {% if user %} user in context {% else %} user not in context {% endif %} It's difficult to know where your problem might be without looking at the code... G On 7/12/06, hotani <[EMAIL PROTECTED]> wrote: > > I

Re: How get user, included in generic views?

2006-07-12 Thread hotani
I think I'm missing something in my own views. Everything created by django (admin area, generic views) will get the user info, but when I do a view myself it doesn't work. What little tid-bit am I missing here? --~--~-~--~~~---~--~~ You received this message

Re: How get user, included in generic views?

2006-07-12 Thread Guillermo Fernandez Castellanos
Ok, got my problem. May be your problem as well, mamcxyz. I was using the user variable in a menu. In order to make my webpage as generic as possible, I had defined a menu.html that I included with a tag: register = Library() def make_menu(context): pass make_menu =

Re: How get user, included in generic views?

2006-07-12 Thread hotani
I am having this problem as well, but only for part of my site. The admin area works normally, one of my apps works well, but another app (happens to be the one at '/') does not see the user. {{ user.username }} returns "". It sees someone logged in, so user.is_anonymous is false, but everything

Re: How get user, included in generic views?

2006-07-11 Thread Joshua Tacoma
I don't know how to replicate it right now (I tried logging out and deleting cookies, no dice) but it did happen to me once or twice while I was developing something. If you only find this problem when you aren't logged in then treating 'not user' as equivalent to 'user.is_anonymous' should be

Re: How get user, included in generic views?

2006-07-11 Thread Guillermo Fernandez Castellanos
Hi, I do actually have a very similar problem, and I've also checked the more common errors (settings file,...). I put in my templates: {% if user.is_anonymous %} Welcome, new user. Please log in. {% else %} Welcome, {{ user.username }}. Thanks for logging in. {% endif % But then, I

How get user, included in generic views?

2006-07-11 Thread mamcxyz
I don't get the USER from context in generic views. I have configured the context procesors with django.core.context_processors.request, but not work in generic views...Why? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google