Skip to main content

Source: https://github.com/claudep/django-remote-finder

Download: https://pypi.python.org/pypi/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:

# if omitted, default to {settings.STATIC_ROOT}/remote_finder_cache
REMOTE_FINDER_CACHE_DIR = '/path/to/staticfile/cache'

REMOTE_FINDER_RESOURCES = [
    ('jquery.min.js', 'http://code.jquery.com/jquery-2.0.2.min.js', 'sha1:1e0331b6dd11e6b511d2e3d75805f5ccdb3b83df'),
]

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'remote_finder.RemoteFinder',
)

And then e.g. in a template, you can write:

{% load static %}
<script src="{% static "jquery.min.js" %}"></script>

No more need to keep such files in the repository! ./manage.py runserver (with DEBUG=True) will download the files as needed, as will ./manage.py collectstatic.

NOTE: the Django documentation says “Static file finders are currently considered a private interface, and this interface is thus undocumented.” As such, this package may break unexpectedly in the future. See https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-STATICFILES_FINDERS for details.

Release files for django-remote-finder 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-remote-finder 0.5
File Size Uploaded
django_remote_finder-0.5.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-remote-finder 0.5
File Interpreter ABI Platform
django_remote_finder-0.5-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / django_remote_finder-0.5.tar.gz

Download URL django_remote_finder-0.5.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
acf25037f9396816f071481eaeb3c30f6f8759883eee11262e4938606ee6847c
BLAKE2b-256 checksum
How to use checksums
d6302b1525cc740110d0ea782a4c765acb22ff06dea4e3ecb602ed4949cb09d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.2

Release files / django_remote_finder-0.5-py3-none-any.whl

Download URL django_remote_finder-0.5-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fda9f1286e6f0dcdae1bcb3e97bf93a237d74ddb4d9391eaf5a76fcc1c836d12
BLAKE2b-256 checksum
How to use checksums
ea12c57763267c550e6a113218e6e082767d5aa591bde49143c94ec505ce941f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.5 This release

2 release files

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page