Browse Source

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

pull/1/head
Hidden Z 14 years ago
parent
commit
dcc6699c33
  1. 2
      py-i2phosts-injector

2
py-i2phosts-injector

@ -4,6 +4,7 @@ import os
import sys import sys
import argparse import argparse
import configobj import configobj
import datetime
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
@ -90,6 +91,7 @@ for line in f:
sys.stdout.write('Adding %s\n' % hostname) sys.stdout.write('Adding %s\n' % hostname)
host = i2phost(name=hostname, b64hash=base64, host = i2phost(name=hostname, b64hash=base64,
description=args.description, description=args.description,
date_added=datetime.datetime.utcnow(),
activated=False, external=True, approved=approved) activated=False, external=True, approved=approved)
host.save() host.save()
else: else:

Loading…
Cancel
Save