Figure I'll throw this out there as another soluti...
# general
b
Figure I'll throw this out there as another solution for varying django settings on a per-app basis within a monorepo. We define a
test.py
settings module, which does a wildcard import on a
shared.py
setting file and then does a few overrides. This is working for me and it is a much simpler version of what django does internally:
Copy code
from django.conf import settings
from my.app.settings import test as test_settings


def pytest_configure():
    """ Configure django settings """
    settings.configure(**{key: getattr(test_settings, key) for key in dir(test_settings) if key.isupper()})
👀 1
h
Neat!