Skip to content

Instantly share code, notes, and snippets.

@mstepniowski
Created March 29, 2009 21:12
Show Gist options
  • Save mstepniowski/87523 to your computer and use it in GitHub Desktop.
Save mstepniowski/87523 to your computer and use it in GitHub Desktop.
from django.db import models
from django.contrib.auth.models import User
class Gallery(models.Model):
title = models.CharField( max_length=80)
owner = models.ForeignKey(User)
created_at = models.DateTimeField(auto_now_add=True)
class Meta:
ordering = ['title', 'created_at']
verbose_name, verbose_name_plural = "gallery", "galleries"
def __unicode__(self):
return self.title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment