facts: add the timestamp back too
This commit is contained in:
parent
69ca220b5e
commit
d507e8f7ac
22
dr_botzo/facts/migrations/0004_fact_time.py
Normal file
22
dr_botzo/facts/migrations/0004_fact_time.py
Normal 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,
|
||||
),
|
||||
]
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user