Integrate live.js into django site
Project description
Integrates live.js into your django project.
There is already a project named django-livejs, so I added “2” to the name to avoid conflict. (Additionally I think my version is better than that one :P )
Installation
Either run python setup.py install or use pip to install the package.
Edit your settings.py to add 'django_livejs2.middleware.LiveJsMiddleware' to MIDDLEWARE_CLASSES. Also add 'django_livejs2' to INSTALLED_APPS if you want to use the shipped live.js.
Usage
Just visit any page with live=1 in query string to enable the module. When enabled, live.js will be included in every HTML page. The module will also make all files uncacheable by browser, so that any updates to static files will have effect immediately. (Without that Firefox may cache static files for 1 minute)
Disabling is also easy, visit any page with live=0 in query string and you are done.
Note: If settings.DEBUG is not True, the module will be completely disabled since it is not really useful in production environment.
Settings
LIVEJS2_SCRIPT_SRC
If you want to use a custom version of live.js, set this to URL of the script.
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
File details
Details for the file django-livejs2-1.0.tar.gz
.
File metadata
- Download URL: django-livejs2-1.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54f8d0c22a417a9c2afba530631686d68cf9050403809583ae2f395f724b319c |
|
MD5 | 4136627468ff7cc04062629de34fd6de |
|
BLAKE2b-256 | 4ef4d3d3fd1dd6516e9528ba0d42b95a75c11296e4d8584d1a3fafe475bfcecd |