Missing DJANGO_SETTINGS_MODULE
See original GitHub issueWith empty .coveragerc
:
$ coverage run foo/manage.py test bar
[...works...]
With django-coverage-plugin in .coveragerc
:
[run]
plugins =
django_coverage_plugin
$ coverage run foo/manage.py test bar
[...]
django.core.exceptions.ImproperlyConfigured: Requested setting TEMPLATES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
manage.py
is unmodified (generated by Django).
Issue Analytics
- State:
- Created 8 years ago
- Comments:24 (9 by maintainers)
Top Results From Across the Web
DJANGO_SETTINGS_MODULE not defined - Stack Overflow
I've tried what some other answers here suggested, but either it's a different problem, or I'm missing something that should be quite obvious....
Read more >#22559 (Tutorial 5 - Missing few steps in instruction) – Django
You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before acces sing settings. however to execute
Read more >django-stubs - PyPI
This package contains type stubs and a custom mypy plugin to provide more precise static types and type inference for Django framework. Django...
Read more >Loading Django settings - missing module : Forums
... project_home) os.environ['DJANGO_SETTINGS_MODULE'] = 'MWC_APP.settings.local_dev'. I am running a virtual env. The casing is all ok.
Read more >django-configurations 2.4.post5 documentation
and the DJANGO_SETTINGS_MODULE environment variable to the module import path as usual, ... Don't miss the Django project templates pre-configured with ...
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 Free
Top 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
I was getting the following error:
I thought I had the setting enabled, but here’s the thing:
Error is gone 🎉
I opened #25 to deal with the invisible exception.