Allow overrides of DJANGO_SETTINGS_MODULE in wsgi.py
Set os.environ.setdefault when setting DJANGO_SETTINGS_MODULE in wsgi.py so that other settings modules can be used by setting DJANGO_SETTINGS_MODULE.
We probably also want the same behavior for test settings here:
https://github.com/DataONEorg/d1_python/blob/master/gmn/src/d1_gmn/tests/gmn_test_case.py#L44
So
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "d1_gmn.settings_test")
instead of
os.environ["DJANGO_SETTINGS_MODULE"] = "d1_gmn.settings_test"
~~but I can make a separate PR for that.~~
(Added to this PR for simplicity).
@rogerdahl Do you think we could get this merged? It's currently blocking our GMN Dockerization effort, and we're hoping not to need to fork the repo for a trivial change.
Thanks, @srstsavage for putting this together. I'll also ask @iannesbitt and @datadavev to see if they can review and merge this if Roger is off on other adventures.
Gentle bump on this one, is this ready for merge or does it need an additional review?
@iannesbitt or @datadavev can one of you merge this and release a new version of the package to pypi? or let's discuss a path forward on slack.
Thank you!