mirror of
https://github.com/jazzband/django-constance.git
synced 2026-05-13 01:53:12 +00:00
send message with level SUCCESS instead of INFO
This commit is contained in:
parent
237850b459
commit
5b827dc287
1 changed files with 7 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ from decimal import Decimal
|
|||
from operator import itemgetter
|
||||
|
||||
from django import forms
|
||||
from django.contrib import admin
|
||||
from django.contrib import admin, messages
|
||||
from django.contrib.admin import widgets
|
||||
from django.contrib.admin.options import csrf_protect_m
|
||||
from django.conf.urls.defaults import patterns, url
|
||||
|
|
@ -76,7 +76,12 @@ class ConstanceAdmin(admin.ModelAdmin):
|
|||
form = ConstanceForm(request.POST)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
self.message_user(request, _('Live settings updated successfully.'))
|
||||
# In django 1.5 this can be replaced with self.message_user
|
||||
messages.add_message(
|
||||
request,
|
||||
messages.SUCCESS,
|
||||
_('Live settings updated successfully.'),
|
||||
)
|
||||
return HttpResponseRedirect('.')
|
||||
context = {
|
||||
'config': [],
|
||||
|
|
|
|||
Loading…
Reference in a new issue