From 78f6164db089d430e9d19bc74b0c3c9e9fc88c04 Mon Sep 17 00:00:00 2001 From: David McCann Date: Thu, 30 Sep 2010 11:02:43 +0300 Subject: [PATCH] made slug the primary key (as it's unique anyway). This allows other apps to load fixed Attributes from fixtures with less chance of colliding with other fixtures in other apps. --- eav/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eav/models.py b/eav/models.py index f2a516b..6ca457d 100644 --- a/eav/models.py +++ b/eav/models.py @@ -174,7 +174,7 @@ class Attribute(models.Model): slug = EavSlugField(_(u"slug"), max_length=50, db_index=True, help_text=_(u"Short unique attribute label"), - unique=True) + primary_key=True) description = models.CharField(_(u"description"), max_length=256, blank=True, null=True,