diff --git a/django/contrib/admin/views/template.py b/django/contrib/admin/views/template.py index 3effd57c10..33f0e7662f 100644 --- a/django/contrib/admin/views/template.py +++ b/django/contrib/admin/views/template.py @@ -3,7 +3,7 @@ from django.core import formfields, validators from django.core import template from django.core.template import loader from django.core.extensions import DjangoContext, render_to_response -from django.models.core import sites +from django.contrib.sites.models import Site from django.conf import settings def template_validator(request): @@ -32,7 +32,7 @@ template_validator = staff_member_required(template_validator) class TemplateValidator(formfields.Manipulator): def __init__(self, settings_modules): self.settings_modules = settings_modules - site_list = sites.get_in_bulk(settings_modules.keys()).values() + site_list = Site.objects.get_in_bulk(settings_modules.keys()).values() self.fields = ( formfields.SelectField('site', is_required=True, choices=[(s.id, s.name) for s in site_list]), formfields.LargeTextField('template', is_required=True, rows=25, validator_list=[self.isValidTemplate]),