Fix a bug : take last posts and not first if there is no new posts with the current year
This commit is contained in:
		| @@ -359,7 +359,7 @@ class Index(DynastieGenerator): | ||||
|         posts = Post.objects.filter(creation_date__year=cur_year, published=True, front_page=True).order_by('-creation_date') | ||||
|  | ||||
|         if posts.count() < self.posts_per_page: | ||||
|             posts = Post.objects.all()[:self.posts_per_page] | ||||
|             posts = Post.objects.all().order_by('-creation_date')[:self.posts_per_page] | ||||
|  | ||||
|         self.dirname = '' | ||||
|         self.generatePages(dom, posts, src, output, 'index') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user