I'm spending the afternoon trying to learn how to add login/logout to  
my django project.  Naturally, I have created a fake app just for  
this purpose.  And I have discovered something strange....

Logging in - I have a view that I use a login_required decorator  
with.  That looks for a url with /accounts/login/, which then is sent  
to the view django.contrib.auth.views.login, which looks for a  
template registration/login.html.  The entry in my urls.py file is:
(r'^accounts/login/', 'django.contrib.auth.views.login'),
This works just fine, and it uses my login template.

If I want to log out, I make the following entry in my urls.py file:
(r'^accounts/logout/', 'django.contrib.auth.views.logout'),
and I write a file registration/logged_out.html

The link I use for logout is to /accounts/logout/

I get logged out, but the template that is used is not *my* template,  
it is the one from the admin application.  Why?  If logging in finds  
my template, why won't logging out find my template?  Both templates  
are in the same directory, right next to each other.

Can anybody explain to me what is going on?

Thanks,

Tamara

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