Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #2374 -- Fixed magic-removal API changes in admin template vali…

…dator. Thanks, mattimustang@gmail.com

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3401 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c4679bb83fcae7a3cd47d1d54d2a741e75e4abbd 1 parent be25241
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/contrib/admin/views/template.py
View
4 django/contrib/admin/views/template.py
@@ -22,7 +22,7 @@ def template_validator(request):
new_data = request.POST.copy()
errors = manipulator.get_validation_errors(new_data)
if not errors:
- request.user.add_message('The template is valid.')
+ request.user.message_set.create(message='The template is valid.')
return render_to_response('admin/template_validator.html', {
'title': 'Template validator',
'form': forms.FormWrapper(manipulator, new_data, errors),
@@ -32,7 +32,7 @@ def template_validator(request):
class TemplateValidator(forms.Manipulator):
def __init__(self, settings_modules):
self.settings_modules = settings_modules
- site_list = Site.objects.get_in_bulk(settings_modules.keys()).values()
+ site_list = Site.objects.in_bulk(settings_modules.keys()).values()
self.fields = (
forms.SelectField('site', is_required=True, choices=[(s.id, s.name) for s in site_list]),
forms.LargeTextField('template', is_required=True, rows=25, validator_list=[self.isValidTemplate]),
Please sign in to comment.
Something went wrong with that request. Please try again.