An easy to use AJAX library based on jQuery.ajax
Project description
Sijax stands for “Simple ajax” and provides just that. It’s a simple Python/jQuery library providing easy ajax integration for python web apps.
The main idea is to use javascript code that calls server-side callbacks, which generate a response (manipulating the DOM, etc) and pass it back to the client. This way, you don’t need to manually dispatch ajax requests to certain URIs and go over each XML/JSON response manually.
Here’s a tiny snippet of code to show what it’s capable of doing:
# Function definition in Python def say_hello_handler(obj_response, hello_from, hello_to): obj_response.alert("Hello from %s to %s" % (hello_from, hello_to)) obj_response.alert("Redirecting you..") obj_response.redirect("https://github.com/spantaleev/sijax-python") # Expose the above function publicly by the name of "say_hello" sijax_instance.register_callback("say_hello", say_hello_handler) //The above function can be called from javascript using Sijax.request('say_hello', ['John', 'Greg']);
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Sijax-0.2.6.tar.gz
(50.9 kB
view hashes)