PageRenderTime 383ms CodeModel.GetById 181ms app.highlight 2ms RepoModel.GetById 199ms app.codeStats 0ms

/tests/regressiontests/admin_scripts/models.py

https://code.google.com/p/mango-py/
Python | 12 lines | 8 code | 4 blank | 0 comment | 0 complexity | 95def5494caff3cae100d8f7701e788b MD5 | raw file
 1from django.db import models
 2
 3class Article(models.Model):
 4    headline = models.CharField(max_length=100, default='Default headline')
 5    pub_date = models.DateTimeField()
 6
 7    def __unicode__(self):
 8        return self.headline
 9
10    class Meta:
11        ordering = ('-pub_date', 'headline')
12