{ "info": { "author": "Marc Hoersken", "author_email": "info@marc-hoersken.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "[Django-Live-Templates](https://github.com/mback2k/django-live-templates) is\nan extension to [Django](https://www.djangoproject.com/) and\n[Channels](https://channels.readthedocs.io/) which adds\nsupport for live updating Django template snippets on model changes.\n\nThis project is based upon and a partial reimplementation to Channels of\n[SwampDragon-live](https://github.com/mback2k/swampdragon-live) which was build\nusing [SwampDragon](https://github.com/hagsteel/swampdragon)\nwith SwampDragon-auth and django-redis.\n\nInstallation\n------------\nInstall the latest version from pypi.python.org:\n\n pip install django-live-templates\n\nInstall the development version by cloning the source from github.com:\n\n pip install git+https://github.com/mback2k/django-live-templates.git\n\nConfiguration\n-------------\nAdd the package to your `INSTALLED_APPS`:\n\n INSTALLED_APPS += (\n 'channels',\n 'django_live_templates',\n )\n\nExample\n-------\nMake sure to use django-redis as a Cache backend named 'django-live-templates' or 'default':\n\n CACHES = {\n 'django-live-templates': {\n 'BACKEND': 'django_redis.cache.RedisCache',\n 'LOCATION': 'redis://localhost:6379/0',\n 'OPTIONS': {\n 'CLIENT_CLASS': 'django_redis.client.DefaultClient',\n }\n }\n }\n\nLoad the required JavaScript template-tags within your Django template:\n\n {% load django_live_template %}\n\nAdd the required JavaScript to your Django template:\n\n \n\nUse the include_live template-tag instead of the default include template-tag,\nwith rows being a Django database QuerySet to listen for added, changed, deleted instances:\n\n {% include_live 'includes/table_body.html' rows=rows perms=perms %}\n\nUse the include_live template-tag instead of the default include template-tag,\nwith row being a single Django database Model instance to listen for changes:\n\n {% include_live 'includes/row_cols.html' row=row perms=perms %}\n\nUse the django_live_template variable within the included template to add the\nrequired classes to the root-tag of this template, e.g. the first tag-node:\n\n