Skip to content

Commit

Permalink
fix some bugs when trying to change values and displaying help messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Torsten Engelbrecht committed Jul 13, 2011
1 parent 0d6324a commit 3cd7464
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dynamicsettings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def set(self, key, value, value_type=None):
dynamic_setting.save()
#refresh the cache
self._get_settings()
return dynamic_setting.value
return True
raise KeyError('Setting "%s" can not be set in the database. If you want to change the setting add it to DYNAMICSETTINGS_INCLUDE_SETTINGS.' % key)

def reset(self, key):
Expand Down
4 changes: 2 additions & 2 deletions dynamicsettings/templates/dynamicsettings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ <h1>Dynamic settings:</h1>
{% for setting in dynamic_settings %}
<tr>
<td>
<b>{{setting.key}}</b>
{% if setting.type == "tuple" or settings.type == "list" or setting.type == "dict" %}
<b>{{setting.key}}</b>
{% if setting.type == "list" or setting.type == "dict" or setting.type == "tuple"%}
<img class="helptext-types-button" title="{% trans 'Why this looks different than in my settings file?'%}" src="{{STATIC_URL}}admin/img/admin/icon-unknown.gif" alt="?" />
{% endif %}
</td>
Expand Down

0 comments on commit 3cd7464

Please sign in to comment.