feat: Translation preparation for blog app
@bmispelon Bit of scope creep at the 11th hour here, but I've added a formats file to allow us to customise the datetime formats.
With this, it'd be good to get this merged before others so that I can then start using named date formats on the other apps.
I don't think adding custom formats works:
>>> from django.template.defaultfilters import date as datefilter
>>> from datetime import datetime
>>> datefilter(datetime.now(), "MONTH_DAY_YEAR_FORMAT")
'Oct-0500Oct.CDT09_ThuAM2024_2024OctoberAMR_October-0500ROctAMCDT'
And I'm not completely convinced about the idea of custom formats either. I get the feeling that having to maintaing a formats file for all the language we might support wouldn't be worth it, when the alternative is to use the existing DATE_FORMAT that Django ships with. Admitedly, it's not 100% the same output as what we had before (the month name is shortened), but I feel that's an acceptable tradeoff.
What do you think?
I don't think adding custom formats works
Oh boy. Here's my first 🤦🏼 moment on this project. I convinced myself last night I was looking at the right pages to see that format.
So I guess that means you can only customise the format of pre-defined formats. I'll just select the most suitable format in each instance then.
Here's hoping to many more 🤦🏻 moments, that just means we're doing exciting things 😁
I didn't know before reviewing your PRs that you could use named formats, so I'm happy to be learning new things.
@marksweb Could you rebase this branch on the latest main and force-push it so it fixes the coveralls failure?