1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-01-09 06:18:05 +00:00

web/postkey/models.py: make "name" and "b64hash" fields unique

This commit is contained in:
Hidden Z 2010-10-06 19:02:08 +00:00
parent e21d608b32
commit 08ffe2942e

View File

@ -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)