Day 23 Dev Notes

Once again, my AI friend has helped me out in a really unexpected and amazing way. For the last few nights, I've been adding new template tags to access various elements of the Post. My thinking is that you shouldn't need to know the field names of the model, you should just be able to type {% post_author %} to get the author, or, {% post_date %} to get the date.

But up until now, I thought that the only way I could do this, was to pass the Post object as the parameter so that the template tag knew which post author or date we're wanting. So the code ended up looking this: {% post_author post %} to get the author, or {% post_date post %} to get the date.

Read more

Posted on May 16, 2024 by

Categories: Development