utils.py 882B

12345678910111213141516171819202122232425262728293031323334
  1. class SmtpConfiguration(object):
  2. """Container class for SMTP configuration used in Tracim."""
  3. def __init__(self, server: str, port: int, login: str, password: str):
  4. self.server = server
  5. self.port = port
  6. self.login = login
  7. self.password = password
  8. class EST(object):
  9. """
  10. EST = Email Subject Tags - this is a convenient class - no business logic
  11. here
  12. This class is intended to agregate all dynamic content that may be included
  13. in email subjects
  14. """
  15. WEBSITE_TITLE = '{website_title}'
  16. WORKSPACE_LABEL = '{workspace_label}'
  17. CONTENT_LABEL = '{content_label}'
  18. CONTENT_STATUS_LABEL = '{content_status_label}'
  19. @classmethod
  20. def all(cls):
  21. return [
  22. cls.CONTENT_LABEL,
  23. cls.CONTENT_STATUS_LABEL,
  24. cls.WEBSITE_TITLE,
  25. cls.WORKSPACE_LABEL
  26. ]