From 08ffe2942eecb9bc0ff240ccbfa6be0b7d6b3ec0 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Wed, 6 Oct 2010 19:02:08 +0000 Subject: [PATCH] web/postkey/models.py: make "name" and "b64hash" fields unique --- web/postkey/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/postkey/models.py b/web/postkey/models.py index 1646097..9edeece 100644 --- a/web/postkey/models.py +++ b/web/postkey/models.py @@ -2,8 +2,8 @@ from django.db import models class i2phost(models.Model): # Hostname limit is 67 characters maximum, including the '.i2p'. - name = models.CharField("I2P hostname", max_length=67) + name = models.CharField("I2P hostname", max_length=67, unique=True) # Maximum key length 616 bytes (to account for certs up to 100 bytes). - b64hash = models.CharField("Base 64 hash", max_length=616) + b64hash = models.CharField("Base 64 hash", max_length=616, unique=True) date_added = models.DateTimeField(auto_now_add=True) activated = models.BooleanField(default=False)