# HG changeset patch # User Marcin Kuzminski # Date 2013-03-02 15:27:56 # Node ID 043d3827cd8856929b980b74a9278ec89e4a7644 # Parent b5ce72167906a67211c4bacba9600be454e034f5 added template context into Notification templates diff --git a/rhodecode/model/notification.py b/rhodecode/model/notification.py --- a/rhodecode/model/notification.py +++ b/rhodecode/model/notification.py @@ -28,6 +28,7 @@ import os import logging import traceback +from pylons import tmpl_context as c from pylons.i18n.translation import _ import rhodecode @@ -272,7 +273,8 @@ class EmailNotificationModel(BaseModel): email_template = self._tmpl_lookup.get_template(base) # translator and helpers inject _kwargs = {'_': _, - 'h': h} + 'h': h, + 'c': c} _kwargs.update(kwargs) log.debug('rendering tmpl %s with kwargs %s' % (base, _kwargs)) return email_template.render(**_kwargs)