{ "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": "[SwampDragon-live](https://github.com/mback2k/swampdragon-live) is an\nextension to [Django](https://www.djangoproject.com/) and\n[SwampDragon](http://swampdragon.net/) with SwampDragon-auth and django-redis\nwhich adds support for live updating Django template snippets on model changes.\n\nInstallation\n------------\nInstall the latest version from pypi.python.org:\n\n pip install SwampDragon-live\n\nInstall the development version by cloning the source from github.com:\n\n pip install git+https://github.com/mback2k/swampdragon-live.git\n\nConfiguration\n-------------\nAdd the package to your `INSTALLED_APPS`:\n\n INSTALLED_APPS += (\n 'swampdragon',\n 'swampdragon_live',\n )\n\nExample\n-------\nMake sure to use django-redis as a Cache backend named 'swampdragon-live' or 'default':\n\n CACHES = {\n 'swampdragon-live': {\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\nMake sure to add the following line to your Django settings file:\n\n SWAMP_DRAGON_CONNECTION = ('swampdragon_auth.socketconnection.HttpDataConnection', '/data')\n\nLoad the required JavaScript template-tags within your Django template:\n\n {% load swampdragon_tags %}\n {% load swampdragon_live %}\n\nAdd the required JavaScript to your Django template:\n\n {% swampdragon_settings %}\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 'table' '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 'table-row' 'includes/row_cols.html' row=row perms=perms %}\n\nUse the swampdragon_live 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