[book] fix some rest/sphinx errors
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 07 Jul 2011 18:20:23 +0200
changeset 7632 3c9dfc6e820b
parent 7631 4ac19f288149
child 7633 ab1385ee7caa
[book] fix some rest/sphinx errors
doc/book/en/admin/setup-windows.rst
doc/book/en/annexes/rql/language.rst
doc/book/en/devrepo/datamodel/define-workflows.rst
doc/book/en/devweb/resource.rst
doc/book/en/intro/concepts.rst
web/facet.py
web/views/forms.py
--- a/doc/book/en/admin/setup-windows.rst	Thu Jul 07 17:06:50 2011 +0200
+++ b/doc/book/en/admin/setup-windows.rst	Thu Jul 07 18:20:23 2011 +0200
@@ -24,9 +24,9 @@
 |cubicweb| requires some base elements that must be installed to run
 correctly. So, first of all, you must install them :
 
-* python >= 2.5 and < 3 
-  (`Download Python <http://www.python.org/download/>`_). 
-  You can also consider the Python(x,y) distribution 
+* python >= 2.5 and < 3
+  (`Download Python <http://www.python.org/download/>`_).
+  You can also consider the Python(x,y) distribution
   (`Download Python(x,y) <http://code.google.com/p/pythonxy/wiki/Downloads>`_)
   as it makes things easier for Windows user by wrapping in a single installer
   python 2.5 plus numerous useful third-party modules and
@@ -34,24 +34,24 @@
   IDE for Python under Windows).
 
 * `Twisted <http://twistedmatrix.com/trac/>`_ is an event-driven
-  networking engine 
+  networking engine
   (`Download Twisted <http://twistedmatrix.com/trac/>`_)
 
 * `lxml <http://codespeak.net/lxml/>`_ library
-  (version >=2.2.1) allows working with XML and HTML 
+  (version >=2.2.1) allows working with XML and HTML
   (`Download lxml <http://pypi.python.org/pypi/lxml/2.2.1>`_)
 
-* `Postgresql 8.4 <http://www.postgresql.org/>`_, 
-  an object-relational database system 
-  (`Download Postgresql <http://www.enterprisedb.com/products/pgdownload.do#windows>`_) 
-  and its python drivers 
+* `Postgresql 8.4 <http://www.postgresql.org/>`_,
+  an object-relational database system
+  (`Download Postgresql <http://www.enterprisedb.com/products/pgdownload.do#windows>`_)
+  and its python drivers
   (`Download psycopg <http://www.stickpeople.com/projects/python/win-psycopg/#Version2>`_)
 
-* A recent version of `gettext` 
+* A recent version of `gettext`
   (`Download gettext <http://download.logilab.org/pub/gettext/gettext-0.17-win32-setup.exe>`_).
 
-* `rql <http://www.logilab.org/project/rql>`_, 
-  the recent version of the Relationship Query Language parser 
+* `rql <http://www.logilab.org/project/rql>`_,
+  the recent version of the Relationship Query Language parser
   (`Download rql <http://download.logilab.org/pub/rql/rql-0.26.3.win32-py2.5.exe>`_).
 
 Install optional elements
@@ -60,22 +60,22 @@
 We recommend you to install the following elements. They are not
 mandatory but they activate very interesting features in |cubicweb|:
 
-* `Simplejson <http://pypi.python.org/pypi/simplejson/>`_ 
-  must be installed if you have python <= 2.5 
+* `Simplejson <http://pypi.python.org/pypi/simplejson/>`_
+  must be installed if you have python <= 2.5
   (`Download simplejson <http://www.osuch.org/python-simplejson%3Awin32>`_).
   It is included in the Standard library from Python >= 2.6.
 
-* `Pyro <http://www.xs4all.nl/~irmen/pyro3/>`_ 
+* `Pyro <http://www.xs4all.nl/~irmen/pyro3/>`_
   enables remote access to cubicweb repository instances.
   It also allows the client and the server not running on the same machine
   (`Download Pyro <http://www.xs4all.nl/~irmen/pyro3/download/>`_).
 
-* `python-ldap <http://pypi.python.org/pypi/python-ldap>`_ 
+* `python-ldap <http://pypi.python.org/pypi/python-ldap>`_
   provides access to LDAP/Active directory directories
   (`Download python-ldap <http://www.osuch.org/python-ldap>`_).
 
-* `graphviz <http://www.graphviz.org/>`_ 
-  which allow schema drawings.  
+* `graphviz <http://www.graphviz.org/>`_
+  which allow schema drawings.
   (`Download graphviz <http://www.graphviz.org/Download_windows.php>`_).
   It is quite recommended (albeit not mandatory).
 
@@ -88,18 +88,17 @@
 Some additional tools could be useful to develop :ref:`cubes <AvailableCubes>`
 with the framework.
 
-* `mercurial <http://mercurial.selenic.com/>`_ and its standard
-  windows GUI (`TortoiseHG <http://tortoisehg.bitbucket.org/>`_) 
-  allow you to get the source code of |cubicweb| from control version
-  repositories. So you will be able to get the latest development
-  version in an easy way 
+* `mercurial <http://mercurial.selenic.com/>`_ and its standard windows GUI
+  (`TortoiseHG <http://tortoisehg.bitbucket.org/>`_) allow you to get the source
+  code of |cubicweb| from control version repositories. So you will be able to
+  get the latest development version and pre-release bugfixes in an easy way
   (`Download mercurial <http://bitbucket.org/tortoisehg/stable/wiki/download>`_).
 
 * You can also consider the ssh client `Putty` in order to peruse
   mercurial over ssh (`Download <http://www.putty.org/>`_).
 
 * If you are an Eclipse user, mercurial can be integrated using the
-  `MercurialEclipse` plugin 
+  `MercurialEclipse` plugin
   (`Home page <http://www.vectrace.com/mercurialeclipse/>`_).
 
 Getting the sources
@@ -108,8 +107,8 @@
 There are tow ways to get the sources of |cubicweb| and its
 :ref:`cubes <AvailableCubes>`:
 
-* download the latest release (:ref:`SourceInstallation`) 
-* get the development version using Mercurial 
+* download the latest release (:ref:`SourceInstallation`)
+* get the development version using Mercurial
   (:ref:`MercurialInstallation`)
 
 Environment variables
@@ -123,8 +122,8 @@
 it. That opens a small window allowing edition of user-related and system-wide
 variables.
 
-We will consider only user variables. First, the ``PATH`` variable. Assuming 
-you are logged as user *Jane*, add the following paths, separated by 
+We will consider only user variables. First, the ``PATH`` variable. Assuming
+you are logged as user *Jane*, add the following paths, separated by
 semi-colons::
 
   C:\Documents and Settings\Jane\My Documents\Python\cubicweb\cubicweb\bin
--- a/doc/book/en/annexes/rql/language.rst	Thu Jul 07 17:06:50 2011 +0200
+++ b/doc/book/en/annexes/rql/language.rst	Thu Jul 07 18:20:23 2011 +0200
@@ -6,6 +6,7 @@
 ----------
 
 .. _RQLKeywords:
+
 Reserved keywords
 ~~~~~~~~~~~~~~~~~
 
@@ -20,6 +21,7 @@
 
 
 .. _RQLCase:
+
 Case
 ~~~~
 
@@ -33,6 +35,7 @@
 
 
 .. _RQLVariables:
+
 Variables and typing
 ~~~~~~~~~~~~~~~~~~~~
 
@@ -63,11 +66,12 @@
 
 * `identity`: relation to use to tell that a RQL variable is the same as another
   when you've to use two different variables for querying purpose. On the
-  opposite it's also useful together with the `NOT`_ operator to tell that two
+  opposite it's also useful together with the :ref:`NOT` operator to tell that two
   variables should not identify the same entity
 
 
 .. _RQLLiterals:
+
 Literal expressions
 ~~~~~~~~~~~~~~~~~~~
 
@@ -88,10 +92,12 @@
 
 
 .. _RQLOperators:
+
 Operators
 ~~~~~~~~~
 
 .. _RQLLogicalOperators:
+
 Logical operators
 `````````````````
 ::
@@ -102,6 +108,7 @@
 operators (see :ref:`RQLOperatorsPriority`).
 
 .. _RQLMathematicalOperators:
+
 Mathematical operators
 ``````````````````````
 ::
@@ -112,6 +119,7 @@
 
 
 .. _RQLComparisonOperators:
+
 Comparison operators
 ````````````````````
  ::
@@ -138,6 +146,7 @@
 
 
 .. _RQLStringOperators:
+
 String operators
 ````````````````
 ::
@@ -178,6 +187,7 @@
 
 
 .. _RQLOperatorsPriority:
+
 Operators priority
 ``````````````````
 
@@ -191,6 +201,7 @@
 
 
 .. _RQLSearchQuery:
+
 Search Query
 ~~~~~~~~~~~~
 
@@ -427,6 +438,7 @@
 
 
 .. _RQLFunctions:
+
 Available functions
 ~~~~~~~~~~~~~~~~~~~
 
@@ -434,89 +446,94 @@
 nativly by the framework. Notice that cubes may define additional functions.
 
 .. _RQLAggregateFunctions:
+
 Aggregate functions
 ```````````````````
-+------------------------+----------------------------------------------------------+
-| :function:`COUNT`      | return the number of rows                                |
-+------------------------+----------------------------------------------------------+
-| :function:`MIN`        | return the minimum value                                 |
-+------------------------+----------------------------------------------------------+
-| :function:`MAX`        | return the maximum value                                 |
-+------------------------+----------------------------------------------------------+
-| :function:`AVG`        | return the average value                                 |
-+------------------------+----------------------------------------------------------+
-| :function:`SUM`        | return the sum of values                                 |
-+------------------------+----------------------------------------------------------+
-| :function:`COMMA_JOIN` | return each value separated by a comma (for string only) |
-+------------------------+----------------------------------------------------------+
++--------------------+----------------------------------------------------------+
+| :func:`COUNT`      | return the number of rows                                |
++--------------------+----------------------------------------------------------+
+| :func:`MIN`        | return the minimum value                                 |
++--------------------+----------------------------------------------------------+
+| :func:`MAX`        | return the maximum value                                 |
++--------------------+----------------------------------------------------------+
+| :func:`AVG`        | return the average value                                 |
++--------------------+----------------------------------------------------------+
+| :func:`SUM`        | return the sum of values                                 |
++--------------------+----------------------------------------------------------+
+| :func:`COMMA_JOIN` | return each value separated by a comma (for string only) |
++--------------------+----------------------------------------------------------+
 
 All aggregate functions above take a single argument. Take care some aggregate
 functions (e.g. :keyword:`MAX`, :keyword:`MIN`) may return `None` if there is no
 result row.
 
 .. _RQLStringFunctions:
+
 String transformation functions
 ```````````````````````````````
 
-+-----------------------------+-----------------------------------------------------------------+
-| :function:`UPPER(String)`   | upper case the string                                           |
-+-----------------------------+-----------------------------------------------------------------+
-| :function:`LOWER(String)`   | lower case the string                                           |
-+-----------------------------+-----------------------------------------------------------------+
-| :function:`LENGTH(String)`  | return the length of the string                                 |
-+-----------------------------+-----------------------------------------------------------------+
-| :function:`SUBSTRING(       | extract from the string a string starting at given index and of |
-|    String, start, length)`  | given length                                                    |
-+-----------------------------+-----------------------------------------------------------------+
-| :function:`LIMIT_SIZE(      | if the length of the string is greater than given max size,     |
-|  String, max size)`         | strip it and add ellipsis ("..."). The resulting string will    |
-|                             | hence have max size + 3 characters                              |
-+-----------------------------+-----------------------------------------------------------------+
-| :function:`TEXT_LIMIT_SIZE( | similar to the above, but allow to specify the MIME type of the |
-|  String, format, max size)` | text contained by the string. Supported formats are text/html,  |
-|                             | text/xhtml and text/xml. All others will be considered as plain |
-|                             | text. For non plain text format, sgml tags will be first removed|
-|                             | before limiting the string.                                     |
-+-----------------------------+-----------------------------------------------------------------+
++-------------------------+-----------------------------------------------------------------+
+| :func:`UPPER(String)`   | upper case the string                                           |
++-------------------------+-----------------------------------------------------------------+
+| :func:`LOWER(String)`   | lower case the string                                           |
++-------------------------+-----------------------------------------------------------------+
+| :func:`LENGTH(String)`  | return the length of the string                                 |
++-------------------------+-----------------------------------------------------------------+
+| :func:`SUBSTRING(       | extract from the string a string starting at given index and of |
+|  String, start, length)`| given length                                                    |
++-------------------------+-----------------------------------------------------------------+
+| :func:`LIMIT_SIZE(      | if the length of the string is greater than given max size,     |
+|  String, max size)`     | strip it and add ellipsis ("..."). The resulting string will    |
+|                         | hence have max size + 3 characters                              |
++-------------------------+-----------------------------------------------------------------+
+| :func:`TEXT_LIMIT_SIZE( | similar to the above, but allow to specify the MIME type of the |
+|  String, format,        | text contained by the string. Supported formats are text/html,  |
+|  max size)`             | text/xhtml and text/xml. All others will be considered as plain |
+|                         | text. For non plain text format, sgml tags will be first removed|
+|                         | before limiting the string.                                     |
++-------------------------+-----------------------------------------------------------------+
 
 .. _RQLDateFunctions:
+
 Date extraction functions
 `````````````````````````
 
-+------------------------------+----------------------------------------+
-| :function:`YEAR(Date)`       | return the year of a date or datetime  |
-+------------------------------+----------------------------------------+
-| :function:`MONTH(Date)`      | return the year of a date or datetime  |
-+------------------------------+----------------------------------------+
-| :function:`DAY(Date)`        | return the year of a date or datetime  |
-+------------------------------+----------------------------------------+
-| :function:`HOUR(Datetime)`   | return the year of a datetime          |
-+------------------------------+----------------------------------------+
-| :function:`MINUTE(Datetime)` | return the year of a datetime          |
-+------------------------------+----------------------------------------+
-| :function:`SECOND(Datetime)` | return the year of a datetime          |
-+------------------------------+----------------------------------------+
++--------------------------+----------------------------------------+
+| :func:`YEAR(Date)`       | return the year of a date or datetime  |
++--------------------------+----------------------------------------+
+| :func:`MONTH(Date)`      | return the year of a date or datetime  |
++--------------------------+----------------------------------------+
+| :func:`DAY(Date)`        | return the year of a date or datetime  |
++--------------------------+----------------------------------------+
+| :func:`HOUR(Datetime)`   | return the year of a datetime          |
++--------------------------+----------------------------------------+
+| :func:`MINUTE(Datetime)` | return the year of a datetime          |
++--------------------------+----------------------------------------+
+| :func:`SECOND(Datetime)` | return the year of a datetime          |
++--------------------------+----------------------------------------+
 
 .. _RQLOtherFunctions:
+
 Other functions
 ```````````````
-+---------------------------+--------------------------------------------------------------------+
-| :function:`ABS(num)`       | return the absolute value of a number                             |
-+---------------------------+--------------------------------------------------------------------+
-| :function:`RANDOM()`      | return a pseudo-random value from 0.0 to 1.0                       |
-+---------------------------+--------------------------------------------------------------------+
-| :function:`FSPATH(X)`     | expect X to be an attribute whose value is stored in a             |
-|                           | :ref:`BFSStorage` and return its path on the file system           |
-+---------------------------+--------------------------------------------------------------------+
-| :function:`FTKIRANK(X)`   | expect X to be an entity used in a has_text relation, and return a |
-|                           | number corresponding to the rank order of each resulting entity    |
-+---------------------------+--------------------------------------------------------------------+
-| :function:`CAST(Type, X)` | expect X to be an attribute and return it casted into the given    |
-|                           | final type                                                         |
-+---------------------------+--------------------------------------------------------------------+
++-----------------------+--------------------------------------------------------------------+
+| :func:`ABS(num)`      |  return the absolute value of a number                             |
++-----------------------+--------------------------------------------------------------------+
+| :func:`RANDOM()`      | return a pseudo-random value from 0.0 to 1.0                       |
++-----------------------+--------------------------------------------------------------------+
+| :func:`FSPATH(X)`     | expect X to be an attribute whose value is stored in a             |
+|                       | :class:`BFSStorage` and return its path on the file system         |
++-----------------------+--------------------------------------------------------------------+
+| :func:`FTKIRANK(X)`   | expect X to be an entity used in a has_text relation, and return a |
+|                       | number corresponding to the rank order of each resulting entity    |
++-----------------------+--------------------------------------------------------------------+
+| :func:`CAST(Type, X)` | expect X to be an attribute and return it casted into the given    |
+|                       | final type                                                         |
++-----------------------+--------------------------------------------------------------------+
 
 
 .. _RQLExamples:
+
 Examples
 ~~~~~~~~
 
@@ -579,6 +596,7 @@
 
 
 .. _RQLInsertQuery:
+
 Insertion query
 ~~~~~~~~~~~~~~~
 
@@ -611,6 +629,7 @@
         INSERT Person X: X name 'foo', X friend  Y WHERE name 'nice'
 
 .. _RQLSetQuery:
+
 Update and relation creation queries
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -633,6 +652,7 @@
 
 
 .. _RQLDeleteQuery:
+
 Deletion query
 ~~~~~~~~~~~~~~
 
--- a/doc/book/en/devrepo/datamodel/define-workflows.rst	Thu Jul 07 17:06:50 2011 +0200
+++ b/doc/book/en/devrepo/datamodel/define-workflows.rst	Thu Jul 07 18:20:23 2011 +0200
@@ -13,7 +13,7 @@
 possible transitions from one state to another state.
 
 We will define a simple workflow for a blog, with only the following two states:
-`submitted` and `published`. You may want to take a look at :ref:`_TutosBase` if
+`submitted` and `published`. You may want to take a look at :ref:`TutosBase` if
 you want to quickly setup an instance running a blog.
 
 Setting up a workflow
--- a/doc/book/en/devweb/resource.rst	Thu Jul 07 17:06:50 2011 +0200
+++ b/doc/book/en/devweb/resource.rst	Thu Jul 07 18:20:23 2011 +0200
@@ -8,7 +8,7 @@
 Static files handling
 ---------------------
 
-.. automethod:: cubicweb.web.webconfig.WebConfiguration.static_directory
+.. autoattribute:: cubicweb.web.webconfig.WebConfiguration.static_directory
 .. automethod:: cubicweb.web.webconfig.WebConfiguration.static_file_exists
 .. automethod:: cubicweb.web.webconfig.WebConfiguration.static_file_open
 .. automethod:: cubicweb.web.webconfig.WebConfiguration.static_file_add
--- a/doc/book/en/intro/concepts.rst	Thu Jul 07 17:06:50 2011 +0200
+++ b/doc/book/en/intro/concepts.rst	Thu Jul 07 18:20:23 2011 +0200
@@ -1,4 +1,3 @@
-
 .. -*- coding: utf-8 -*-
 
 .. _Concepts:
@@ -31,7 +30,7 @@
 .. note::
 
  The command :command:`cubicweb-ctl list` displays the list of cubes
-installed on your system.
+ installed on your system.
 
 .. _`CubicWeb.org Forge`: http://www.cubicweb.org/project/
 .. _`cubicweb-blog`: http://www.cubicweb.org/project/cubicweb-blog
--- a/web/facet.py	Thu Jul 07 17:06:50 2011 +0200
+++ b/web/facet.py	Thu Jul 07 18:20:23 2011 +0200
@@ -374,7 +374,7 @@
     Facets implementors may also be interested in the following properties /
     methods:
 
-    .. automethod:: cubicweb.web.facet.AbstractFacet.operator
+    .. autoattribute:: cubicweb.web.facet.AbstractFacet.operator
     .. automethod:: cubicweb.web.facet.AbstractFacet.rqlexec
     """
     __abstract__ = True
@@ -1006,7 +1006,7 @@
     won't work. This facet class is designed to be used for cases where
     :class:`RelationFacet` or :class:`RelationAttributeFacet` can't do the trick
     (e.g when you want to filter on entities where are not directly linked to
-     the filtered entities).
+    the filtered entities).
     """
     # must be specified
     path = None
--- a/web/views/forms.py	Thu Jul 07 17:06:50 2011 +0200
+++ b/web/views/forms.py	Thu Jul 07 18:20:23 2011 +0200
@@ -143,7 +143,7 @@
     Notice that form related to entity edition should usually use the
     `edit` controller which will handle all the logic for you.
 
-    .. automethod:: cubicweb.web.views.forms.FieldsForm.process_content
+    .. automethod:: cubicweb.web.views.forms.FieldsForm.process_posted
     .. automethod:: cubicweb.web.views.forms.FieldsForm.iter_modified_fields
     """
     __regid__ = 'base'