# HG changeset patch # User Marcin Kuzminski # Date 2018-10-10 07:36:18 # Node ID 99ff31e316905cb9f48d2f8184818ec7400f7b1e # Parent 4d4426524a8d39a64a82a43412fda8bdf36f94fc integrations: use all caps template names. diff --git a/rhodecode/integrations/types/email.py b/rhodecode/integrations/types/email.py --- a/rhodecode/integrations/types/email.py +++ b/rhodecode/integrations/types/email.py @@ -35,7 +35,7 @@ from rhodecode.integrations.types.base i log = logging.getLogger(__name__) -repo_push_template_plaintext = Template(''' +REPO_PUSH_TEMPLATE_PLAINTEXT = Template(''' Commits: % for commit in data['push']['commits']: @@ -46,9 +46,7 @@ Commits: % endfor ''') -## TODO (marcink): think about putting this into a file, or use base.mako email template - -repo_push_template_html = Template(''' +REPO_PUSH_TEMPLATE_HTML = Template(''' @@ -283,13 +281,13 @@ def repo_push_handler(data, settings): branch['name'] for branch in data['push']['branches'])) email_body_plaintext = render_with_traceback( - repo_push_template_plaintext, + REPO_PUSH_TEMPLATE_PLAINTEXT, data=data, subject=subject, instance_url=server_url) email_body_html = render_with_traceback( - repo_push_template_html, + REPO_PUSH_TEMPLATE_HTML, data=data, subject=subject, instance_url=server_url)