From 7049fae4b2fe882b3ed2a258913b9ae0727ea045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 1 Mar 2012 10:37:44 +0100 Subject: [PATCH] Code should be unique --- lang/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/models.py b/lang/models.py index a2ab9dafe..c713f2d83 100644 --- a/lang/models.py +++ b/lang/models.py @@ -1,7 +1,7 @@ from django.db import models class Language(models.Model): - code = models.SlugField(db_index = True) + code = models.SlugField(unique = True) name = models.CharField(max_length = 100) nplurals = models.SmallIntegerField(default = 0) pluralequation = models.CharField(max_length = 255, blank = True)