This is a very beginner question. But I\'m stumped. How do I reference a Django settings variable in my model.py?
NameError: name \'PRIVATE_DIR\' is not de
Try with this: from django.conf import settings then settings.VARIABLE to access that variable.
from django.conf import settings
settings.VARIABLE
from django.conf import settings PRIVATE_DIR = getattr(settings, "PRIVATE_DIR", None)
Where it says None, you will put a default value incase the variable isn't defined in settings.
None