Fix field warnings for Django 1.8 (with migration)
This commit is contained in:
parent
bfb0820606
commit
0f0505f24d
2 changed files with 26 additions and 2 deletions
24
todo/migrations/0002_auto_20150614_2339.py
Normal file
24
todo/migrations/0002_auto_20150614_2339.py
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import models, migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('todo', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='item',
|
||||||
|
name='created_date',
|
||||||
|
field=models.DateField(auto_now=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='item',
|
||||||
|
name='priority',
|
||||||
|
field=models.PositiveIntegerField(),
|
||||||
|
),
|
||||||
|
]
|
|
@ -42,14 +42,14 @@ class List(models.Model):
|
||||||
class Item(models.Model):
|
class Item(models.Model):
|
||||||
title = models.CharField(max_length=140)
|
title = models.CharField(max_length=140)
|
||||||
list = models.ForeignKey(List)
|
list = models.ForeignKey(List)
|
||||||
created_date = models.DateField(auto_now=True, auto_now_add=True)
|
created_date = models.DateField(auto_now=True)
|
||||||
due_date = models.DateField(blank=True, null=True, )
|
due_date = models.DateField(blank=True, null=True, )
|
||||||
completed = models.BooleanField(default=None)
|
completed = models.BooleanField(default=None)
|
||||||
completed_date = models.DateField(blank=True, null=True)
|
completed_date = models.DateField(blank=True, null=True)
|
||||||
created_by = models.ForeignKey(User, related_name='todo_created_by')
|
created_by = models.ForeignKey(User, related_name='todo_created_by')
|
||||||
assigned_to = models.ForeignKey(User, related_name='todo_assigned_to')
|
assigned_to = models.ForeignKey(User, related_name='todo_assigned_to')
|
||||||
note = models.TextField(blank=True, null=True)
|
note = models.TextField(blank=True, null=True)
|
||||||
priority = models.PositiveIntegerField(max_length=3)
|
priority = models.PositiveIntegerField()
|
||||||
|
|
||||||
# Model method: Has due date for an instance of this object passed?
|
# Model method: Has due date for an instance of this object passed?
|
||||||
def overdue_status(self):
|
def overdue_status(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue