old_contents: from django.conf import settings
  from django.core.exceptions import ImproperlyConfigured
  
  
  FIELD_ENCRYPTION_KEY = str(getattr(settings, 'FIELD_ENCRYPTION_KEY'))
  
  if not FIELD_ENCRYPTION_KEY:
      raise ImproperlyConfigured(
          'FIELD_ENCRYPTION_KEY must be defined in settings')
  
new_contents: from django.conf import settings
  from django.core.exceptions import ImproperlyConfigured
  
  
  FIELD_ENCRYPTION_KEY = str(getattr(settings, 'FIELD_ENCRYPTION_KEY'))
  
  if FIELD_ENCRYPTION_KEY is None:
      raise ImproperlyConfigured(
              'FIELD_ENCRYPTION_KEY must be defined in settings')
  
subject: Raise an error in settings.py only when encryption key is None