[book] fix build warnings/errors. Closes #2430042 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 20 Jul 2012 10:25:55 +0200
branchstable
changeset 8480 086cff6a306a
parent 8479 19cc6eb51783
child 8481 ff3b163f52e9
[book] fix build warnings/errors. Closes #2430042
devtools/testlib.py
doc/book/en/admin/instance-config.rst
doc/book/en/devweb/ajax.rst
doc/book/en/devweb/views/index.rst
doc/book/en/devweb/views/views.rst
server/hook.py
web/request.py
web/views/ajaxcontroller.py
web/views/tableview.py
--- a/devtools/testlib.py	Fri Jul 20 10:46:27 2012 +0200
+++ b/devtools/testlib.py	Fri Jul 20 10:25:55 2012 +0200
@@ -476,6 +476,7 @@
         * using positional argument(s):
 
           .. sourcecode:: python
+
                 rdef = self.schema['CWUser'].rdef('login')
                 with self.temporary_permissions((rdef, {'read': ()})):
                     ...
@@ -484,6 +485,7 @@
         * using named argument(s):
 
           .. sourcecode:: python
+
                 rdef = self.schema['CWUser'].rdef('login')
                 with self.temporary_permissions(CWUser={'read': ()}):
                     ...
--- a/doc/book/en/admin/instance-config.rst	Fri Jul 20 10:46:27 2012 +0200
+++ b/doc/book/en/admin/instance-config.rst	Fri Jul 20 10:25:55 2012 +0200
@@ -17,7 +17,7 @@
 each option name is prefixed with its own section and followed by its
 default value if necessary, e.g. "`<section>.<option>` [value]."
 
-.. _`Configuring the Web server`:
+.. _`WebServerConfig`:
 
 Configuring the Web server
 --------------------------
--- a/doc/book/en/devweb/ajax.rst	Fri Jul 20 10:46:27 2012 +0200
+++ b/doc/book/en/devweb/ajax.rst	Fri Jul 20 10:25:55 2012 +0200
@@ -7,6 +7,6 @@
 
 You can, for instance, register some python functions that will become
 callable from javascript through ajax calls. All the ajax URLs are handled
-by the ``AjaxController`` controller.
+by the :class:`cubicweb.web.views.ajaxcontroller.AjaxController` controller.
 
 .. automodule:: cubicweb.web.views.ajaxcontroller
--- a/doc/book/en/devweb/views/index.rst	Fri Jul 20 10:46:27 2012 +0200
+++ b/doc/book/en/devweb/views/index.rst	Fri Jul 20 10:25:55 2012 +0200
@@ -18,10 +18,11 @@
    boxes
    table
    xmlrss
-..   editforms
    urlpublish
    breadcrumbs
    idownloadable
    wdoc
+
+..   editforms
 ..   embedding
 
--- a/doc/book/en/devweb/views/views.rst	Fri Jul 20 10:46:27 2012 +0200
+++ b/doc/book/en/devweb/views/views.rst	Fri Jul 20 10:25:55 2012 +0200
@@ -32,8 +32,8 @@
 Basic class for views
 ~~~~~~~~~~~~~~~~~~~~~
 
-Class `View` (`cubicweb.view`)
-```````````````````````````````
+Class :class:`~cubicweb.view.View`
+``````````````````````````````````
 
 .. autoclass:: cubicweb.view.View
 
@@ -65,7 +65,7 @@
 
 Other basic view classes
 ````````````````````````
-Here are some of the subclasses of :ref:`View` defined in :ref:`cubicweb.view`
+Here are some of the subclasses of :class:`~cubicweb.view.View` defined in :mod:`cubicweb.view`
 that are more concrete as they relate to data rendering within the application:
 
 .. autoclass:: cubicweb.view.EntityView
--- a/server/hook.py	Fri Jul 20 10:46:27 2012 +0200
+++ b/server/hook.py	Fri Jul 20 10:25:55 2012 +0200
@@ -236,8 +236,8 @@
 or rollback() will restore the hooks.
 
 
-Hooks specific predicate
-~~~~~~~~~~~~~~~~~~~~~~~
+Hooks specific predicates
+~~~~~~~~~~~~~~~~~~~~~~~~~
 .. autoclass:: cubicweb.server.hook.match_rtype
 .. autoclass:: cubicweb.server.hook.match_rtype_sets
 
@@ -473,16 +473,18 @@
     argument. The goal of this predicate is that it keeps reference to original sets,
     so modification to thoses sets are considered by the predicate. For instance
 
-    MYSET = set()
+    .. sourcecode:: python
+
+      MYSET = set()
 
-    class Hook1(Hook):
-        __regid__ = 'hook1'
-        __select__ = Hook.__select__ & match_rtype_sets(MYSET)
-        ...
+      class Hook1(Hook):
+          __regid__ = 'hook1'
+          __select__ = Hook.__select__ & match_rtype_sets(MYSET)
+          ...
 
-    class Hook2(Hook):
-        __regid__ = 'hook2'
-        __select__ = Hook.__select__ & match_rtype_sets(MYSET)
+      class Hook2(Hook):
+          __regid__ = 'hook2'
+          __select__ = Hook.__select__ & match_rtype_sets(MYSET)
 
     Client code can now change `MYSET`, this will changes the selection criteria
     of :class:`Hook1` and :class:`Hook1`.
--- a/web/request.py	Fri Jul 20 10:46:27 2012 +0200
+++ b/web/request.py	Fri Jul 20 10:25:55 2012 +0200
@@ -96,9 +96,9 @@
         super(CubicWebRequestBase, self).__init__(vreg)
         #: (Boolean) Is this an https request.
         self.https = https
-        #: User interface property (vary with https) (see uiprops_)
+        #: User interface property (vary with https) (see :ref:`uiprops`)
         self.uiprops = None
-        #: url for serving datadir (vary with https) (see resources_)
+        #: url for serving datadir (vary with https) (see :ref:`resources`)
         self.datadir_url = None
         if https:
             self.uiprops = vreg.config.https_uiprops
@@ -171,7 +171,7 @@
     def authmode(self):
         """Authentification mode of the instance
 
-        (see `Configuring the Web server`_)"""
+        (see :ref:`WebServerConfig`)"""
         return self.vreg.config['auth-mode']
 
     # Various variable generator.
--- a/web/views/ajaxcontroller.py	Fri Jul 20 10:46:27 2012 +0200
+++ b/web/views/ajaxcontroller.py	Fri Jul 20 10:25:55 2012 +0200
@@ -28,7 +28,7 @@
 functions that can be called from the javascript world.
 
 To register a new remote function, either decorate your function
-with the :ref:`cubicweb.web.views.ajaxcontroller.ajaxfunc` decorator:
+with the :func:`cubicweb.web.views.ajaxcontroller.ajaxfunc` decorator:
 
 .. sourcecode:: python
 
--- a/web/views/tableview.py	Fri Jul 20 10:46:27 2012 +0200
+++ b/web/views/tableview.py	Fri Jul 20 10:25:55 2012 +0200
@@ -174,8 +174,8 @@
 
     @cachedproperty
     def initial_load(self):
-        """We detect a bit heuristically if we are built for the first time.
-        or from subsequent calls by the form filter or by the pagination hooks.
+        """We detect a bit heuristically if we are built for the first time or
+        from subsequent calls by the form filter or by the pagination hooks.
         """
         form = self._cw.form
         return 'fromformfilter' not in form and '__fromnavigation' not in form