problems with lists in .env
See original GitHub issueI don’t know if I am using this wrong here, but if, it does not look straight forwarded to me. I have this in settings.py
env = environ.Env(
ALLOWED_HOSTS=(list, ['127.0.0.1', 'localhost']),
)
and this in .env
ALLOWED_HOSTS=['127.0.0.1', 'localhost']
Which wont work, because env('ALLOWED_HOSTS')
will return ["['127.0.0.1', 'localhost']"]
. But it should be ['127.0.0.1', 'localhost']
of course. If I try to use it without the list
parameter in .Env
, I will get an not callable error.
How can I manage, to use a list in .env
as well?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
How to pass a list as an environment variable? - Stack Overflow
1. The reason why I'd like to use env variables is because I can make a config file with stuff I'd use in...
Read more >List of Environmental Issues Examples: 30 Biggest Threats
Climate change is a huge topic! Here's a list of 30 ENVIRONMENTAL issues examples to help us all understand what's CAUSING climate change....
Read more >Problems with Environment Variables
This will print out all the currently set environment variables. Look in this list carefully. If the variable name is misspelt, then set...
Read more >A list of 20 Environmental Issues We Must Address
A list of 20 Environmental Issues We Must Address · 1. Carbon Pollution · 2. Rising Global Temperature · 3. Deforestation · 4....
Read more >Environment Variables and Choices() function issue
List not found". When opened app in edit mode all of the fields that are using Choices() function are failing with that error,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
the syntax for lists in the
.env
file is comma separated values rather than python list syntax so it would beALLOWED_HOSTS=127.0.0.1,localhost