18 lines
403 B
Python
18 lines
403 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import models
|
|
from django.utils import timezone
|
|
|
|
|
|
class Task(models.Model):
|
|
date = models.DateTimeField(default=timezone.now)
|
|
title = models.CharField(max_length=50)
|
|
if_done = models.BooleanField(default=False)
|
|
|
|
def __unicode__(self):
|
|
return self.title
|
|
|
|
class Meta:
|
|
ordering = ["-date"]
|