magic-removal: updated reference to django.models.sites in django.contrib.admin.views.template
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1892 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
945cae9aae
commit
f5bca32553
|
@ -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]),
|
||||
|
|
Loading…
Reference in New Issue