Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/hgwebdir_mod.py @ 5976:9f1e6ab76069
templates: move filters to their own module
This eliminates just about all Mercurial dependencies in templater.py
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 31 Jan 2008 14:44:19 -0600 |
parents | f25070ecf334 |
children | 948a41e77902 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py Thu Jan 31 14:44:19 2008 -0600 +++ b/mercurial/hgweb/hgwebdir_mod.py Thu Jan 31 14:44:19 2008 -0600 @@ -8,8 +8,8 @@ import os from mercurial.i18n import gettext as _ -from mercurial import ui, hg, util, templater -from common import ErrorResponse, get_mtime, staticfile, style_map, paritygen, \ +from mercurial import ui, hg, util, templater, templatefilters +from common import ErrorResponse, get_mtime, staticfile, style_map, paritygen,\ get_contact from hgweb_mod import hgweb from request import wsgirequest @@ -266,7 +266,7 @@ if self.stripecount is None: self.stripecount = int(config('web', 'stripes', 1)) mapfile = style_map(templater.templatepath(), style) - tmpl = templater.templater(mapfile, templater.common_filters, + tmpl = templater.templater(mapfile, templatefilters.filters, defaults={"header": header, "footer": footer, "motd": motd,