Add example in the documentation how to setup multiple domains for ALLOWED_HOSTS as environment variable. I tried many times to setup this right but couldn't figure out how to setup heroku environment for multiple domains.
Faster setup for some users.
...
This is managed by django-environ in our setting, using the env.list() API:
The values it supports is not very well documented on their end, but looking at their test data as well as the code, values are comma-separated.
So the environment variable should look like this:
DJANGO_ALLOWED_HOSTS=domain.com,www.domain.com,api.domain.com
Maybe django-environ would accept a pull request to improve the relevant docstring?
Thanks you, now it works. It would be really nice if your example would be included in cookiecutter-djang documentation.
After some thought, I believe it belongs in django-environ docs, not in ours. When using this project, one should be aware of the underlying dependencies and look at their documentation when needed. I don't think we should start documenting this kind of cases ourselves.
If you feel like the use of django-environ isn't clear enough, however, feel free to send a pull request to add this where you see fit.
Most helpful comment
After some thought, I believe it belongs in
django-environdocs, not in ours. When using this project, one should be aware of the underlying dependencies and look at their documentation when needed. I don't think we should start documenting this kind of cases ourselves.If you feel like the use of
django-environisn't clear enough, however, feel free to send a pull request to add this where you see fit.