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.
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).
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.