@@ -249,10 +249,9 @@ def context(client, template=None, classname=None, request=None):
249249 The current database, used to access arbitrary database items.
250250
251251 *utils*
252- This is a special class that has its base in the TemplatingUtils
253- class in this file. If the tracker interfaces module defines a
254- TemplatingUtils class then it is mixed in, overriding the methods
255- in the base class.
252+ This is an instance of client.instance.TemplatingUtils, which is
253+ optionally defined in the tracker interfaces module and defaults to
254+ TemplatingUtils class in this file.
256255
257256 *templates*
258257 Access to all the tracker templates by name.
@@ -272,12 +271,6 @@ class in this file. If the tracker interfaces module defines a
272271 methods ``gettext`` and ``ngettext``.
273272
274273 """
275- # construct the TemplatingUtils class
276- utils = TemplatingUtils
277- if (hasattr (client .instance , 'interfaces' ) and
278- hasattr (client .instance .interfaces , 'TemplatingUtils' )):
279- class utils (client .instance .interfaces .TemplatingUtils , utils ):
280- pass
281274
282275 # if template, classname and/or request are not passed explicitely,
283276 # compute form client
@@ -296,7 +289,7 @@ class utils(client.instance.interfaces.TemplatingUtils, utils):
296289 'db' : HTMLDatabase (client ),
297290 'config' : client .instance .config ,
298291 'tracker' : client .instance ,
299- 'utils' : utils (client ),
292+ 'utils' : client . instance . TemplatingUtils (client ),
300293 'templates' : client .instance .templates ,
301294 'template' : template ,
302295 'true' : 1 ,
0 commit comments