Russell Keith-Magee 443423c55f [1.2.X] Migrated basic doctests. Thanks to Preston Timmons for the patch.
Backport of r14421 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14422 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 02:48:43 +00:00

18 lines
413 B
Python

# coding: utf-8
"""
1. Bare-bones model
This is a basic model with only two non-primary-key fields.
"""
from django.db import models, DEFAULT_DB_ALIAS
class Article(models.Model):
headline = models.CharField(max_length=100, default='Default headline')
pub_date = models.DateTimeField()
class Meta:
ordering = ('pub_date','headline')
def __unicode__(self):
return self.headline