or you can just define in Your settings file:
BASE = os.path.dirname(__file__)
and do:
TEMPLATE_DIRS = (
os.path.join(BASE, 'templates')
)
and your settings will be location indipendent.
jrs wrote:
> I have solved this by using a settings_env.py file. At the top of my
> settings.py file I have
>
> from settings_env import *
>
> then inside settings_env.py I define
>
> MY_BASE_PATH = /absolute/path/to/project/
>
> so that inside settings.py the template becomes
>
> TEMPLATE_DIRS = (
> MY_BASE_PATH + 'templates'
> )
>
> MEDIA_ROOT can also use MY_BASE_PATH.
>
>
> Then I just exclude settings_env.py from the rsync command that posts
> the site. I also have my database, base_url, cache and any other
> environment specific configuration there. Works like a charm.
>
> john
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---