def validate_settings():
 if (settings.DEBUG or settings.IN_TEST_SUITE):
  return
 for (key, value) in [('SECRET_KEY', 'please change this'), ('SESSION_COOKIE_SECURE', False), ('APP_PURCHASE_SECRET', 'please change this')]:
  if (getattr(settings, key) == value):
   raise ImproperlyConfigured('{0} must be changed from default'.format(key))
 for key in ('CSP_SCRIPT_SRC',):
  for url in getattr(settings, key):
   if (url.startswith('http://') and (url != settings.SITE_URL)):
    raise ImproperlyConfigured('{0} has a http URL: {1}'.format(key, url))

def validate_settings ( ) : if ( settings . DEBUG or settings . IN_TEST_SUITE ) : return for ( key , value ) in [ ( 'SECRET_KEY' , 'please change this' ) , ( 'SESSION_COOKIE_SECURE' , False ) , ( 'APP_PURCHASE_SECRET' , 'please change this' ) ] : if ( getattr ( settings , key ) == value ) : raise ImproperlyConfigured ( '{0} must be changed from default' . format ( key ) ) for key in ( 'CSP_SCRIPT_SRC' , ) : for url in getattr ( settings , key ) : if ( url . startswith ( 'http://' ) and ( url != settings . SITE_URL ) ) : raise ImproperlyConfigured ( '{0} has a http URL: {1}' . format ( key , url ) )
validate that if not in debug mode .