{ "info": { "author": "Baldur \u00de\u00f3r Emilsson", "author_email": "baldur@baldur.biz", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: JavaScript", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "django-updateable\n=================\n\ndjango-updateable adds template tags to automatically update parts of pages via AJAX.\n\nInstall\n-------\n\nYou can use pip to install:\n\n pip install django-updateable\n\nConfigure\n---------\n\nAfter installing django-updateable you must change a few settings in your settings.py\n\n* Add ``updateable`` to INSTALLED_APPS\n* Add ``updateable.middleware.UpdateableMiddleware`` to MIDDLEWARE_CLASSES\n* Be sure to use the ``django.core.context_processors.request`` in your TEMPLATE_CONTEXT_PROCESSORS\n\nUsage\n-----\n\nAdd updateable.js to the pages where you use updateable, e.g.\n````. Load the tags in your\ntemplate, ``{% load updateable %}``. Wrap the parts of you template you would\nlike to update automatically in ``{% updateable %}`` and\n``{% endupdateable %}`` tags.\n\nExample template\n----------------\n::\n\n {% load staticfiles updateable %}\n \n \n \n \n example\n \n \n \n

Static header

\n {% updateable %}\n The time is {% now 'H:i:s' %}\n {% endupdateable %}\n \n \n\nThe time will be updated with 3 second intervals.\n\nSupported platforms\n-------------------\n\ndjango-updateable has been tested with Django 1.3, 1.4 and 1.5 on Python 2.7\nand with Django 1.5 on Python 2.6.\n\nIt has been tested on the latest version of Chrome (26) and Firefox (20). It\nworks with IE8 and up. If you need support for earlier versions of Internet \nExplorer you can use `this JavaScript file`_ which depends on jQuery.\n\n.. _this JavaScript file: https://raw.github.com/baldurthoremilsson/django-updateable/master/compat/updateable-compat.js\n\nImplementation details\n----------------------\n\nThe content in a ``{% updateable %}`` template tag is wrapped in a ``
``\nelement that contains data attributes with a unique ID and an MD5 hash of the\ncontent. Every AJAX request contains the IDs and hashes of the updateable\nblocks on the page along with a GET variable that triggers the\nUpdateableMiddleware to return only the parts of the page that have been\nupdated (the MD5 sum is used to decide which parts contain content that has\nchanged).\n\nA new dictionary object is created on the request object (request._updateable)\nthat contains data for the UpdateableMiddleware and the UpdateableNode (in the\ntemplate). The name of this object can be configured in the settings.\n\nAdvanced settings\n-----------------\n\nOptional settings in settings.py:\n\n* UPDATEABLE_REQUEST_OBJECT\n The name of the dictionary object that is created on the request object.\n Defaults to ``'_updateable'``\n* UPDATEABLE_GET_VARIABLE\n Configures the name of the GET variable that triggers UpdateableMiddleware\n to intercept the response and return only the updated parts of the page.\n See getVariable in the JavaScript settings.\n Defaults to ``'update'``\n\nOptional template tag setting:\n\n* {% updateable [tagname] %}\n The given tagname is used for the enclosing element around the contents\n inside the updateable template tag.\n Defaults to ``div``\n\nOptional JavaScript settings:\n\n* getVariable\n The name of the GET variable that triggers the UpdateableMiddleware.\n See UPDATEABLE_GET_VARIABLES\n Defaults to ``'update'``\n* timeout\n Milliseconds between AJAX calls.\n Defaults to ``3000``\n* callback\n A function that is called for each DOM object that is replaced. The context\n of the function is the newly added DOM object.\n Defaults to an empty function\n\nThe JavaScript settings are read from a global object (on the window object)\ncalled updateableSettings. Example::\n\n \n \n \n \n\nUsage with jQuery Mobile\n------------------------\n\ndjango-updateable began life in a project that used `jQuery Mobile`_. When the\ncontent is updated it is necessary to call ``trigger('create')`` on the new\nDOM element, so the following updateableSettings can be useful in those\ncircumstances::\n\n updateableSettings = {\n callback: function() {\n $(this).trigger('create');\n }\n }\n\n.. _jQuery Mobile: http://jquerymobile.com/\n\nRelease history\n---------------\n\n0.2.1\n=====\nBugfix: IDs of updateable segments that started with numbers caused a bug in\nthe Javascript. Many thanks to edtanous_!\n\n.. _edtanous: https://github.com/edtanous\n\n0.2\n===\nBugfixes, and jQuery is no longer a dependency (except for old browsers).\n\n0.1\n===\nInitial release.", "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/baldurthoremilsson/django-updateable", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-updateable", "package_url": "https://pypi.org/project/django-updateable/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-updateable/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/baldurthoremilsson/django-updateable" }, "release_url": "https://pypi.org/project/django-updateable/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Automatic updates for portions of templates with {% updateable %} tag", "version": "0.2.1" }, "last_serial": 4133922, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2672cb61042532c93f9bbb0d3567dd3d", "sha256": "25f06ae9807dbf3b9c4ed177227736e1307473da985c75392bdf1432ac124d93" }, "downloads": -1, "filename": "django-updateable-0.1.tar.gz", "has_sig": false, "md5_digest": "2672cb61042532c93f9bbb0d3567dd3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38907, "upload_time": "2013-04-27T12:29:57", "url": "https://files.pythonhosted.org/packages/7d/eb/75eaa7e57346ce337a4fe7bdea5286ad0a61959f62ab266fa3d1151b97f4/django-updateable-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "5a9b8810e93df5ca816db5a6f9dbb150", "sha256": "4fd395b480003ea81cc3eabbbd0ecd3db6c13386ee7622dffdd54f08e0632fab" }, "downloads": -1, "filename": "django-updateable-0.2.tar.gz", "has_sig": false, "md5_digest": "5a9b8810e93df5ca816db5a6f9dbb150", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5481, "upload_time": "2013-05-06T00:21:48", "url": "https://files.pythonhosted.org/packages/69/45/ab4357f56d4cb3023f3e077181bf139bbbe93bc01dfd5a52c613f35618d6/django-updateable-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "b37491b9ee120ade51af8314e7df35a7", "sha256": "a11709a880b371fdc2bc62654a9850c0fd547f81f1b6f538b6c7336c9bc58279" }, "downloads": -1, "filename": "django-updateable-0.2.1.tar.gz", "has_sig": false, "md5_digest": "b37491b9ee120ade51af8314e7df35a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5368, "upload_time": "2014-07-07T23:58:44", "url": "https://files.pythonhosted.org/packages/87/12/a1eb60c98a76910d7c54d8dec2233c2f69d39bac577df6a41c052e3c1306/django-updateable-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b37491b9ee120ade51af8314e7df35a7", "sha256": "a11709a880b371fdc2bc62654a9850c0fd547f81f1b6f538b6c7336c9bc58279" }, "downloads": -1, "filename": "django-updateable-0.2.1.tar.gz", "has_sig": false, "md5_digest": "b37491b9ee120ade51af8314e7df35a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5368, "upload_time": "2014-07-07T23:58:44", "url": "https://files.pythonhosted.org/packages/87/12/a1eb60c98a76910d7c54d8dec2233c2f69d39bac577df6a41c052e3c1306/django-updateable-0.2.1.tar.gz" } ] }