mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-22 12:34:17 +00:00
py-i2phosts-injector: fill date_added field with UTC date
This commit is contained in:
parent
fa93084df3
commit
dcc6699c33
@ -4,6 +4,7 @@ import os
|
||||
import sys
|
||||
import argparse
|
||||
import configobj
|
||||
import datetime
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
@ -90,6 +91,7 @@ for line in f:
|
||||
sys.stdout.write('Adding %s\n' % hostname)
|
||||
host = i2phost(name=hostname, b64hash=base64,
|
||||
description=args.description,
|
||||
date_added=datetime.datetime.utcnow(),
|
||||
activated=False, external=True, approved=approved)
|
||||
host.save()
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user