From 0beb56e82a0024e3578d098280385f7edba7945a Mon Sep 17 00:00:00 2001 From: Tobias Macey Date: Thu, 18 Jan 2018 16:00:57 -0500 Subject: [PATCH] Added deterministic handling of sqlite database location When running the migration command from outside of the application directory the sqlite database is created in the current working directory at the time of the command being executed. This commit updates the file path to be relative to the location of the settings file. --- hc/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hc/settings.py b/hc/settings.py index 0c1e9976..9a40b3d9 100644 --- a/hc/settings.py +++ b/hc/settings.py @@ -84,7 +84,7 @@ TEST_RUNNER = 'hc.api.tests.CustomRunner' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': './hc.sqlite', + 'NAME': '{0}/hc.sqlite'.format(BASE_DIR), } }