from django.conf import settings
from django.conf import settings if settings.DEBUG: # Do something # Note that django.conf.settings isn’t a module – it’s an object. # So importing individual settings is not possible: