From 3f9ff78f016a88068e627006339731ee04165034 Mon Sep 17 00:00:00 2001 From: Dmitriy Shishkov Date: Mon, 20 Jun 2022 15:15:21 +0300 Subject: [PATCH] Moved db url parser import to condition --- settings.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/settings.py b/settings.py index ff9be76..dffb1eb 100644 --- a/settings.py +++ b/settings.py @@ -1,13 +1,12 @@ from config import * -import dj_database_url - BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DATABASES = {} if DATABASE_URL: + import dj_database_url # Reads string from DATABASE_URL env by default DATABASES['default'] = dj_database_url.config() else: