django-xstatic
Use XStatic packages and Django StaticFiles to manage your static files like jQuery.
Why?
Managing static files is a PAIN, You must download them, unpack them copy them, keep them up to date … Wouldn’t it be cool if you cool just pip install them?
What does it do?
django-xstatic makes the static files from xstatic packages installed in INSTALLED_APPS be collected by ./manage.py collectstatic.
Installation and usage
Install django-xstatic
Add 'django_xstatic.finders.XStaticFinder' to your STATICFILES_FINDERS
Install your xstatic packages and add them to INSTALLED_APPS
Run ./manage.py collectstatic
Open questions
django-xstatic detects xstatic package when they are in the INSTALLED_APPS list. Should it uses its own settings key?
What it should (maybe) do, but doesn’t yet
In the current version, you still have to remember the names of the javascript file names, but wouldn’t you like to have only this in your templates:
<head>
{% xstatic jquery %}
{% xstatic jquery.autocomplete %}
</head>
xstatic packages comes with a metadata value named LOCATIONS, giving URLs of CDN serving these same static files, django-xstatic should give a template tag to use them easily.
Bonus Feature
It works with django-compressor!
Metadata
Release files for django-xstatic 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-xstatic-0.0.2.tar.gz | 3.0 kB | Without provenance | Details for django-xstatic-0.0.2.tar.gz |
Release files / django-xstatic-0.0.2.tar.gz
| Download URL | django-xstatic-0.0.2.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b611e2f58aa203aceafae57709c62ccc96a84498bd9d111583ef893498368152
|
|
BLAKE2b-256 checksum How to use checksums |
3f46bd40dc769ec0cd288fca2bf1ae8e5cfc4822f8bf81c04463355433e1a8b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-xstatic 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.