PageRenderTime 22ms CodeModel.GetById 12ms RepoModel.GetById 0ms 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
Possible License(s): BSD-3-Clause
  1. from django.db import models
  2. class Article(models.Model):
  3. headline = models.CharField(max_length=100, default='Default headline')
  4. pub_date = models.DateTimeField()
  5. def __unicode__(self):
  6. return self.headline
  7. class Meta:
  8. ordering = ('-pub_date', 'headline')