Django server serving cached template pages

35 views
Skip to first unread message

Bryan Arguello

unread,
Mar 8, 2015, 4:10:09 PM3/8/15
to django...@googlegroups.com
I am on the second page of the blog tutorial and am trying to change the base-site.html template.  

I make a few small changes, set the permissions to 755, put it in
a subdirectory named 'admin' within a directory called 'template' inside of the project directory.  

I also add the template directory path to the TEMPLATE_DIRS variable
in settings.py and restart the server.  

After several hours of trying things suggested in different forums on this topic, I decided to just rename the original base_site.html in django/contrib/admin/templates/admin and create a blank "blank_site.html".  

After doing this, one would expect to get a blank page if the templates in TEMPLATE_DIRS were not found.  However, I am getting the same "Django administration" page.  Also, I did go into the manage.py shell and check TEMPLATE_DIRS: it is set to the correct directory.  I am starting to think this is some kind of Django server cache issue (tried clearing browser cache).

I can see that many new-comers to Django have come across this issue and none of the suggestions for these users seem to work.  However, I have never seen anyone mention a cache being the issue.  Does anyone have any suggestions?

Collin Anderson

unread,
Mar 10, 2015, 1:19:02 PM3/10/15
to django...@googlegroups.com
Hi,

Yes, apparently many people get tripped up on this step. Is this django1.7?

create a blank "blank_site.html".  <- I assume you mean create a blank base_site.html?

I assume this is with manage.py runserver? (If it's apache/uwsgi/gunicorn, you need to reload the program when changing the setting.)

Caching should only be an issue if the cached template loader is installed, which it isn't by default.

Collin
Reply all
Reply to author
Forward
0 new messages