Re: Logout method returning "maximum recursion depth exceeded" - Help!

2006-10-27 Thread Merric Mercer

Thanks for all your points.  I'm having real problems with Google 
groups.  I figured out what was wrong - but was not able to post in.  
Now, these posts are obviously coming in - 24 late.

MerMer
>
> 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 2ndI'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
-~--~~~~--~~--~--~---



Re: Logout method returning "maximum recursion depth exceeded" - Help!

2006-10-27 Thread Karen Tracey

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 2ndI'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
-~--~~~~--~~--~--~---



Re: Logout method returning "maximum recursion depth exceeded" - Help!

2006-10-27 Thread Don Arbow
On Oct 26, 2006, at 3:24 AM, MerMer wrote:I am trying to get the Logout Method to work, but I keepgetting"Exception Value:  	maximum recursion depth exceeded!".The view is very straightforward, so I can't understand where I'm goingwrong.from django.contrib.auth import logout, authenticate, logindef logout(request):    logout(request)  # debug shows it fails on this line    return render_to_response('promotions.html')Probably because python is calling the wrong logout method (yours and not django's). I would instead qualify the logout method you are calling like this:from django.contrib import authdef logout(request):	auth.logout(request)	...or you could rename your logout method to something else, like log_me_out(), which should prevent the recursion.Don
--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---



Logout method returning "maximum recursion depth exceeded" - Help!

2006-10-27 Thread MerMer

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
-~--~~~~--~~--~--~---