In Django, how do I set a unique on a columN?

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-04-29T00:50:56Z Indexed on 2010/04/29 0:57 UTC
Read the original article Hit count: 223

Filed under:
|
|
|
class Radio(models.Model):
    title = models.CharField(max_length=2000, blank=True, null=True)
    listeners = models.IntegerField(default = 0, blank=True, null=True)

I don't want duplicate TITLE column. How do I set a unique key?

© Stack Overflow or respective owner

Related posts about python

Related posts about django