{
"info": {
"author": "Steadman",
"author_email": "mark@steadman.io",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Django"
],
"description": "Bambu AJAX\n==========\n\nAJAX utility functions for Django that can be accessed via a single URL\n(ala WordPress admin-ajax.php)\n\nAbout Bambu AJAX\n----------------\n\nBambu AJAX lets you write utility functions for your Django apps that\ncan be called via AJAX, without having to specify a separate URL pattern\nand view for each one.\n\nAbout Bambu Tools 2.0\n---------------------\n\nThis is part of a toolset called Bambu Tools. It's being moved from a\nnamespace of ``bambu`` to its own 'root-level' package, along with all\nthe other tools in the set. If you're upgrading from a version prior to\n2.0, please make sure to update your code to use ``bambu_ajax`` rather\nthan ``bambu.ajax``.\n\nInstallation\n------------\n\nInstall the package via Pip:\n\n::\n\n pip install bambu-ajax\n\nAdd it to your ``INSTALLED_APPS`` list:\n\n::\n\n INSTALLED_APPS = (\n ...\n 'bambu_ajax'\n )\n\nAdd ``bambu_ajax.urls`` to your URLconf:\n\n::\n\n urlpatterns = patterns('',\n ...\n url(r'^ajax/', include('bambu_ajax.urls')),\n )\n\nBasic usage\n-----------\n\nCreate a file called ``ajax.php`` within your Django app, and import the\nnecessary module from the ``bambu-ajax`` package, like so:\n\n::\n\n from bambu_ajax import site\n\n @site.register\n def my_ajax_function(request):\n return [\n 'a', 'list', 'of', 'things'\n ]\n\nUsing the ``site.register`` decorator registers your AJAX function with\nthe ``bambu_ajax`` view.\n\nTo leverage this function from within a Django template, use the\n``ajaxurl`` template tag, like so:\n\n::\n\n {% load ajax %}\n \n\nHere, ``my_project`` should refer to the name of your Django project,\n``my_app`` should be the name of the app you put your ``ajax.py`` file\nin, and ``my_ajax_function`` is the name of the function you defined\nwithin ``ajax.py``.\n\nThe notation is similar to that used when referring to Django models, in\nthat you always skip the common portion ``ajax`` from the naming\nconvention.\n\nShortcut\n--------\n\nMake your life easier by including the utility library in your template:\n\n::\n\n \n \n\nThis achieves the same result, but in a much cleaner way.\n\nDynamically updating page content\n---------------------------------\n\nAs well as returning JSON-serialisable data per the examples above, you\ncan also use AJAX functions just like views, in that they can return an\n``HttpResponse`` object.\n\nUsing that method, the example above would print out the HTML (or other\ndata) returned in the HTTP response.\n\nAdditional decorators\n---------------------\n\nYou can of course add other decorators, just as you would with normal\nviews.\n\nTodo\n----\n\n- Add a dedicated ``login_required`` decorator that returns a more\n helpful response for anonymous users\n- Look into integrating this with\n `Plunja `_, my dynamic\n JavaScript templating library.\n\nQuestions or suggestions?\n-------------------------\n\nFind me on Twitter (@iamsteadman) or `visit my blog `_.",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/iamsteadman/bambu-ajax",
"keywords": null,
"license": "UNKNOWN",
"maintainer": null,
"maintainer_email": null,
"name": "bambu-ajax",
"package_url": "https://pypi.org/project/bambu-ajax/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/bambu-ajax/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/iamsteadman/bambu-ajax"
},
"release_url": "https://pypi.org/project/bambu-ajax/2.0/",
"requires_dist": null,
"requires_python": null,
"summary": "AJAX utility functions for Django",
"version": "2.0"
},
"last_serial": 1091994,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "301a86f592396932aed815aa260cd2be",
"sha256": "9095c84a2cb3c77d39de4b39644c8d589dd1972521b43e98d56af29747cd025e"
},
"downloads": -1,
"filename": "bambu-ajax-0.1.tar.gz",
"has_sig": false,
"md5_digest": "301a86f592396932aed815aa260cd2be",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2413,
"upload_time": "2014-05-14T10:17:18",
"url": "https://files.pythonhosted.org/packages/82/bd/7e0c0acf1523ef84b69f34a9d9b427f4603ee1d34bfdc611ce2b8c31b120/bambu-ajax-0.1.tar.gz"
}
],
"2.0": [
{
"comment_text": "",
"digests": {
"md5": "9697b38abb12d17d271ff7803cfa367c",
"sha256": "69fa1fc3192029f88bbedb8ce4fe06878b71d80c2be1bed3436088505f473b34"
},
"downloads": -1,
"filename": "bambu-ajax-2.0.tar.gz",
"has_sig": false,
"md5_digest": "9697b38abb12d17d271ff7803cfa367c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5154,
"upload_time": "2014-05-03T16:36:52",
"url": "https://files.pythonhosted.org/packages/33/38/8ad9f00c587c9bad434615f04a7610102947d7609456be8bae40cc297754/bambu-ajax-2.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "9697b38abb12d17d271ff7803cfa367c",
"sha256": "69fa1fc3192029f88bbedb8ce4fe06878b71d80c2be1bed3436088505f473b34"
},
"downloads": -1,
"filename": "bambu-ajax-2.0.tar.gz",
"has_sig": false,
"md5_digest": "9697b38abb12d17d271ff7803cfa367c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5154,
"upload_time": "2014-05-03T16:36:52",
"url": "https://files.pythonhosted.org/packages/33/38/8ad9f00c587c9bad434615f04a7610102947d7609456be8bae40cc297754/bambu-ajax-2.0.tar.gz"
}
]
}