##// END OF EJS Templates
templates: make sure we don't call register routes if this function is not defined....
templates: make sure we don't call register routes if this function is not defined. - prevents simple JS errors on 4XX and 5XX pages.

File last commit:

r1282:90601d74 default
r1889:649e3ef9 default
Show More
plugins_base.mako
11 lines | 478 B | application/x-mako | MakoHtmlLexer
<%
from pyramid.renderers import render as pyramid_render
from pyramid.threadlocal import get_current_registry, get_current_request
pyramid_registry = get_current_registry()
%>
% for plugin, config in getattr(pyramid_registry, 'rhodecode_plugins', {}).items():
% if config['template_hooks'].get('plugin_init_template'):
${pyramid_render(config['template_hooks'].get('plugin_init_template'),
{'config':config}, request=get_current_request(), package='rc_ae')|n}
% endif
% endfor