1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-01-22 04:24:15 +00:00

py-i2phosts-injector: fill date_added field with UTC date

This commit is contained in:
Hidden Z 2010-11-15 19:02:08 +00:00
parent fa93084df3
commit dcc6699c33

View File

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