Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions smap_app/smap/migrations/0004_sumari_created_at.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-02-19 04:51
from __future__ import unicode_literals

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

dependencies = [
('smap', '0003_auto_20170115_0336'),
]

operations = [
migrations.AddField(
model_name='sumari',
name='created_at',
field=models.DateTimeField(auto_created=True, default=django.utils.timezone.now),
preserve_default=False,
),
]
20 changes: 20 additions & 0 deletions smap_app/smap/migrations/0005_sumari_updated_at.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-02-19 04:52
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('smap', '0004_sumari_created_at'),
]

operations = [
migrations.AddField(
model_name='sumari',
name='updated_at',
field=models.DateTimeField(auto_now=True),
),
]
2 changes: 2 additions & 0 deletions smap_app/smap/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def __str__(self):


class Sumari(models.Model):
created_at = models.DateTimeField(auto_created=True)
updated_at = models.DateTimeField(auto_now=True)
tags = models.ManyToManyField(Tag)
name = models.CharField(max_length=32)
message = models.CharField(max_length=140)
Expand Down