def cleanse_setting(key, value):
    try:
        if HIDDEN_SETTINGS.search(key):
            cleansed = CLEANSED_SUBSTITUTE
        else:
            if isinstance(value, dict):
                cleansed = dict((k, cleanse_setting(k, v)) for k,v in value.items())
            else:
                cleansed = value
    except TypeError:
        # If the key isn't regex-able, just return as-is.
        cleansed = value
    return cleansed
Cleanse an individual setting key/value of sensitive content.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/views/debug.py/cleanse_setting