Show More
@@ -26,8 +26,6 b' import logging' | |||
|
26 | 26 | import traceback |
|
27 | 27 | import collections |
|
28 | 28 | |
|
29 | from datetime import datetime | |
|
30 | ||
|
31 | 29 | from pylons.i18n.translation import _ |
|
32 | 30 | from pyramid.threadlocal import get_current_registry, get_current_request |
|
33 | 31 | from sqlalchemy.sql.expression import null |
@@ -35,7 +33,6 b' from sqlalchemy.sql.functions import coa' | |||
|
35 | 33 | |
|
36 | 34 | from rhodecode.lib import helpers as h, diffs, channelstream |
|
37 | 35 | from rhodecode.lib import audit_logger |
|
38 | from rhodecode.lib.channelstream import channelstream_request | |
|
39 | 36 | from rhodecode.lib.utils2 import extract_mentioned_users, safe_str |
|
40 | 37 | from rhodecode.model import BaseModel |
|
41 | 38 | from rhodecode.model.db import ( |
@@ -72,10 +69,10 b' class CommentsModel(BaseModel):' | |||
|
72 | 69 | return user_objects |
|
73 | 70 | |
|
74 | 71 | def _get_renderer(self, global_renderer='rst'): |
|
72 | request = get_current_request() | |
|
73 | ||
|
75 | 74 | try: |
|
76 | # try reading from visual context | |
|
77 | from pylons import tmpl_context | |
|
78 | global_renderer = tmpl_context.visual.default_renderer | |
|
75 | global_renderer = request.call_context.visual.default_renderer | |
|
79 | 76 | except AttributeError: |
|
80 | 77 | log.debug("Renderer not set, falling back " |
|
81 | 78 | "to default renderer '%s'", global_renderer) |
General Comments 0
You need to be logged in to leave comments.
Login now