UNKNOWN
Project description
django-remote-finder
====================
This is a simple package designed to solve the annoying problem of
having to keep various javascript/css libraries updated within a
Django package. A ``requirements.txt`` file allows us to specify
external Python dependencies, but there is still no good way to keep
Javascript dependencies outside the repository. Until now.
Get started by adding the following to ``settings.py``::
REMOTE_FINDER_CACHE_DIR = '/path/to/staticfile/cache'
REMOTE_FINDER_RESOURCES = [
('jquery-2.0.2.min.js', 'http://code.jquery.com/jquery-2.0.2.min.js', '1e0331b6dd11e6b511d2e3d75805f5ccdb3b83df'),
]
And then e.g. in a template, you can write::
{% load staticfiles %}
<script src="{% static "jquery-2.0.2.min.js" %}"></script>
and the script will automatically download. No more need to keep it
in the repository!
NOTE: `Static file finders are currently considered a private
interface, and this interface is thus
undocumented.<https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-STATICFILES_FINDERS>`_
====================
This is a simple package designed to solve the annoying problem of
having to keep various javascript/css libraries updated within a
Django package. A ``requirements.txt`` file allows us to specify
external Python dependencies, but there is still no good way to keep
Javascript dependencies outside the repository. Until now.
Get started by adding the following to ``settings.py``::
REMOTE_FINDER_CACHE_DIR = '/path/to/staticfile/cache'
REMOTE_FINDER_RESOURCES = [
('jquery-2.0.2.min.js', 'http://code.jquery.com/jquery-2.0.2.min.js', '1e0331b6dd11e6b511d2e3d75805f5ccdb3b83df'),
]
And then e.g. in a template, you can write::
{% load staticfiles %}
<script src="{% static "jquery-2.0.2.min.js" %}"></script>
and the script will automatically download. No more need to keep it
in the repository!
NOTE: `Static file finders are currently considered a private
interface, and this interface is thus
undocumented.<https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-STATICFILES_FINDERS>`_
Project details
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-remote-finder-0.1.tar.gz
.
File metadata
- Download URL: django-remote-finder-0.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a6f0cfba869389666f5a5e7e4392667174be40c3a8e43c929bd66a7cf944eec |
|
MD5 | 327f536af716f57086f60f170d8e8874 |
|
BLAKE2b-256 | b718c36c06620c511b0dc23f0fe323abb7f19056a6b58218ccb47b1a8098f8eb |