mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Marked a few strings for translation and localize the values passed to the changelist.
This commit is contained in:
parent
9603e0573b
commit
44cc2be494
1 changed files with 5 additions and 5 deletions
|
|
@ -71,12 +71,12 @@ class ConstanceAdmin(admin.ModelAdmin):
|
|||
form = ConstanceForm(request.POST)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
self.message_user(request, 'Live settings updated successfully.')
|
||||
return HttpResponseRedirect('#')
|
||||
self.message_user(request, _('Live settings updated successfully.'))
|
||||
return HttpResponseRedirect('.')
|
||||
context = {
|
||||
'config': [],
|
||||
'root_path': self.admin_site.root_path,
|
||||
'title': 'Live settings',
|
||||
'title': _('Constance config'),
|
||||
'app_label': 'constance',
|
||||
'opts': Config._meta,
|
||||
'form': form,
|
||||
|
|
@ -86,9 +86,9 @@ class ConstanceAdmin(admin.ModelAdmin):
|
|||
value = getattr(config, name)
|
||||
context['config'].append({
|
||||
'name': name,
|
||||
'default': default,
|
||||
'default': localize(default),
|
||||
'help_text': help_text,
|
||||
'value': getattr(config, name),
|
||||
'value': localize(value),
|
||||
'form_field': form[name]
|
||||
})
|
||||
context['config'].sort(key=itemgetter('name'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue