equal
deleted
inserted
replaced
6 # This software may be used and distributed according to the terms |
6 # This software may be used and distributed according to the terms |
7 # of the GNU General Public License, incorporated herein by reference. |
7 # of the GNU General Public License, incorporated herein by reference. |
8 |
8 |
9 import os |
9 import os |
10 from mercurial.i18n import gettext as _ |
10 from mercurial.i18n import gettext as _ |
11 from mercurial import ui, hg, util, templater |
11 from mercurial import ui, hg, util, templater, templatefilters |
12 from common import ErrorResponse, get_mtime, staticfile, style_map, paritygen, \ |
12 from common import ErrorResponse, get_mtime, staticfile, style_map, paritygen,\ |
13 get_contact |
13 get_contact |
14 from hgweb_mod import hgweb |
14 from hgweb_mod import hgweb |
15 from request import wsgirequest |
15 from request import wsgirequest |
16 |
16 |
17 # This is a stopgap |
17 # This is a stopgap |
264 if 'style' in req.form: |
264 if 'style' in req.form: |
265 style = req.form['style'][0] |
265 style = req.form['style'][0] |
266 if self.stripecount is None: |
266 if self.stripecount is None: |
267 self.stripecount = int(config('web', 'stripes', 1)) |
267 self.stripecount = int(config('web', 'stripes', 1)) |
268 mapfile = style_map(templater.templatepath(), style) |
268 mapfile = style_map(templater.templatepath(), style) |
269 tmpl = templater.templater(mapfile, templater.common_filters, |
269 tmpl = templater.templater(mapfile, templatefilters.filters, |
270 defaults={"header": header, |
270 defaults={"header": header, |
271 "footer": footer, |
271 "footer": footer, |
272 "motd": motd, |
272 "motd": motd, |
273 "url": url, |
273 "url": url, |
274 "staticurl": staticurl}) |
274 "staticurl": staticurl}) |