doc/book/en/devweb/controllers.rst
changeset 8128 0a927fe4541b
parent 7876 df15d194a134
equal deleted inserted replaced
8125:7070250bf50d 8128:0a927fe4541b
    20   :ref:`the_main_template_layout` and lets the ResultSet/Views dispatch system
    20   :ref:`the_main_template_layout` and lets the ResultSet/Views dispatch system
    21   build up the whole content; it handles :exc:`ObjectNotFound` and
    21   build up the whole content; it handles :exc:`ObjectNotFound` and
    22   :exc:`NoSelectableObject` errors that may bubble up to its entry point, in an
    22   :exc:`NoSelectableObject` errors that may bubble up to its entry point, in an
    23   end-user-friendly way (but other programming errors will slip through)
    23   end-user-friendly way (but other programming errors will slip through)
    24 
    24 
    25 * the JSon controller (same module) provides services for Ajax calls,
       
    26   typically using JSON as a serialization format for input, and
       
    27   sometimes using either JSON or XML for output;
       
    28 
       
    29 * the JSonpController is a wrapper around the ``ViewController`` that
    25 * the JSonpController is a wrapper around the ``ViewController`` that
    30   provides jsonp_ services. Padding can be specified with the
    26   provides jsonp_ services. Padding can be specified with the
    31   ``callback`` request parameter. Only *jsonexport* / *ejsonexport*
    27   ``callback`` request parameter. Only *jsonexport* / *ejsonexport*
    32   views can be used. If another ``vid`` is specified, it will be
    28   views can be used. If another ``vid`` is specified, it will be
    33   ignored and replaced by *jsonexport*. Request is anonymized
    29   ignored and replaced by *jsonexport*. Request is anonymized
    34   to avoid returning sensitive data and reduce the risks of CSRF attacks;
    30   to avoid returning sensitive data and reduce the risks of CSRF attacks;
    35 
    31 
    36 * the Login/Logout controllers make effective user login or logout
    32 * the Login/Logout controllers make effective user login or logout
    37   requests
    33   requests
    38 
    34 
    39 .. warning::
       
    40 
       
    41   JsonController will probably be renamed into AjaxController soon since
       
    42   it has nothing to do with json per se.
       
    43 
    35 
    44 .. _jsonp: http://en.wikipedia.org/wiki/JSONP
    36 .. _jsonp: http://en.wikipedia.org/wiki/JSONP
    45 
    37 
    46 `Edition`:
    38 `Edition`:
    47 
    39 
    61 * the ``SendMail controller`` (web/views/basecontrollers.py) is reponsible
    53 * the ``SendMail controller`` (web/views/basecontrollers.py) is reponsible
    62   for outgoing email notifications
    54   for outgoing email notifications
    63 
    55 
    64 * the MailBugReport controller (web/views/basecontrollers.py) allows
    56 * the MailBugReport controller (web/views/basecontrollers.py) allows
    65   to quickly have a `reportbug` feature in one's application
    57   to quickly have a `reportbug` feature in one's application
       
    58 
       
    59 * the :class:`cubicweb.web.views.ajaxcontroller.AjaxController`
       
    60   (:mod:`cubicweb.web.views.ajaxcontroller`) provides
       
    61   services for Ajax calls, typically using JSON as a serialization format
       
    62   for input, and sometimes using either JSON or XML for output. See
       
    63   :ref:`ajax` chapter for more information.
       
    64 
    66 
    65 
    67 Registration
    66 Registration
    68 ++++++++++++
    67 ++++++++++++
    69 
    68 
    70 All controllers (should) live in the 'controllers' namespace within
    69 All controllers (should) live in the 'controllers' namespace within