doc/book/devweb/ajax.rst
author Julien Cristau <julien.cristau@logilab.fr>
Mon, 30 Nov 2015 15:53:35 +0100
changeset 10936 c3606b52092c
parent 10491 c67bcee93248
child 12856 a82e56d4814a
permissions -rw-r--r--
[hooks] build EnsureSymmetricRelations{Add,Delete} dynamically Instead of setting the __select__ attribute at registration time, which confuses the filterable_selectors cache when running different tests (with different schemas) in the same process, just make entirely new classes. Closes #8785708.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8128
0a927fe4541b [controllers] deprecate JSonController and implement AjaxController / ajax-func registry (closes #2110265)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     1
.. _ajax:
0a927fe4541b [controllers] deprecate JSonController and implement AjaxController / ajax-func registry (closes #2110265)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     2
0a927fe4541b [controllers] deprecate JSonController and implement AjaxController / ajax-func registry (closes #2110265)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     3
Ajax
0a927fe4541b [controllers] deprecate JSonController and implement AjaxController / ajax-func registry (closes #2110265)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     4
----
0a927fe4541b [controllers] deprecate JSonController and implement AjaxController / ajax-func registry (closes #2110265)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     5
0a927fe4541b [controllers] deprecate JSonController and implement AjaxController / ajax-func registry (closes #2110265)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     6
CubicWeb provides a few helpers to facilitate *javascript <-> python* communications.
0a927fe4541b [controllers] deprecate JSonController and implement AjaxController / ajax-func registry (closes #2110265)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     7
0a927fe4541b [controllers] deprecate JSonController and implement AjaxController / ajax-func registry (closes #2110265)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     8
You can, for instance, register some python functions that will become
0a927fe4541b [controllers] deprecate JSonController and implement AjaxController / ajax-func registry (closes #2110265)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     9
callable from javascript through ajax calls. All the ajax URLs are handled
8480
086cff6a306a [book] fix build warnings/errors. Closes #2430042
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 8128
diff changeset
    10
by the :class:`cubicweb.web.views.ajaxcontroller.AjaxController` controller.
8128
0a927fe4541b [controllers] deprecate JSonController and implement AjaxController / ajax-func registry (closes #2110265)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    11
0a927fe4541b [controllers] deprecate JSonController and implement AjaxController / ajax-func registry (closes #2110265)
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    12
.. automodule:: cubicweb.web.views.ajaxcontroller