OoriData / BSW4ClimateCon

BSW for ClimateCon!
https://bsw-4-climate-con.vercel.app
Apache License 2.0
4 stars 0 forks source link

Message of the Day from the Devs in the email template #10

Closed choccccy closed 2 months ago

choccccy commented 3 months ago

A message from us to be included in each email that gets sent out. this should probably be done through the database, where we put a message in the DB, and that gets populated into a "dev MotD" section of the email

choccccy commented 2 months ago

@Aidan-Reese has gotten a system working for the email (template) side of things, but it is still currently pulling the MotD from a developer_message.txt file. This solution is particularly unideal to work with once the thing has been containerized. Instead, we should grab the MotD from the database where we store the currently existing news articles.

proposed structure for that table: Column Type
date_posted date
message text
date_sent date NULL

This table should follow our current table naming convention, where it grabs the DB_PREFIX and DB_VERSION to construct a table name such as climate_v0_1_0_motd. All of that should be built in climate_pg.py. (keep in mind that right now there is a dummy DataDB style MotD table being setup; that needs to go away!)

Aidan-Reese commented 2 months ago

DB now has the ability to hold and supply messages from the dev. When the DB doesn't supply a message then the email will ignore the whole subject box.

You can add developer messages though adminer.

Closing ticket