On 11/05/2010 3:42pm, Old Davy wrote:
On 05/10/2010 08:18 PM, Shawn Milochik wrote:
Exactly what directory is your copied template in? It's most likely
not in the right place.

Ensure that you have a template dir that your settings knows about,
and that template dir has a subdirectory called 'admin' where that
file is placed.

Shawn

That would make the most sense, and that would be my working assumption.
But I can't for the life of me see where the disconnect is.

this is the string that's in the TEMPLATE_DIRS section of my settings.py
file:

"/home/llanitedave/Development/djangoProjects/django1.1Training/mysite/admin/base_site.html"

You want a directory rather than a file (base_site.html) for TEMPLATE_DIRS

This is mine ...

# if templates are not found here look in app_name/templates
TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, 'templates').replace('\\','/'),)

This puts my templates directory in the same dir as my settings.py file.

Inside it I have a sub-dir for each application for which I want templates. For example, in one of them I have ...

../templates/admin/base_site.html

Which contains ...

{% extends "base.html" %}
{% load i18n %}

{% block title %}{{ title }} | {% trans 'Mysite site admin' %}{% endblock %}

{% block branding %}
<h1 id="site-name">{% trans 'Mysite administration' %}</h1>
{% endblock %}

... and which turns Django Admin into Mysite admin. However, the "base.html" which it extends is actually in ../templates

If I wanted Mysite base_site.html to extend the real Django base.html I would have to put ... {% extends "admin/base.html" %}

HTH

Mike




That's exactly the path that my directories show, including my
idiosyncratic upper case letters.

I did find the file that my poll app is referencing. Turns out it was in
my '/usr/local/lib/python2.6... path instead of my home directory. So
when I modified THAT file, it used my changes. However, that still
doesn't help, as it's not using the file that I copied to my local
directory.

I suppose I can play with a few more directories and see what happens...


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to