Skip to content

Instantly share code, notes, and snippets.

@Bouke
Created September 2, 2012 13:22
Show Gist options
  • Save Bouke/3598791 to your computer and use it in GitHub Desktop.
Save Bouke/3598791 to your computer and use it in GitHub Desktop.
Django simple sqlite config
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'),
}
}
@Allan-Nava
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment