[book] a few autoclasses for renderers, misc tweaks stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 02 Mar 2010 15:11:11 +0100
branchstable
changeset 4743 026a89520184
parent 4741 f9a176ebe090
child 4744 0772d4e29d52
[book] a few autoclasses for renderers, misc tweaks
doc/book/en/Z010-beginners.en.txt
doc/book/en/development/devweb/controllers.rst
doc/book/en/development/devweb/form.rst
web/views/formrenderers.py
--- a/doc/book/en/Z010-beginners.en.txt	Tue Mar 02 13:00:41 2010 +0100
+++ b/doc/book/en/Z010-beginners.en.txt	Tue Mar 02 15:11:11 2010 +0100
@@ -5,7 +5,7 @@
 Quick Installation of a *CubicWeb* instance
 ===========================================
 
-.. include:: C010-setup.en.txt
+# .. include:: C010-setup.en.txt
 .. include:: Z012-create-instance.en.txt
 
 
--- a/doc/book/en/development/devweb/controllers.rst	Tue Mar 02 13:00:41 2010 +0100
+++ b/doc/book/en/development/devweb/controllers.rst	Tue Mar 02 15:11:11 2010 +0100
@@ -22,7 +22,7 @@
 
 * the JSon controller (web/views/basecontrollers.py) provides services
   for Ajax calls, typically using JSON as a serialization format for
-  input, and sometimes using either JSON or XML for output; 
+  input, and sometimes using either JSON or XML for output;
 
 * the Login/Logout controllers (web/views/basecontrollers.py) make
   effective user login or logout requests
--- a/doc/book/en/development/devweb/form.rst	Tue Mar 02 13:00:41 2010 +0100
+++ b/doc/book/en/development/devweb/form.rst	Tue Mar 02 15:11:11 2010 +0100
@@ -1,19 +1,22 @@
 Form construction
 ------------------
-CubicWeb provides usual form/field/widget/renderer abstraction to provde
-some generic building blocks which will greatly help you in building forms
-properly integrated with |cubicweb| (coherent display, error handling, etc...)
+
+CubicWeb provides usual form/field/widget/renderer abstraction to
+provde some generic building blocks which will greatly help you in
+building forms properly integrated with CubicWeb (coherent display,
+error handling, etc...).
 
-A form basically only hold a set of fields, and is bound to a renderer that is
-responsible to layout them. Each field is bound to a widget that will be used
-to fill in value(s) for that field.
+A form basically only holds a set of fields, and has te be bound to a
+renderer which is responsible to layout them. Each field is bound to a
+widget that will be used to fill in value(s) for that field (at form
+generation time) and 'decode' (fetch and give a proper Python type to)
+values sent back by the browser.
 
 The Field class and basic fields
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 .. autoclass:: cubicweb.web.formfields.Field
 
-
 Existing field types are:
 
 .. autoclass:: cubicweb.web.formfields.StringField
@@ -28,7 +31,6 @@
 .. autoclass:: cubicweb.web.formfields.DateTimeField
 .. autoclass:: cubicweb.web.formfields.TimeField
 .. autoclass:: cubicweb.web.formfields.RelationField
-.. XXX still necessary?
 .. autoclass:: cubicweb.web.formfields.CompoundField
 
 
@@ -57,9 +59,7 @@
 .. autoclass:: cubicweb.web.formwidgets.AutoCompletionWidget
 .. autoclass:: cubicweb.web.formwidgets.EditableURLWidget
 
-.. XXX StaticFileAutoCompletionWidget, RestrictedAutoCompletionWidget, AddComboBoxWidget, IntervalWidget, HorizontalLayoutWidget
-
-The following classes, which are not proper widget (they are not associated to
+Other classes in this module, which are not proper widget (they are not associated to
 field) but are used as form controls, may also be useful: Button, SubmitButton,
 ResetButton, ImgButton,
 
@@ -68,4 +68,10 @@
 
 Renderers
 ~~~~~~~~~
-XXX feed me
+
+.. autoclass:: cubicweb.web.views.formrenderers.BaseFormRenderer
+.. autoclass:: cubicweb.web.views.formrenderers.HTableFormRenderer
+.. autoclass:: cubicweb.web.views.formrenderers.EntityCompositeFormRenderer
+.. autoclass:: cubicweb.web.views.formrenderers.EntityFormRenderer
+.. autoclass:: cubicweb.web.views.formrenderers.EntityInlinedFormRenderer
+
--- a/web/views/formrenderers.py	Tue Mar 02 13:00:41 2010 +0100
+++ b/web/views/formrenderers.py	Tue Mar 02 15:11:11 2010 +0100
@@ -44,6 +44,7 @@
     +--------------+--------------+
     | field1 label | field2 input |
     +--------------+--------------+
+
     +---------+
     | buttons |
     +---------+
@@ -168,7 +169,7 @@
         return tag + '>'
 
     def close_form(self, form, values):
-        """seem dump but important for consistency w/ close form, and necessary
+        """seems dumb but important for consistency w/ close form, and necessary
         for form renderers overriding open_form to use something else or more than
         and <form>
         """