This is a follow up to the post that added a convenience comment link. This time, we’re adding a small note if a post belongs to a category of our choice. I’m no PHP or WordPress wizard, so this is essentially a note to myself. The code too may be very garden variety, but that’s okay.
Celery’s Django docs use a conversion flag within an f-string: Apparently, that calls the instance’s __repr__ method instead of the usual __str__ method. What’s __repr__? RealPython.com writes: The __str__() and __repr__() methods deal with how objects are presented as strings, so you’ll need to make sure you include at least one of those methods in your class definition. If you ... Continue reading →