def prepend_to_setting(setting_name, value):
 values = getattr(settings, setting_name)
 value = type(values)((value,))
 setattr(settings, setting_name, (value + values))

def prepend_to_setting ( setting_name , value ) : values = getattr ( settings , setting_name ) value = type ( values ) ( ( value , ) ) setattr ( settings , setting_name , ( value + values ) )
insert value at the beginning of a list or tuple setting .