def get_safe_settings():
 settings_dict = {}
 for k in dir(settings):
  if k.isupper():
   if HIDDEN_SETTINGS.search(k):
    settings_dict[k] = '********************'
   else:
    settings_dict[k] = getattr(settings, k)
 return settings_dict

def get_safe_settings ( ) : settings_dict = { } for k in dir ( settings ) : if k . isupper ( ) : if HIDDEN_SETTINGS . search ( k ) : settings_dict [ k ] = '********************' else : settings_dict [ k ] = getattr ( settings , k ) return settings_dict
returns a dictionary of the settings module .