You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
337 B
13 lines
337 B
from django.contrib.auth import get_user_model
|
|
from django.db import models
|
|
|
|
|
|
class Task(models.Model):
|
|
title = models.CharField(max_length=200)
|
|
description = models.TextField()
|
|
is_done = models.BooleanField(default=False)
|
|
user = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
|
|
|
|
def __str__(self):
|
|
return self.title
|