|
|
@ -1,11 +1,12 @@ |
|
|
|
from django.db import models |
|
|
|
from django.db import models |
|
|
|
|
|
|
|
from django.utils.translation import ugettext_lazy as _ |
|
|
|
|
|
|
|
|
|
|
|
class i2phost(models.Model): |
|
|
|
class i2phost(models.Model): |
|
|
|
# Hostname limit is 67 characters maximum, including the '.i2p'. |
|
|
|
# Hostname limit is 67 characters maximum, including the '.i2p'. |
|
|
|
name = models.CharField("I2P hostname", max_length=67, unique=True) |
|
|
|
name = models.CharField(_('I2P hostname'), max_length=67, unique=True) |
|
|
|
# Maximum key length 616 bytes (to account for certs up to 100 bytes). |
|
|
|
# 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) |
|
|
|
description = models.CharField("Description", max_length=4096, blank=True) |
|
|
|
description = models.CharField(_('Description'), max_length=4096, blank=True) |
|
|
|
date_added = models.DateTimeField(null=True, blank=True) |
|
|
|
date_added = models.DateTimeField(null=True, blank=True) |
|
|
|
# Last time this host was up |
|
|
|
# Last time this host was up |
|
|
|
last_seen = models.DateTimeField(null=True, blank=True) |
|
|
|
last_seen = models.DateTimeField(null=True, blank=True) |
|
|
|