Commits

Torsten Irländer  committed c8ec8bf

Reverted earlier change which leads into problems with rendering forms.

  • Participants
  • Parent commits b98cb34

Comments (0)

Files changed (1)

File formbar/renderer.py

         self._config = field._config.renderer
         self.translate = translate
         self.template = None
-        self.values = self._get_template_values()
+        #self.values = self._get_template_values()
 
     def __getattr__(self, name):
         """Give access to the config values of the renderer"""
 
     def _render_label(self):
         template = template_lookup.get_template("label.mako")
-        return template.render(**self.values)
+        values = self._get_template_values()
+        return template.render(**values)
 
     def _render_errors(self):
         template = template_lookup.get_template("errors.mako")
-        return template.render(**self.values)
+        values = self._get_template_values()
+        return template.render(**values)
 
     def _render_help(self):
         template = template_lookup.get_template("help.mako")
-        return template.render(**self.values)
+        values = self._get_template_values()
+        return template.render(**values)
 
     def _get_template_values(self):
         values = {'field': self._field,
         # help. Each in its own template.
         html = []
         html.append(self._render_label())
-        html.append(self.template.render(**self.values))
+        values = self._get_template_values()
+        html.append(self.template.render(**values))
         html.append(self._render_errors())
         html.append(self._render_help())
         return "".join(html)