Skip to main content

Build, collect and distribute django static files

Project description

hatch-django-collectstatic

Collect a django project's static files into its binary distribution archive.

Example usage in pyproject.toml:

[build-system]
requires = ["hatchling >= 1.26", "hatch-django-collectstatic"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel.hooks.django-collectstatic]
settings = "my_django_package.project.settings"

# If you have installed Django apps from packages besides Django,
# you'll need to enable the require-runtime-dependencies feature of
# hatch in order to make these packages available when collecting
# static files.
# Default value of require-runtime-dependencies = false
# require-runtime-dependencies = true

# Output directory where static files are collected in the target.
# Default value of output-directory = "static"
# output-directory = "custom-static-directory"

[tool.hatch.build.targets.wheel.shared-data]
# Mapping from output directory to the distribution path.  The
# following configuration will place the files in the .data directory
# of the wheel, under "data/share/static".
# See https://packaging.python.org/en/latest/specifications/binary-distribution-format/#the-data-directory
"static" = "share/static"

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

hatch_django_collectstatic-0.0.4.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

hatch_django_collectstatic-0.0.4-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file hatch_django_collectstatic-0.0.4.tar.gz.

File metadata

File hashes

Hashes for hatch_django_collectstatic-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e2c3eeb85fa6ae93354811ff38c33ed858323639fbfd28e6b0842fbfc67f6d9e
MD5 dc8a66fd4bccb70be339e1af3e0cc40f
BLAKE2b-256 8197a1f7021e5259d8bada53c3e0967aa56a2d0dda5cfc912a9c2698990fc26c

See more details on using hashes here.

File details

Details for the file hatch_django_collectstatic-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for hatch_django_collectstatic-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 20a1447f86534c4b514644bdec1de69887b4f3a843b20eb778d27140375a7c3d
MD5 1e4069f237da5053aa3ee15f012306be
BLAKE2b-256 24346438ab02f87617673e438d557c3f03c5588c56f62c0ded4e65b2b28bc181

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