def suit_conf_value(name, model_admin=None): if model_admin: value_by_ma = getattr(model_admin, 'suit_%s' % name.lower(), None) if value_by_ma in ('center', 'right'): config.set_config_value(name, value_by_ma) else: config.reset_config_value(name) return suit_conf(name)