Browse Source

postkey/models.py: do not fill date_added automatically

Django uses localtime when using auto_add_now=True, but we wants an UTC
time. So, we will fill this field manually.
pull/1/head
Hidden Z 14 years ago
parent
commit
fa93084df3
  1. 2
      pyi2phosts/postkey/models.py

2
pyi2phosts/postkey/models.py

@ -6,7 +6,7 @@ class i2phost(models.Model):
# 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(auto_now_add=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)
# Scheduled expiration date # Scheduled expiration date

Loading…
Cancel
Save