templates: pass in request where possible to avoid threadglobals

This commit is contained in:
RhodeCode Admin 2023-07-18 09:43:05 +02:00
parent bd0ca52ef4
commit 61376a296a
2 changed files with 2 additions and 2 deletions

View file

@ -233,7 +233,7 @@
with a better solution at some point.
</%doc>
<img class="${gravatar_class}" height="${size}" width="${size}" data-hovercard-url="${data_hovercard_url}" data-hovercard-alt="${data_hovercard_alt}" src="${h.gravatar_url(email, size * 2)}" />
<img class="${gravatar_class}" height="${size}" width="${size}" data-hovercard-url="${data_hovercard_url}" data-hovercard-alt="${data_hovercard_alt}" src="${h.gravatar_url(email, size * 2, request=request)}" />
</%def>

View file

@ -160,7 +160,7 @@
},
comment_version: "${comment_history.version}",
comment_author_username: "${comment_history.author.username}",
comment_author_gravatar: "${h.gravatar_url(comment_history.author.email, 16)}",
comment_author_gravatar: "${h.gravatar_url(comment_history.author.email, 16, request=request)}",
comment_created_on: '${h.age_component(comment_history.created_on, time_is_local=True)}',
},
% endfor