{ "info": { "author": "Rhys Elsmore", "author_email": "me@rhys.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Flask-PJAX\n==========\n\n\n.. image:: https://travis-ci.org/rhyselsmore/flask-pjax.png?branch=master\n :target: https://travis-ci.org/rhyselsmore/flask-pjax\n\n.. image:: https://pypip.in/d/Flask-PJAX/badge.png\n :target: https://crate.io/packages/Flask-PJAX/\n\nAdd a fairly basic handler for PJAX to Flask.\n\nAllows you to specify a base template for both a normal request or a\nPJAX request. This allows you to return the required code blocks, and\nchoose what you wish to render.\n\nInstallation\n------------\n\n.. code-block:: bash\n\n pip install flask-pjax\n\nConfiguration\n-------------\n\nConfigiguring Flask-PJAX is fairly simple. To get started, initalise it against\nyour application.\n\n.. code-block:: python\n\n from flask import Flask\n from flask_pjax import PJAX\n\n app = Flask(__name__)\n PJAX(app)\n\nor\n\n.. code-block:: python\n\n from flask import Flask\n from flask_pjax import PJAX\n\n app = Flask(__name__)\n pjax = PJAX(app)\n\nor\n\n.. code-block:: python\n\n from flask import Flask\n from flask_pjax import PJAX\n\n pjax = PJAX()\n\n def create_app():\n app = Flask(__name__)\n pjax.init_app(app)\n return app\n\nCurrently, the base template for your PJAX request is the only configuration\nitem. This is set to the location of the template within your project.\n\n.. code-block:: python\n\n PJAX_BASE_TEMPLATE = \"pjax.html\"\n\nUsage\n-----\n\nYou can return your templates like you normally do.\n\n.. code-block:: python\n\n # app.py\n\n @app.route('/')\n def index():\n return render_template('index.html')\n\nYour base template remains the same.\n\n.. code-block:: html\n\n # base.html\n\n \n \n Woop\n \n \n {% block content %}{% endblock %}\n \n \n\nAnd you create a PJAX base template.\n\n.. code-block:: html\n\n # pjax.html\n\n Woop\n\n {% block content %}{% endblock %}\n\nAnd within your index template, you can specify your base template:\n\n.. code-block:: html\n\n # index.html\n\n {% extends pjax('base.html') %}\n\n Woop - Home\n\n {% block content %}\n This is my homepage\n {% endblock %}\n\nThis will render the pjax.html for PJAX requests, and the base for non-PJAX requests.\n\nFurthermore, you can specify a custom PJAX Base Template:\n\n.. code-block:: html\n\n {% extends pjax('base.html', pjax='/base/custom_pjax_template') %}\n\nContribute\n----------\n\n#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.\n#. Fork `the repository`_ on Github to start making your changes to the **master** branch (or branch off of it).\n#. Write a test which shows that the bug was fixed or that the feature works as expected.\n#. Send a pull request and bug the maintainer until it gets merged and published.\n\n.. _`the repository`: http://github.com/rhyselsmore/flask-pjax\n\nHistory\n=======\n\n0.0.1 (29/9/2013)\n-----------------\n\n- Conception.\n- Initial Commit of Package to GitHub.\n- First Release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/rhyselsmore/flask-pjax", "keywords": null, "license": "Copyright 2013 Rhys Elsmore\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", "maintainer": null, "maintainer_email": null, "name": "Flask-PJAX", "package_url": "https://pypi.org/project/Flask-PJAX/", "platform": "any", "project_url": "https://pypi.org/project/Flask-PJAX/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/rhyselsmore/flask-pjax" }, "release_url": "https://pypi.org/project/Flask-PJAX/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "PJAX Templating for Flask Applications", "version": "0.0.1" }, "last_serial": 876279, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "03765036076e6098f16f22d067a22ca3", "sha256": "c531efa52a43fecbc34debaadca67b7d9147a7a86910af7d086d5f377b080753" }, "downloads": -1, "filename": "Flask-PJAX-0.0.1.tar.gz", "has_sig": false, "md5_digest": "03765036076e6098f16f22d067a22ca3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3565, "upload_time": "2013-09-29T10:16:13", "url": "https://files.pythonhosted.org/packages/c0/8a/5f010c2016dadd2f8a2db987702b3f70b75f42bb3abeebbb56327a4aefd7/Flask-PJAX-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "03765036076e6098f16f22d067a22ca3", "sha256": "c531efa52a43fecbc34debaadca67b7d9147a7a86910af7d086d5f377b080753" }, "downloads": -1, "filename": "Flask-PJAX-0.0.1.tar.gz", "has_sig": false, "md5_digest": "03765036076e6098f16f22d067a22ca3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3565, "upload_time": "2013-09-29T10:16:13", "url": "https://files.pythonhosted.org/packages/c0/8a/5f010c2016dadd2f8a2db987702b3f70b75f42bb3abeebbb56327a4aefd7/Flask-PJAX-0.0.1.tar.gz" } ] }