On Fri, Jun 12, 2009 at 3:53 PM, Robocop <btha...@physics.ucsd.edu> wrote:

>
> I'm having an issue when traversing a link on my site.  When clicking
> this link, I'm properly routed to the page, however the user i am
> logged in as is logged out for no reason.


How are you determining that the user is logged out?


> The link is part of a menu
> that looks as such:
> [snip]

The view that renders the page looks like:
>
> @login_required
> @staff_member_required
> def audit_choose(request):
>  master_engagements=[]
>  master_clients=[]
>  dept_list =Department.objects.filter(active=True).order_by('name')
>  if request.method=='POST':
>  .
>  .
>  .
>  else:
>    dept_list =Department.objects.filter(active=True).order_by('name')
>    return render_to_response("audit_choose_departments.html", locals
> ())
>
> Because i'm just clicking a link there is no post data, so the only
> relavent lines are those outside of the if request.method=='POST'
> section
>
> Is there anything i'm just doing completely wrong?  I don't recall
> having this problem before, and just noticed it while debugging some
> other issues.  Any help/ridicule/ideas would be great!
> thanks


Well you aren't passing a RequestContext to render_to_response, to there
will be no user object in the template context when it is rendered.  Perhaps
this is what is making you think the user has been logged out?

Karen

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to