diff mercurial/hgweb/hgwebdir_mod.py @ 7966:aa983c3d94a9

templater: move stylemap function from hgweb to templater
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Sat, 04 Apr 2009 17:46:11 +0200
parents de377b1a9a84
children 6b5522cb2ad2
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py	Sat Apr 04 10:51:52 2009 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Sat Apr 04 17:46:11 2009 +0200
@@ -9,7 +9,7 @@
 import os
 from mercurial.i18n import _
 from mercurial import ui, hg, util, templater, templatefilters, error, encoding
-from common import ErrorResponse, get_mtime, staticfile, style_map, paritygen,\
+from common import ErrorResponse, get_mtime, staticfile, paritygen,\
                    get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
 from hgweb_mod import hgweb
 from request import wsgirequest
@@ -317,7 +317,7 @@
             style = req.form['style'][0]
         if self.stripecount is None:
             self.stripecount = int(config('web', 'stripes', 1))
-        mapfile = style_map(templater.templatepath(), style)
+        mapfile = templater.stylemap(style)
         tmpl = templater.templater(mapfile, templatefilters.filters,
                                    defaults={"header": header,
                                              "footer": footer,