You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
300 B
12 lines
300 B
|
13 years ago
|
from django.db import models
|
||
|
|
|
||
|
|
class Article(models.Model):
|
||
|
|
headline = models.CharField(max_length=100, default='Default headline')
|
||
|
|
pub_date = models.DateTimeField()
|
||
|
|
|
||
|
|
def __unicode__(self):
|
||
|
|
return self.headline
|
||
|
|
|
||
|
|
class Meta:
|
||
|
|
ordering = ('-pub_date', 'headline')
|
||
|
|
|