From c4679bb83fcae7a3cd47d1d54d2a741e75e4abbd Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Thu, 20 Jul 2006 20:16:03 +0000 Subject: [PATCH] Fixed #2374 -- Fixed magic-removal API changes in admin template validator. Thanks, mattimustang@gmail.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@3401 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/views/template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/contrib/admin/views/template.py b/django/contrib/admin/views/template.py index f73b9e4218..1684870842 100644 --- a/django/contrib/admin/views/template.py +++ b/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 @@ template_validator = staff_member_required(template_validator) 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]),