How to pass a variable from settings.py to a view?
Use from django.conf import settings
but mind that settings
is not a module. The documentation clearly explains that and your use case.
from django.conf import settings as conf_settings
project_path = conf_settings.PROJECT_PATH