Yeah, you've got infinite recursion in the first line of your logout 
function: it calls itself.  I'm not sure why you are even defining 
your own logout view?  I have my urls.py map my logout url to 
django.contrib.auth.views.logout, and supply a context that includes 
template_name to display my own logout template.  Specifically, my 
urls.py includes this line:

     (r'accounts/logout/$', 'django.contrib.auth.views.logout', 
{'template_name': 'cdbauth/logged_out.tmpl'}),

Given you don't do anything extra in your logout view, I think you 
could do the same, just replace the first parameter with your own 
chosen logout url and the last one with your template name?

Karen

p.s. Is google groups acting up?  I just got a bunch of old mails 
(like this one), and my first attempt to post this via the groups 
page gave me an "oops, we're sorry, can't do, please try again later" 
kind of message?  (Gah, as did my 2nd....I'll try again with real mail...)

At 06:24 AM 10/26/2006, you wrote:

>I am trying to get the Logout Method to work, but I keep
>getting"Exception Value:        maximum recursion depth exceeded!".
>
>The view is very straightforward, so I can't understand where I'm going
>wrong.
>
>from django.contrib.auth import logout, authenticate, login
>
>def logout(request):
>     logout(request)  # debug shows it fails on this line
>     return render_to_response('promotions.html')
>
>
>

--~--~---------~--~----~------------~-------~--~----~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to