-
-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Description
Hi
First of all, thanks for making django-configurations. It's great! Thank you
I've noticed a weird bug while using the DOTENV in my configurations
I have an .env file with this value
.env
MY_URL=http://some.domain.comAnd in my settings.py file I define this
settings.py
class Base(Configuration):
BASE_DIR = Path(__file__).resolve().parent.parent
DOTENV = os.path.join(BASE_DIR, '.env')
....
class Development(Base):
MY_URL = values.Value(environ_name="MY_URL")When I run
python manage.py runserverEverything work as expected, MY_URL gets its value from the .env file.
But when I run other manage.py commands (I haven't checked with all of them)
python manage.py migrateMY_URL is None.
For now I can workaround that by setting environ_prefix to an empty string instead of using environ_name.
settings.py
class Development(Base):
MY_URL = values.Value(environ_prefix="")I've tried to dig through the source code to see if I can fix this but so far I haven't.
If I find something, I'll try opening a PR.
Any Ideas where to look?
Metadata
Metadata
Assignees
Labels
No labels