2024-11-22-Friday


created: 2024-11-22 05:23 tags: - daily-notes


Friday, November 22, 2024

<< Timestamps/2024/11-November/2024-11-21-Thursday|Yesterday | Timestamps/2024/11-November/2024-11-23-Saturday|Tomorrow >>


🎯 Goal

  • [x] Configure the blog post subscription notification email so that when blog posts go from inactive to active a notification is sent to all BlogSubscribers.

🌟 Results

  • Successfully configured the full workflow of the blog post subscription feature for the blog app, closing out the blog post subscription issue .

🌱 Next Time


📝 Notes

Yesterday I successfully configured the subscription feature to the Blog App. This creates an email list that wants to be mailed upon the release of a new blog post.

I decided to use Celery with Redis to help schedule the email sending task Asynchronously. I overrode the save() method of the Post Django Model in the Blog App so that upon saving a post that was now marked as is_active (and whose sub alert was not blocked with a new sub_alert feature), a mass email was sent to users informing them about the post.

I pushed these changes to Production and thankfully the email sent! I made some minor tweaks to the email but it was nice to see the subscriber email functionality working as intended.

The main issue here is that I don't have a way to configure / save this when developing the DIMMiN Blog on my local, however if I turn off the sub_alert on my local I should be able to save without sending an email alert. This may actually be a good thing because I don't want to send an email / sub alert when working on my Local Version. I double-checked this and found that it works fine as long as I don't do sub alerts on local (which is exactly the behavior I want). So this seems to sort itself.

Next I wanted to start thinking about user blog post interaction. Specifically, users with accounts in the Accounts App should be able to like a Blog Post and leave a comment about the post. I asked ChatGPT about this and I liked the structure it suggested. It suggested to create a Like and Comment Django Model that handles the interactions between the Post model of the Blog App and the Account model of the Accounts App.


Notes created today

List FROM "" WHERE file.cday = date("2024-11-22") SORT file.ctime asc

Notes last touched today

List FROM "" WHERE file.mday = date("2024-11-22") SORT file.mtime asc

(Template referenced from Dann Berg, can be found here)


Previous Note 2024-11-21-Thursday Next Note 2024-12-03-Tuesday