Created
September 2, 2012 13:22
-
-
Save Bouke/3598791 to your computer and use it in GitHub Desktop.
Django simple sqlite config
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
import os | |
# Define PROJECT_PATH as the project's root directory, according to new 1.4 layout: | |
# | |
# root | |
# |-- manage.py | |
# |-- project | |
# |-- settings.py | |
PROJECT_PATH = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.sqlite3', | |
'NAME': os.path.join(PROJECT_PATH, 'database.sqlite'), | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!