facts: add the timestamp back too

This commit is contained in:
Brian S. Stephan 2015-06-20 10:22:49 -05:00
parent 69ca220b5e
commit d507e8f7ac
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('facts', '0003_auto_20150620_1018'),
]
operations = [
migrations.AddField(
model_name='fact',
name='time',
field=models.DateTimeField(default=datetime.datetime(2015, 6, 20, 15, 22, 20, 481856, tzinfo=utc), auto_now_add=True),
preserve_default=False,
),
]

View File

@ -56,6 +56,7 @@ class Fact(models.Model):
fact = models.TextField()
category = models.ForeignKey(FactCategory)
nickmask = models.CharField(max_length=200, default='')
time = models.DateTimeField(auto_now_add=True)
objects = FactManager()