Skip to content

Commit

Permalink
Move sqlite database outside of the main source tree
Browse files Browse the repository at this point in the history
  • Loading branch information
vzipped committed Oct 11, 2014
1 parent 7ffe559 commit ebe0532
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superlists/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
Expand Down Expand Up @@ -60,7 +60,7 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'NAME': os.path.join(BASE_DIR, '../database/db.sqlite3'),
}
}

Expand All @@ -82,3 +82,4 @@
# https://docs.djangoproject.com/en/1.7/howto/static-files/

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, '../static')

0 comments on commit ebe0532

Please sign in to comment.