summaryrefslogtreecommitdiff
path: root/parts/django/tests/modeltests/lookup/models.py
blob: 99eec51aa475ccac7135297578e2706055a8a010 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""
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