[Django]-Django: get the path to the current django app

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.

👤S.Lott

Leave a comment