Write-For-Change / emaildrafter

An app to let people draft personalised emails for a good cause
GNU General Public License v3.0
10 stars 3 forks source link

Object representation for Email Templates and integration with MongoDB #34

Closed davidswarbrick closed 4 years ago

davidswarbrick commented 4 years ago

Rewritten most of emailtemplates.py to use a nice OOP setup that we can construct from python dictionaries stored in the database. Some functions are only templates for now, but the structure presented here allows easy inclusion of more advanced validation and dealing with newline issues (for example).

This should replace #19 once the script to store MP data (including political party) has been copied across.

davidswarbrick commented 4 years ago

Current templates are now in the database, and testing on a local machine confirms no changes for a user (but would of course appreciate others testing too before a final merge).