Created
September 7, 2012 05:17
-
-
Save JonasGroeger/3663391 to your computer and use it in GitHub Desktop.
Django relative directories in settings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
# Django 1.4.1 settings for <project-name> project. | |
import os | |
PROJECT_DIR = os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..')) | |
DATABASE = os.path.join(PROJECT_DIR, 'db', 'db.sqlite3') | |
DATABASES = { | |
'default': { | |
... | |
'NAME': DATABASE, | |
... | |
} | |
} | |
MEDIA_ROOT = os.path.join(PROJECT_DIR, 'assets') | |
TEMPLATE_DIRS = ( | |
os.path.join(PROJECT_DIR, 'templates'), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment