{ "info": { "author": "Alexandre Vicenzi", "author_email": "vicenzi.alexandre@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "django-pjax |Build Status| |Version|\n====================================\n\nAn improvement of [Django-PJAX]: The Django helper for jQuery-PJAX.\n\nWhat\u2019s PJAX?\n------------\n\nPJAX is essentially [AHAH] (\u201cAsynchronous HTML and HTTP\u201d), except with\nreal permalinks and a working back button. It lets you load just a\nportion of a page (so things are faster) while still maintaining the\nusability of real links.\n\nA demo makes more sense, so [check out the one defunkt put together].\n\nCredits\n-------\n\nThis project is an extension of [Django-PJAX] and all credits from the\noriginal version goes to [Jacob Kaplan-Moss].\n\nAbout\n-----\n\nThis project keeps the original structure, but add new features to it,\nand aims to keep django-pjax updated. Some goals are to keep this\nproject working with Python 2.7+ and 3.3+ and also Django 1.5+.\n\nFeel free to submit a PR and contribute to this project.\n\nCompatibility\n-------------\n\n- Python 2.6+ or 3.2+\n- PyPy or PyPy3\n- CPython\n- Django 1.3+\n\nNot all Django versions works with Python, PyPy or CPython. See the\nDjango docs to know more about supported versions.\n\nInstall\n-------\n\nJust run:\n\n``pip install django-pjax``\n\nUsage\n-----\n\nFirst, read about [how to use jQuery-PJAX][defunkt\u2019s jquery-pjax] and\npick one of the techniques there.\n\nNext, make sure the views you\u2019re PJAXing are using [TemplateResponse].\nYou can\u2019t use Django-PJAX with a normal ``HttpResponse``, only\n``TemplateResponse``.\n\nPJAX decorator\n~~~~~~~~~~~~~~\n\nThe pjax decorator:\n\n.. code:: python\n\n pjax(pjax_template=None, additional_templates=None, follow_redirects=False)\n\n``pjax_template`` (str): default template.\n\n``additional_templates`` (dict): additional templates for multiple\ncontainers.\n\n``follow_redirects`` (bool): if True, all django redirects will force a\npage reload, instead of placing the content in the pjax context.\n\nDecorate these views with the pjax decorator:\n\n.. code:: python\n\n from djpjax import pjax\n\n @pjax()\n def my_view(request):\n return TemplateResponse(request, \"template.html\", {'my': 'context'})\n\nAfter doing this, if the request is made via jQuery-PJAX, the\n``@pjax()`` decorator will automatically swap out ``template.html`` for\n``template-pjax.html``.\n\nMore formally: if the request is a PJAX request, the template used in\nyour ``TemplateResponse`` will be replaced with one with ``-pjax``\nbefore the file extension. So ``template.html`` becomes\n``template-pjax.html``, ``my.template.xml`` becomes\n``my.template-pjax.xml``, etc. If there\u2019s no file extension, the\ntemplate name will just be suffixed with ``-pjax``.\n\nYou can also manually pick a PJAX template by passing it as an argument\nto the decorator:\n\n.. code:: python\n\n from djpjax import pjax\n\n @pjax(\"pjax.html\")\n def my_view(request):\n return TemplateResponse(request, \"template.html\", {'my': 'context'})\n\nYou can also pick a PJAX template for a PJAX container and use multiple\ndecorators to define the template for multiple cont\n\n.. |Build Status| image:: https://travis-ci.org/eventials/django-pjax.svg?branch=master\n :target: https://travis-ci.org/eventials/django-pjax\n.. |Version| image:: https://img.shields.io/pypi/v/django-pjax.svg\n :target: https://pypi.python.org/pypi/django-pjax", "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/eventials/django-pjax", "keywords": "django,PJAX,ajax,jQuery", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-pjax", "package_url": "https://pypi.org/project/django-pjax/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-pjax/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/eventials/django-pjax" }, "release_url": "https://pypi.org/project/django-pjax/1.4/", "requires_dist": null, "requires_python": null, "summary": "Django-PJAX: The Django helper for jQuery-PJAX.", "version": "1.4" }, "last_serial": 1742530, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "8ee67b913989065215a00d82681177d7", "sha256": "720f3e59abdf526b201d37158619d61dd3cfd65db5e790bcffdfbbfcc3ba3932" }, "downloads": -1, "filename": "django-pjax-1.0.tar.gz", "has_sig": false, "md5_digest": "8ee67b913989065215a00d82681177d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2539, "upload_time": "2011-04-10T23:40:50", "url": "https://files.pythonhosted.org/packages/55/69/285cd11904c4151473fc76c3d733628019fdf1290df5aeba906b76d32921/django-pjax-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "f102dd1ea259d76d31956ac7ca61e622", "sha256": "97f4536b18ac52ac6835f5d280d4ca4495d15deaac60e57abba38b86889dca14" }, "downloads": -1, "filename": "django-pjax-1.1.tar.gz", "has_sig": false, "md5_digest": "f102dd1ea259d76d31956ac7ca61e622", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3014, "upload_time": "2011-10-21T18:58:49", "url": "https://files.pythonhosted.org/packages/b7/94/75fec6bd379845b036edaa1495ea892e6ea44d8f53a12673c985fe983c39/django-pjax-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "5c302844d02e27752557a918c296d8f8", "sha256": "f84863adeb11ab6f3e6874ccaf420a0ecc8b001c85ec7787d61896576e4c9a6c" }, "downloads": -1, "filename": "django-pjax-1.2.tar.gz", "has_sig": false, "md5_digest": "5c302844d02e27752557a918c296d8f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3733, "upload_time": "2012-03-14T15:06:09", "url": "https://files.pythonhosted.org/packages/09/41/657c478d40925779636b17d6a6741f0eee964dbd1fe0f7ae0c36b34250dc/django-pjax-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "4bf049203314b9303bc38f38b0176701", "sha256": "37a7451b2d04ff6d44538048d11ab02fb411fa26ffe91b5808bb7358a72c8562" }, "downloads": -1, "filename": "django-pjax-1.3.tar.gz", "has_sig": false, "md5_digest": "4bf049203314b9303bc38f38b0176701", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4664, "upload_time": "2015-07-06T18:21:29", "url": "https://files.pythonhosted.org/packages/ed/f5/fda0b18c02044c53099e115453052ac93918f111363ad49065dee5d4c6de/django-pjax-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "daaa5f7f1d461b5bf9d8b8694bb03237", "sha256": "2c988a77dd8d92a19950e822a3cfb54f42b08b57325720222c53c66dedb5558b" }, "downloads": -1, "filename": "django-pjax-1.4.tar.gz", "has_sig": false, "md5_digest": "daaa5f7f1d461b5bf9d8b8694bb03237", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3859, "upload_time": "2015-09-28T18:51:29", "url": "https://files.pythonhosted.org/packages/df/08/f662091f67609087f7f6c8b98e3b344279b3d01fd458d655a858193d9b01/django-pjax-1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "daaa5f7f1d461b5bf9d8b8694bb03237", "sha256": "2c988a77dd8d92a19950e822a3cfb54f42b08b57325720222c53c66dedb5558b" }, "downloads": -1, "filename": "django-pjax-1.4.tar.gz", "has_sig": false, "md5_digest": "daaa5f7f1d461b5bf9d8b8694bb03237", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3859, "upload_time": "2015-09-28T18:51:29", "url": "https://files.pythonhosted.org/packages/df/08/f662091f67609087f7f6c8b98e3b344279b3d01fd458d655a858193d9b01/django-pjax-1.4.tar.gz" } ] }