Displays drafts in reverse order

This commit is contained in:
Gregory Soutade 2014-07-22 20:58:34 +02:00
parent cce16e031a
commit c0318ae208
2 changed files with 4 additions and 1 deletions

View File

@ -95,6 +95,9 @@ class Blog(models.Model):
self.engines.append(globals()['atom']) self.engines.append(globals()['atom'])
self.engines.append(globals()['rss']) self.engines.append(globals()['rss'])
self.engines.append(globals()['all_posts']) self.engines.append(globals()['all_posts'])
def get_engines(self):
return self.engines
def copytree(self, src, dst): def copytree(self, src, dst):
names = os.listdir(src) names = os.listdir(src)

View File

@ -357,7 +357,7 @@ def view_blog(request, blog_id):
cur_page = 0 cur_page = 0
if cur_page <= 0: if cur_page <= 0:
drafts = Draft.objects.filter(blog=b) drafts = Draft.objects.filter(blog=b).order_by('-creation_date')
else: else:
drafts = [] drafts = []