Implement pagination for news archive
authorMagnus Hagander <magnus@hagander.net>
Sat, 26 Sep 2020 13:13:55 +0000 (15:13 +0200)
committerMagnus Hagander <magnus@hagander.net>
Sat, 26 Sep 2020 13:13:55 +0000 (15:13 +0200)
commitf943e1fdaff04b9af1349fa4c9c53290f77a7943
treeca4db20d4a1061dd88ce1942082e8860af2cb855
parenta9dcfa85f7efffd25448ac158ca6a197929de673
Implement pagination for news archive

For now we do 10 items per page, but that's easy to adjust.

Paginate based on the date (so create an index on the date field to
simplify this), making page rendering and load a *lot* faster.
pgweb/news/migrations/0007_news_date_idx.py [new file with mode: 0644]
pgweb/news/models.py
pgweb/news/views.py
pgweb/urls.py
templates/news/newsarchive.html