Closed sjkrta closed 1 year ago
Instead of using:
DATABASES = { 'default': config( 'DATABASE_URL', default='sqlite:///' + BASE_DIR.child('db.sqlite3'), cast=db_url ) }
Now, users can do
DATABASES = db_default(DEBUG, CUSTOM_DB_NAME , DATABASE_URL )
Full Code Looks Like this
from decouple import config, Csv, db_default from dj_database_url import parse as db_url
DEBUG = config('DEBUG', cast=bool) DATABASE_URL = config('DATABASE_URL', cast=db_url) CUSTOM_DB_NAME = BASE_DIR / 'custom_db_name.sqlite3'
DATABASES = db_default(DEBUG, CUSTOM_DB_NAME , DATABASE_URL )
was error here