Reputation: 399
I keep getting the following error: name 'STATIC_DIRS' is not defined, when I try to access it in a view from my settings.py. What do I import to make this work in my views?
Upvotes: 0
Views: 40
Reputation: 11635
You can import the following:
from django.conf import settings
And then you can access variables set in your settings file by doing settings.variable
Upvotes: 2