From 6cdb3c57d812984c4d1d762b680b319dd45e1bf4 Mon Sep 17 00:00:00 2001 From: Joseph Kocherhans Date: Mon, 9 Jan 2006 18:20:06 +0000 Subject: [PATCH] magic-removal: updated (most) dependencies to reflect new location of django.models.core Package and ContentType. git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1887 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/models.py | 4 ++-- django/contrib/auth/models.py | 4 ++-- django/contrib/comments/models.py | 2 +- django/contrib/comments/views/comments.py | 2 +- django/db/models/options.py | 2 +- django/views/defaults.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/django/contrib/admin/models.py b/django/contrib/admin/models.py index 5e1fbc655c..bade1110c0 100644 --- a/django/contrib/admin/models.py +++ b/django/contrib/admin/models.py @@ -1,5 +1,5 @@ from django.db import models -from django.models import core +from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.utils.translation import gettext_lazy as _ @@ -15,7 +15,7 @@ class LogEntryManager(models.Manager): class LogEntry(models.Model): action_time = models.DateTimeField(_('action time'), auto_now=True) user = models.ForeignKey(User) - content_type = models.ForeignKey(core.ContentType, blank=True, null=True) + content_type = models.ForeignKey(ContentType, blank=True, null=True) object_id = models.TextField(_('object id'), blank=True, null=True) object_repr = models.CharField(_('object repr'), maxlength=200) action_flag = models.PositiveSmallIntegerField(_('action flag')) diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 6b5388622e..a23cc4fc2b 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -1,6 +1,6 @@ from django.core import validators from django.db import backend, connection, models -from django.models import core +from django.contrib.contenttypes.models import Package from django.utils.translation import gettext_lazy as _ import datetime @@ -8,7 +8,7 @@ SESSION_KEY = '_auth_user_id' class Permission(models.Model): name = models.CharField(_('name'), maxlength=50) - package = models.ForeignKey(core.Package, db_column='package') + package = models.ForeignKey(Package, db_column='package') codename = models.CharField(_('codename'), maxlength=100) class Meta: verbose_name = _('Permission') diff --git a/django/contrib/comments/models.py b/django/contrib/comments/models.py index 5505b8a26f..f812d89ce8 100644 --- a/django/contrib/comments/models.py +++ b/django/contrib/comments/models.py @@ -1,5 +1,5 @@ from django.db import models -from django.models.core import ContentType +from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.contrib.auth.models import User from django.utils.translation import gettext_lazy as _ diff --git a/django/contrib/comments/views/comments.py b/django/contrib/comments/views/comments.py index 159362be6e..c5e07d171a 100644 --- a/django/contrib/comments/views/comments.py +++ b/django/contrib/comments/views/comments.py @@ -4,7 +4,7 @@ from django.core.exceptions import Http404, ObjectDoesNotExist from django.core.extensions import DjangoContext, render_to_response from django.contrib.auth.models import SESSION_KEY from django.contrib.comments.models import Comment, FreeComment, PHOTOS_REQUIRED, PHOTOS_OPTIONAL, RATINGS_REQUIRED, RATINGS_OPTIONAL, IS_PUBLIC -from django.models.core import ContentType +from django.contrib.contenttypes.models import ContentType from django.parts.auth.formfields import AuthenticationForm from django.utils.httpwrappers import HttpResponseRedirect from django.utils.text import normalize_newlines diff --git a/django/db/models/options.py b/django/db/models/options.py index afe0567a93..986c949ff8 100644 --- a/django/db/models/options.py +++ b/django/db/models/options.py @@ -98,7 +98,7 @@ class Options: def get_content_type_id(self): "Returns the content-type ID for this object type." if not hasattr(self, '_content_type_id'): - from django.models.core import ContentType + from django.contrib.contenttypes.models import ContentType self._content_type_id = ContentType.objects.get_object( python_module_name__exact=self.module_name, package__label__exact=self.app_label).id diff --git a/django/views/defaults.py b/django/views/defaults.py index c6721ab3ef..bfcd5adeba 100644 --- a/django/views/defaults.py +++ b/django/views/defaults.py @@ -1,6 +1,6 @@ from django.core.exceptions import Http404, ObjectDoesNotExist from django.core.template import Context, loader -from django.models.core import ContentType +from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.utils import httpwrappers