def save_setting(self, setting_name, value):
setting = self.get_setting(setting_name)<EOL>if setting is None:<EOL><INDENT>setting = models.DashboardWidgetSettings.objects.create(<EOL>widget_name=self.get_name(),<EOL>setting_name=setting_name,<EOL>value=value)<EOL><DEDENT>setting.value = value<EOL>setting.save()<EOL>return setting<EOL>
Saves the setting value into the database.