Use app-level imports and from django.conf import settings.