From 6f997ab1b5221bb26b35e192e6e212814d1298bb Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 5 Apr 2011 12:49:20 +0200 Subject: [PATCH] names are unique --- pandora/person/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandora/person/models.py b/pandora/person/models.py index 41f78303..392d9af0 100644 --- a/pandora/person/models.py +++ b/pandora/person/models.py @@ -15,9 +15,8 @@ def get_name_sort(name): name_sort = unicodedata.normalize('NFKD', person.name_sort) return name_sort - class Person(models.Model): - name = models.CharField(max_length=200) + name = models.CharField(max_length=200, unique=True) name_sort = models.CharField(max_length=200) #FIXME: how to deal with aliases