Skip to main content

heggra

An htmx-powered file upload widget for Django forms, with drag and drop, that fits any CSS framework.

Setup

heggra needs Python 3.14+, Django 6.0+ and htmx 2. Install it with:

pip install heggra

Use pip install "heggra[image]" for image fields. Add heggra to INSTALLED_APPS, include heggra.urls, and load htmx and {{ form.media }} on the page. Then use the widget:

from heggra import UploadWidget


class IssueForm(forms.ModelForm):
    class Meta:
        model = Issue
        fields = ["cover"]
        widgets = {"cover": UploadWidget(image=True)}

The documentation covers the rest, including styling for Bulma and other CSS frameworks.

Development

uv sync
uv run pre-commit install
uv run pytest
uv run ruff check .

To build the documentation:

uv run --group docs sphinx-build -W docs docs/_build/html

License

heggra is released under the GNU General Public License v3.0 or later. See LICENSE.

Metadata

Release files for heggra 0.1.0

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

Source distribution (sdist)

Source distribution for heggra 0.1.0
File Size Uploaded Provenance Actions
heggra-0.1.0.tar.gz 31.7 kB Without provenance Details for heggra-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for heggra 0.1.0
File Interpreter ABI Platform Actions
heggra-0.1.0-py3-none-any.whl Python 3 none any Details for heggra-0.1.0-py3-none-any.whl

Total release size: 66.4 kB

Release files / heggra-0.1.0.tar.gz

Download URL heggra-0.1.0.tar.gz
Size 31.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0fdbd4d12cd434afc725bee8995e731656b94dcf95d3c272714c198ddefbd780
BLAKE2b-256 checksum
How to use checksums
da8cd7f9dc529007de8d835d496a177b33835eb97ef4df0ec52147eb530a1698
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / heggra-0.1.0-py3-none-any.whl

Download URL heggra-0.1.0-py3-none-any.whl
Size 34.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5701cb3b1db71ee4c3eabedc52d64dcf7358d76d12fc40e987cb6a1b5f85d518
BLAKE2b-256 checksum
How to use checksums
131581f96d75a26fa95c4cea2243b5fdef91ec3ec92ae27875a9a01823ed6b83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for heggra 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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