SwampDragon-live is an extension to Django and SwampDragon which adds support for live updating Django template snippets on model changes.
Project description
[SwampDragon-live](https://github.com/mback2k/swampdragon-live) is an
extension to [Django](https://www.djangoproject.com/) and
[SwampDragon](http://swampdragon.net/) with SwampDragon-auth and Celery
which adds support for live updating Django template snippets on model changes.
Installation
------------
Install the latest version from pypi.python.org:
pip install SwampDragon-live
Install the development version by cloning the source from github.com:
pip install git+https://github.com/mback2k/swampdragon-live.git
Configuration
-------------
Add the package to your `INSTALLED_APPS`:
INSTALLED_APPS += (
'swampdragon',
'swampdragon_live',
)
Example
-------
Make sure to add the following line to your Django settings file:
SWAMP_DRAGON_CONNECTION = ('swampdragon_auth.socketconnection.HttpDataConnection', '/data')
Load the required JavaScript template-tags within your Django template:
{% load swampdragon_tags %}
{% load swampdragon_live %}
Add the required JavaScript to your Django template:
{% swampdragon_settings %}
<script type="text/javascript" src="{{ STATIC_URL }}swampdragon/js/dist/swampdragon.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}swampdragon/js/dist/swampdragon.live.js"></script>
Use the include_live template-tag instead of the default include template-tag,
with rows being a Django database QuerySet to listen for added, changed, deleted instances:
{% include_live 'table' 'includes/table_body.html' rows=rows perms=perms %}
Use the include_live template-tag instead of the default include template-tag,
with row being a single Django database Model instance to listen for changes:
{% include_live 'tr' 'includes/row_cols.html' row=row perms=perms %}
A real-world example can be found in the Django project WebGCal:
* https://github.com/mback2k/django-webgcal/blob/master/webgcal/apps/webgcal/templates/show_dashboard.html
* https://github.com/mback2k/django-webgcal/tree/master/webgcal/apps/webgcal/templates/includes
License
-------
* Released under MIT License
* Copyright (c) 2015-2016 Marc Hoersken <info@marc-hoersken.de>
extension to [Django](https://www.djangoproject.com/) and
[SwampDragon](http://swampdragon.net/) with SwampDragon-auth and Celery
which adds support for live updating Django template snippets on model changes.
Installation
------------
Install the latest version from pypi.python.org:
pip install SwampDragon-live
Install the development version by cloning the source from github.com:
pip install git+https://github.com/mback2k/swampdragon-live.git
Configuration
-------------
Add the package to your `INSTALLED_APPS`:
INSTALLED_APPS += (
'swampdragon',
'swampdragon_live',
)
Example
-------
Make sure to add the following line to your Django settings file:
SWAMP_DRAGON_CONNECTION = ('swampdragon_auth.socketconnection.HttpDataConnection', '/data')
Load the required JavaScript template-tags within your Django template:
{% load swampdragon_tags %}
{% load swampdragon_live %}
Add the required JavaScript to your Django template:
{% swampdragon_settings %}
<script type="text/javascript" src="{{ STATIC_URL }}swampdragon/js/dist/swampdragon.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}swampdragon/js/dist/swampdragon.live.js"></script>
Use the include_live template-tag instead of the default include template-tag,
with rows being a Django database QuerySet to listen for added, changed, deleted instances:
{% include_live 'table' 'includes/table_body.html' rows=rows perms=perms %}
Use the include_live template-tag instead of the default include template-tag,
with row being a single Django database Model instance to listen for changes:
{% include_live 'tr' 'includes/row_cols.html' row=row perms=perms %}
A real-world example can be found in the Django project WebGCal:
* https://github.com/mback2k/django-webgcal/blob/master/webgcal/apps/webgcal/templates/show_dashboard.html
* https://github.com/mback2k/django-webgcal/tree/master/webgcal/apps/webgcal/templates/includes
License
-------
* Released under MIT License
* Copyright (c) 2015-2016 Marc Hoersken <info@marc-hoersken.de>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file SwampDragon-live-0.0.3a0.tar.gz.
File metadata
- Download URL: SwampDragon-live-0.0.3a0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32d38cf7f01e5b8dbc82f411c28a448bbad082c28ee7c945f35c42bffdd1357e
|
|
| MD5 |
bebc9ace9c8ebd85f74d7952c9a304f3
|
|
| BLAKE2b-256 |
a7b05819d828ce66273bc8e3f177aca9c7b25c33458a17187ef272e2f428d188
|
File details
Details for the file SwampDragon_live-0.0.3a0-py2-none-any.whl.
File metadata
- Download URL: SwampDragon_live-0.0.3a0-py2-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
319406c1e14e1ddb984ff6f6e48d9b609b7006d048ab7cc92f70fa30a3a3bf40
|
|
| MD5 |
f591f494a19a1c95f252179080ef5713
|
|
| BLAKE2b-256 |
2abb8de7050316108c65c58ecfcca922094f25e8370808db9c8c729e8d531078
|