Show More
@@ -833,12 +833,14 b' class TemplateNotFound(util.Abort):' | |||||
833 |
|
833 | |||
834 | class templater(object): |
|
834 | class templater(object): | |
835 |
|
835 | |||
836 |
def __init__(self, mapfile, filters= |
|
836 | def __init__(self, mapfile, filters=None, defaults={}, cache={}, | |
837 | minchunk=1024, maxchunk=65536): |
|
837 | minchunk=1024, maxchunk=65536): | |
838 | '''set up template engine. |
|
838 | '''set up template engine. | |
839 | mapfile is name of file to read map definitions from. |
|
839 | mapfile is name of file to read map definitions from. | |
840 | filters is dict of functions. each transforms a value into another. |
|
840 | filters is dict of functions. each transforms a value into another. | |
841 | defaults is dict of default map definitions.''' |
|
841 | defaults is dict of default map definitions.''' | |
|
842 | if filters is None: | |||
|
843 | filters = {} | |||
842 | self.mapfile = mapfile or 'template' |
|
844 | self.mapfile = mapfile or 'template' | |
843 | self.cache = cache.copy() |
|
845 | self.cache = cache.copy() | |
844 | self.map = {} |
|
846 | self.map = {} |
General Comments 0
You need to be logged in to leave comments.
Login now