I have different projects under one folder in django. I am trying to get all caches variables from each settings.py to be displayed in one project A. So far, I have been able to access the local settings in A.
Using something like
<!-- language: lang-py -->
from django.conf import settings
def get_cache_settings():
return settings.CACHES.keys()
Then I tried the following to get the settings from B but didn’t work
<!-- language: lang-py -->
from B.django.conf import settings
also tried
<!-- language: lang-py -->
from B import django.conf.settings
The tree folder look like this:
Project/
A/
cache/
urls.py
view.py
settings.py
B/
settings.py
Any suggestions?
Django settings are project level, so there is no such thing as app settings.
If you are talking about a settings.py file living in app directory A, just: