From 3a1cc653221a184a665927c6c7e2f9fb2f7a0cd7 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Sat, 4 Mar 2006 00:53:52 +0000 Subject: [PATCH] magic-removal: Fixed uniqueness constraint on ContentType model. git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2486 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/contenttypes/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/contrib/contenttypes/models.py b/django/contrib/contenttypes/models.py index e369ec344e..eb6029e7d4 100644 --- a/django/contrib/contenttypes/models.py +++ b/django/contrib/contenttypes/models.py @@ -22,13 +22,14 @@ class ContentTypeManager(models.Manager): class ContentType(models.Model): name = models.CharField(maxlength=100) app_label = models.CharField(maxlength=100) - model = models.CharField(_('python model class name'), maxlength=100, unique=True) + model = models.CharField(_('python model class name'), maxlength=100) objects = ContentTypeManager() class Meta: verbose_name = _('content type') verbose_name_plural = _('content types') db_table = 'django_content_type' ordering = ('name',) + unique_together = (('app_label', 'model'),) def __repr__(self): return self.name