Commits

Torsten Irländer committed 70d1964

Added optional parameter request to forms.

Comments (0)

Files changed (2)

   used to display dynamic calculated values.
 - Added helper script "generate.py" to generate various information about the
   form configuration. E.g generate the SQLAlchemy model.
+- Added optional request param for form initialisation. The current request
+  from a wenframeform can no be provided to the form. This might be usefull
+  while rendering with external renderers.
 
 0.4.0
 =====
     """
 
     def __init__(self, config, item=None, dbsession=None, translate=None,
-                 change_page_callback={}, renderers={}):
+                 change_page_callback={}, renderers={}, request=None):
         """Initialize the form with ``Form`` configuration instance and
         optional an SQLAlchemy mapped object.
 
         provided to the form to render specific form elements. The key
         is the type of the renderer as named in the formular
         configuration.
+        :request: Current request (See
+        http://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html
+        when using in connection with ringo)
 
         """
         self._config = config
         self._item = item
         self._dbsession = dbsession
+        self._request = request
         if translate:
             self._translate = translate
         else: