diff options
author | luxagraf <sng@luxagraf.net> | 2019-12-07 09:23:21 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2019-12-07 09:23:21 -0500 |
commit | 65699a342f6d35802c49187da55950199cdef0de (patch) | |
tree | 14eea0ace47cdcaf2997f4f73f30a170dd06e6ec /app/normalize/models.py | |
parent | 5ae7a60eec8c560075df97bf1ee82de5853d5579 (diff) |
added pubdate to normalize
Diffstat (limited to 'app/normalize/models.py')
-rw-r--r-- | app/normalize/models.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/normalize/models.py b/app/normalize/models.py index ac36512..bcd8eac 100644 --- a/app/normalize/models.py +++ b/app/normalize/models.py @@ -7,6 +7,11 @@ class RelatedPost(models.Model): entry_id = models.IntegerField() title = models.CharField(max_length=200) slug = models.CharField(max_length=50) + pub_date = models.DateTimeField('Date published') + + class Meta: + ordering = ('model_name', '-pub_date',) + get_latest_by = 'pub_date' def __str__(self): return self.title |