X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=unfold%2Fplugin.py;h=278c362faa05a99e47df7dea9434857f94f6ef54;hb=f98463b2e5d7b2809fe8741b115602089f54b090;hp=178cbc6696d799a2289bf72c2e8d230ae4678d99;hpb=64be7f204b6f00244951821884a37fb74b3bbe36;p=unfold.git diff --git a/unfold/plugin.py b/unfold/plugin.py index 178cbc66..278c362f 100644 --- a/unfold/plugin.py +++ b/unfold/plugin.py @@ -167,7 +167,12 @@ class Plugin: def render_content (self, request): """Should return an HTML fragment""" template = self.template_file() - env=self.template_env(request) + # start with a fresh one + env={} + # add our own settings as defaults + env.update(self.__dict__) + # then the things explicitly defined in template_env() + env.update(self.template_env(request)) if not isinstance (env,dict): raise Exception, "%s.template_env returns wrong type"%self.classname result=render_to_string (template, env)