Here are my settings:

TEMPLATE_DIRS = (
     #'/Users/tamara/Documents/django-python/fifthproject/tdslogin/ 
templates',
     '/Users/tamara/Documents/django-python/fifthproject/templates',
)


If I uncomment the first directory 'tdslogin/templates'  then both my  
application ('tdslogin') and the admin application use the template  
at tdslogin/templates/registration/logged_out.html

If I leave that line commented then both my application and the admin  
application use /admin/templates/registration/logged_out.html

My installed apps look like this:

INSTALLED_APPS = (
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.sites',
     'django.contrib.markup',
     'django.contrib.comments',
     'django.contrib.redirects',
     'django.contrib.flatpages',
     'django.contrib.admin',
     'fifthproject.tdslogin',
)

even if I switch the last two around, the same thing happens - the  
order of the apps doesn't seem to matter, just the existence (or not)  
of that one line in the TEMPLATE_DIRS.

So the problem is that the admin system logout and  
django.contrib.auth.views.logout both look for a template at  
registration/logged_out.html.  I guess the admin directories are  
checked last - so when 'tdslogin/templates' is not commented out,  
that is the first one it finds, and when it is commented out, it is  
the last one it finds.

I see now that there is no conflict with the login template.  The  
admin has it at /admin/templates/admin/login.html, and  
django.contrib.auth.views expects it at registration/login.html.

BTW, I had really confusing template problems with two other practice  
apps about a month or so ago, and I solved those problems by simply  
commenting out all of the directories in TEMPLATE_DIRS.  That was how  
things started for me earlier today, and why that directory has been  
toggled on and off many times today as I've tried to figure out this  
problem.  But, as I said earlier, my solution is to simply write my  
own logout view (3 lines, oh my!) and move on.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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