Now this site has archives!
by mark | 13 Aug 2022, 10:26 p.m.
I was browsing the Django docs and came across date-based views. This piqued my interest as I always wondered how those little calendars of posts were built. Basically built by these things.
Ultimately very easy to use if you more or less follow the documentation. Hardest part was faffing with the templates as {% url %}
and the things used to turn datetime objects into little things like 4 character years are irritating. You can use a with block to define variables like current_year=date|date:"Y"
which are easier to use.
Anyway. The archives. No-one will ever look at these.
No comments
Back to all articles