Tuesday, December 15, 2009

SplitSettings - Django

No sure why they don't set this up by default but the best way to setup your media and template paths is:
DIRNAME = os.path.abspath(os.path.dirname(__file__))
DATABASE_NAME = os.path.join(DIRNAME, 'project.db')
MEDIA_ROOT = os.path.join(DIRNAME,'media')
TEMPLATE_DIRS = (
    os.path.join(DIRNAME,'templates'),
)
SplitSettings - Django - Trac

No comments: