Skip to content

Instantly share code, notes, and snippets.

@aliceridgway
Created October 23, 2021 15:45
Show Gist options
  • Save aliceridgway/aab33c0ad3495b763e6a9a650eb7f1fc to your computer and use it in GitHub Desktop.
Save aliceridgway/aab33c0ad3495b763e6a9a650eb7f1fc to your computer and use it in GitHub Desktop.
Django Todo App - models.py Todo
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