资 源 简 介
Django Ajax library is a Ajax library for Django.
* easy call views method
* DJS(Django JavaScript)
1.easy call views method
djax called easily remote views method.
var request = {}; var id = 2; var callback = function(msg){ alert(msg) }; xxx.sample.views.index(request, id, callback);
This code is called "xxx.sample.views.index" methods used Ajax.
2.DJS(Django JavaScript)
DJS(Django JavScript) is call javascript from python.
page.replace_html("test", "AJAX")str = "
call id. %s" % idpage.insert_html("bottom", "test", str)page.visual_effect("highlight", "test", dict(duration=1))
This sample is "test.djs". "djs" file is DJSTemplate File.
DJSTemplate File is write "pure python".
h