diff --git a/rhodecode/apps/admin/views/users.py b/rhodecode/apps/admin/views/users.py --- a/rhodecode/apps/admin/views/users.py +++ b/rhodecode/apps/admin/views/users.py @@ -126,7 +126,7 @@ class AdminUsersView(BaseAppView, DataGr users_data = [] for user in users_list: users_data.append({ - "username": h.gravatar_with_user(user.username), + "username": h.gravatar_with_user(self.request, user.username), "email": user.email, "first_name": user.first_name, "last_name": user.last_name, diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -923,9 +923,8 @@ def person_by_id(id_, show_attr="usernam return id_ -def gravatar_with_user(author, show_disabled=False): - from rhodecode.lib.utils import PartialRenderer - _render = PartialRenderer('base/base.mako') +def gravatar_with_user(request, author, show_disabled=False): + _render = request.get_partial_renderer('base/base.mako') return _render('gravatar_with_user', author, show_disabled=show_disabled) diff --git a/rhodecode/model/scm.py b/rhodecode/model/scm.py --- a/rhodecode/model/scm.py +++ b/rhodecode/model/scm.py @@ -442,7 +442,7 @@ class ScmModel(BaseModel): f_path = os.path.normpath(f_path) return f_path - def get_dirnode_metadata(self, commit, dir_node): + def get_dirnode_metadata(self, request, commit, dir_node): if not dir_node.is_dir(): return [] @@ -463,7 +463,8 @@ class ScmModel(BaseModel): 'short_id': last_commit.short_id, 'message': h.escape(last_commit.message), 'author': h.escape(last_commit.author), - 'user_profile': h.gravatar_with_user(last_commit.author), + 'user_profile': h.gravatar_with_user( + request, last_commit.author), }) return data diff --git a/rhodecode/templates/codeblocks/source.mako b/rhodecode/templates/codeblocks/source.mako --- a/rhodecode/templates/codeblocks/source.mako +++ b/rhodecode/templates/codeblocks/source.mako @@ -18,7 +18,7 @@