2009-12-19 22:27:26 +08:00
|
|
|
from django.db import models
|
|
|
|
|
2011-10-14 02:04:12 +08:00
|
|
|
|
2009-12-19 22:27:26 +08:00
|
|
|
class Article(models.Model):
|
|
|
|
headline = models.CharField(max_length=100, default='Default headline')
|
|
|
|
pub_date = models.DateTimeField()
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
app_label = 'fixtures_model_package'
|
|
|
|
ordering = ('-pub_date', 'headline')
|
2018-12-28 08:34:14 +08:00
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.headline
|