From c0318ae2080d9e2615bc6327837c6196052e843b Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Tue, 22 Jul 2014 20:58:34 +0200 Subject: [PATCH] Displays drafts in reverse order --- dynastie/models.py | 3 +++ dynastie/views.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dynastie/models.py b/dynastie/models.py index 75d3830..ab3bffd 100755 --- a/dynastie/models.py +++ b/dynastie/models.py @@ -95,6 +95,9 @@ class Blog(models.Model): self.engines.append(globals()['atom']) self.engines.append(globals()['rss']) self.engines.append(globals()['all_posts']) + + def get_engines(self): + return self.engines def copytree(self, src, dst): names = os.listdir(src) diff --git a/dynastie/views.py b/dynastie/views.py index d52d5a5..641f296 100755 --- a/dynastie/views.py +++ b/dynastie/views.py @@ -357,7 +357,7 @@ def view_blog(request, blog_id): cur_page = 0 if cur_page <= 0: - drafts = Draft.objects.filter(blog=b) + drafts = Draft.objects.filter(blog=b).order_by('-creation_date') else: drafts = []