3👍
✅
That’s what your settings are for.
Add this to your settings
MY_APP_LOG_DIRECTORY = "path/to/logs"
In your view functions, use
from django.conf import settings
Now you can use settings.MY_APP_LOG_DIRECTORY
all you want.
Source:stackexchange.com