diff --git a/dr_botzo/facts/migrations/0004_fact_time.py b/dr_botzo/facts/migrations/0004_fact_time.py new file mode 100644 index 0000000..e36483a --- /dev/null +++ b/dr_botzo/facts/migrations/0004_fact_time.py @@ -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, + ), + ] diff --git a/dr_botzo/facts/models.py b/dr_botzo/facts/models.py index 0f36f2a..672c1bf 100644 --- a/dr_botzo/facts/models.py +++ b/dr_botzo/facts/models.py @@ -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()