# pytest.PytestConfigWarning: Unknown config option: DJANGO_SETTINGS_MODULE
E   django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured.

- **ID:** `python/pytest-django-settings-not-configured`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pytest-django is not installed or not active, so DJANGO_SETTINGS_MODULE in pytest.ini is ignored and Django isn't configured before import.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 4.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   pip install pytest-django, then in pyproject.toml:
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "myproj.settings"
python_files = "tests.py test_*.py *_tests.py"
   ```

## Dead Ends

- **** — Works only if `django.setup()` is also called; still fails on fixtures. (60% fail)
- **** — pytest-django does this itself; double-init causes warnings and test DB issues. (55% fail)
