PageRenderTime 161ms CodeModel.GetById 81ms app.highlight 1ms RepoModel.GetById 59ms app.codeStats 0ms

/tests/modeltests/pagination/models.py

https://code.google.com/p/mango-py/
Python | 17 lines | 6 code | 4 blank | 7 comment | 0 complexity | e7bb431541ea6e6bebc8616ee120aa3e MD5 | raw file
 1"""
 230. Object pagination
 3
 4Django provides a framework for paginating a list of objects in a few lines
 5of code. This is often useful for dividing search results or long lists of
 6objects into easily readable pages.
 7"""
 8
 9from django.db import models
10
11
12class Article(models.Model):
13    headline = models.CharField(max_length=100, default='Default headline')
14    pub_date = models.DateTimeField()
15
16    def __unicode__(self):
17        return self.headline