ismail-s / fireblog

A basic blog (in Python)
https://ismail-s.github.io/fireblog
GNU General Public License v2.0
0 stars 0 forks source link

Add sorting to multiple post display #79

Closed ismail-s closed 8 years ago

ismail-s commented 8 years ago
ismail-s commented 8 years ago

Whilst working on this, I have made it so that the tag view page, by default, displays the newest post first. Previously, the sorting was oldest post first. Making this change brings both view_all_posts and tag_view together in having the same behaviour.

ismail-s commented 8 years ago

I have found and corrected a very subtle bug in some of the tests. Essentially, I was doing something like range(5, 10, -1) instead of range(10, 5, -1). As I was iterating over this (essentially), I ended up iterating over nothing resulting in the tests silently passing. And if that wasn't enough, the numbers passed to range were also incorrect, and took some time to correct.