Of course you can ... it encouraged, in fact. To use it, import the settings from django.conf (this will import your project settings):
from django.conf import settings
print "My database host is %s" % settings.DATABASE_HOST
The documentation for Using Settings in Python Code explains why this works, and why it is preferable to importing the module directly settings.py.
source
share