From 4d2584dee47d4cb80fb509050e8f4477bd97b82b Mon Sep 17 00:00:00 2001 From: Joel Lavikainen Date: Sat, 17 Nov 2018 21:45:26 +0200 Subject: [PATCH] Change Tag primary key to id --- webapp/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/models.py b/webapp/models.py index 4638cab..856d00a 100644 --- a/webapp/models.py +++ b/webapp/models.py @@ -20,7 +20,7 @@ VERBOSE_NAME = _('Webapp') class Tag(models.Model): """Model for tag.""" - slug = models.SlugField(primary_key=True) + slug = models.SlugField(unique=True) name = models.CharField(max_length=127) icon = models.ImageField()