Torsten Irländer avatar Torsten Irländer committed c8ec8bf

Reverted earlier change which leads into problems with rendering forms.

Comments (0)

Files changed (1)

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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.