Skip to content

Instantly share code, notes, and snippets.

@parvbhullar
Last active August 19, 2019 13:54
Show Gist options
  • Save parvbhullar/ecd5a32f6eb8c84337d4899f3111844d to your computer and use it in GitHub Desktop.
Save parvbhullar/ecd5a32f6eb8c84337d4899f3111844d to your computer and use it in GitHub Desktop.
ToDo app - Django models.py - Simple model
class ToDo(models.Model):
task_title = models.CharField(max_length=200, default="")
task_description = models.TextField(default="", null=True, blank=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
completed = models.BooleanField(default=False)
def _str_(self):
return self.task_title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment