Skip to main content

Django plugin wrapping whitenoise

Project description

django-plugin-whitenoise

PyPI Changelog Tests License

Django plugin wrapping whitenoise

Installation

First configure your Django project to use DJP.

Then install this plugin in the same environment as your Django application.

pip install django-plugin-whitenoise

Usage

The plugin sets defaults for the following settings if they are found to be unset. This completely configures static file handling so you should have a working static files process just by installing the plugin.

  • WHITENOISE_ROOT defaults to BASE_DIR / "public". Put files like robots.txt and favicons here to serve them at the root of the site.
  • WHITENOISE_KEEP_ONLY_HASHED_FILES defaults to True to include only useful copies of the static files.
  • STATICFILES_DIRS defaults to [BASE_DIR / "static"].Put project-wide static files here.
  • STATIC_ROOT and STATIC_URL are set to reasonable values.

Override these settings as desired after the djp.settings(globals()) call.

No further configuration is needed, refer to whitenoise documentation to learn about your new capabilities.

Development

Install uv following uv's install documentation. Install just with uv tool install rust-just.

Testing

just test

Linting

just lint

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

django_plugin_whitenoise-0.1.2.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_plugin_whitenoise-0.1.2-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file django_plugin_whitenoise-0.1.2.tar.gz.

File metadata

File hashes

Hashes for django_plugin_whitenoise-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b8bcedac29f9c45960c33a5d800a250236aefe4680b9e4f9356ef3125f4f6d88
MD5 fe3eebd398c814629c5267c09cb51f36
BLAKE2b-256 1c4d05687f2ba5f02fd6892d9af84a66d6ff738ac56bdc06fb624207210abc4e

See more details on using hashes here.

File details

Details for the file django_plugin_whitenoise-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_plugin_whitenoise-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 33b73264e8cb1dc03b3c83e18a9f8f655ba3641c88e82dc4046f6325a40508bd
MD5 87379f07410502e2bdb761096f6c142d
BLAKE2b-256 eda76e77dc90b614cc81f819478b87d993427e0aaaa5b34152f291e0060b04a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page