Created
October 23, 2021 15:45
-
-
Save aliceridgway/aab33c0ad3495b763e6a9a650eb7f1fc to your computer and use it in GitHub Desktop.
Django Todo App - models.py Todo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Todo(models.Model): | |
title = models.CharField(max_length=255) | |
notes = models.TextField(blank=True, null=True) | |
created_on = models.DateTimeField(auto_now_add=True) | |
completed = models.BooleanField(default=False) | |
def __str__(self): | |
return self.title |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment