Skip to content

Instantly share code, notes, and snippets.

@imetallica
Created November 15, 2014 01:35
Show Gist options
  • Save imetallica/3856155bdd6a83806207 to your computer and use it in GitHub Desktop.
Save imetallica/3856155bdd6a83806207 to your computer and use it in GitHub Desktop.
from django.db import models
from django.contrib.auth.models import User
class Todo(models.Model):
"""
A Todo dummy class.
"""
created = models.DateTimeField(auto_now_add=True)
author = models.ForeignKey(User)
text = models.CharField(max_length=255)
def __str__(self):
return "Todo: %s" % self.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment