This app provides a command named collectdir, which works like collectstatic but general purpose, so you need to add 'collectdir' to your settings.INSTALLED_APPS. It can be used to mix Django with frontend frameworks or build tools in NodeJS.
Consider such a project directory tree:
project/ - someapp/frontend # <- frontend dir in someapp module of project - otherapp/frontend # <- frontend dir in another INSTALLED_APPS - frontend/ # <- non commited directory, autogenerated from above
You can rebuild project/frontend with command:
# collect all app's frontend/ dir into ./frontend manage.py collectdir frontend:./frontend
If it detects a TTY, and watchdog is installed, it will keep running and synchronizing the target directory. To install collectdir with watchdog example:
pip install --user django-collectdir[dev]
Note that in CRUDLFA+, we use js instead of frontend, so if you want to add your own StimulusJS controllers to your bundle you can just add them in your app. And before executing the frontend toolchain, run:
manage.py collectdir js:./js
Or, for NextJS support:
manage.py appwatch pages:./pages
Or, for NextJS and React support and also have a components sub dir:
manage.py appwatch pages:./pages components:./pages/components
Have fun provisionning other frameworks with Django apps :)
Metadata
Release files for django-collectdir 1.0.0
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-collectdir-1.0.0.tar.gz | 4.1 kB | Without provenance | Details for django-collectdir-1.0.0.tar.gz |
Release files / django-collectdir-1.0.0.tar.gz
| Download URL | django-collectdir-1.0.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a76d58b55201351ed9b07c2e99f35d03c31d7f60e87da595b22d0182b7c930c
|
|
BLAKE2b-256 checksum How to use checksums |
9b1d737e7a6713f9b6f099c0225b899758fec548608f5749185c2fe66208a433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-collectdir 1.0.0
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.