stash
This commit is contained in:
parent
4f2fe011c0
commit
6fcdd1eefa
4 changed files with 22 additions and 9 deletions
|
|
@ -114,7 +114,7 @@ WSGI_APPLICATION = 'backend.wsgi.application'
|
|||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
'NAME': os.environ.get('TOOLSHED_DB_PATH', BASE_DIR / 'db.sqlite3'),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ USE_TZ = True
|
|||
STATIC_ROOT = 'staticfiles'
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
MEDIA_ROOT = 'userfiles'
|
||||
MEDIA_ROOT = os.environ.get('TOOLSHED_USERFILES_PATH', 'userfiles')
|
||||
MEDIA_URL = '/media/'
|
||||
|
||||
# Default primary key field type
|
||||
|
|
|
|||
|
|
@ -183,7 +183,11 @@ def testdata():
|
|||
import django
|
||||
|
||||
django.setup()
|
||||
if os.path.exists('testdata.py'):
|
||||
testdata_path = os.environ.get('TOOLSHED_SETUP_PATH', 'testdata.py')
|
||||
if os.path.exists(testdata_path):
|
||||
if testdata_path != 'testdata.py':
|
||||
import sys
|
||||
sys.path.append(os.path.dirname(testdata_path))
|
||||
from testdata import create_test_data
|
||||
create_test_data()
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue