def updateConstant(name,value,fail_silently=False):
<EOL>if '<STR_LIT>' in connection.introspection.table_names() and not isPreliminaryRun():<EOL><INDENT>params = global_preferences_registry.manager()<EOL>try:<EOL><INDENT>params[name] = value<EOL>return True<EOL><DEDENT>except Exception as e:<EOL><INDENT>logger.error('<STR_LIT>' % e)<EOL>if not fail_silently:<EOL><INDENT>raise<EOL><DEDENT>return False<EOL><DEDENT><DEDENT>
This is a convenience function that makes it easy to update the value of a preference/constant
without needing to check if the django_dynamic_preferences app has been set up, without
needing to load from that model directly, and with the option to suppress any errors
(e.g. KeyErrors resulting from the order in which apps are loaded).