1
0
mirror of https://github.com/django/django.git synced 2025-10-17 18:59:14 +00:00
Russell Keith-Magee 09ccdde265 [1.2.X] Migrated lookup doctests. Thanks to George Sakkis for the patch.
Backport of r14423 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14424 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 04:38:29 +00:00

17 lines
339 B
Python

"""
7. The lookup API
This demonstrates features of the database API.
"""
from django.db import models
class Article(models.Model):
headline = models.CharField(max_length=100)
pub_date = models.DateTimeField()
class Meta:
ordering = ('-pub_date', 'headline')
def __unicode__(self):
return self.headline