Skip to content

Instantly share code, notes, and snippets.

@pau
Created July 22, 2011 04:36
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pau/1098900 to your computer and use it in GitHub Desktop.
Save pau/1098900 to your computer and use it in GitHub Desktop.
Set Relative Path of Django SQLite Database
SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(SITE_ROOT, 'db', 'test.db'),
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment