Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored July 20, 2006

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/contrib/admin/views/template.py
4  django/contrib/admin/views/template.py
@@ -22,7 +22,7 @@ def template_validator(request):
22 22
         new_data = request.POST.copy()
23 23
         errors = manipulator.get_validation_errors(new_data)
24 24
         if not errors:
25  
-            request.user.add_message('The template is valid.')
  25
+            request.user.message_set.create(message='The template is valid.')
26 26
     return render_to_response('admin/template_validator.html', {
27 27
         'title': 'Template validator',
28 28
         'form': forms.FormWrapper(manipulator, new_data, errors),
@@ -32,7 +32,7 @@ def template_validator(request):
32 32
 class TemplateValidator(forms.Manipulator):
33 33
     def __init__(self, settings_modules):
34 34
         self.settings_modules = settings_modules
35  
-        site_list = Site.objects.get_in_bulk(settings_modules.keys()).values()
  35
+        site_list = Site.objects.in_bulk(settings_modules.keys()).values()
36 36
         self.fields = (
37 37
             forms.SelectField('site', is_required=True, choices=[(s.id, s.name) for s in site_list]),
38 38
             forms.LargeTextField('template', is_required=True, rows=25, validator_list=[self.isValidTemplate]),

0 notes on commit c4679bb

Please sign in to comment.
Something went wrong with that request. Please try again.