django-cotton-gallery
Drop-in playground for your django-cotton components — annotate them once with @prop comments and get a live, themable, copy-and-paste gallery with auto-generated controls, a lint report, and an insights dashboard.
📚 Docs: https://velezanthony.github.io/django-cotton-gallery/
Install (≈60 seconds)
The gallery is a development-only tool, so the recommended install is as a dev dependency with uv — that way it never ships to production (uv sync --no-dev leaves it out):
uv add --dev django-cotton-gallery
Prefer pip? That works just as well:
pip install django-cotton-gallery
# settings.py
INSTALLED_APPS = [
# ...
"django_cotton", # already there if cotton is set up
"django_cotton_gallery",
]
# urls.py
from django.conf import settings
from django.urls import include, path
urlpatterns = [...]
# Gate it — the gallery exposes component source code. Do NOT ship to prod.
if settings.DEBUG:
urlpatterns += [path("", include("django_cotton_gallery.urls"))]
Run your server and open http://localhost:8000/django-cotton-gallery/. That's it — the gallery indexes whatever cotton already finds. The empty state walks you through your first component if the catalog is empty.
Need production access patterns (staff-only, feature flags), asset injection, or per-setting reference? → Getting started · Configuration
What you get
Live playground — every component renders with auto-generated controls from your @prop annotations. Tweak any prop in real time, copy the tag, done.
Lint report — three severity tiers (errors, warnings, hints) for @prop/<c-vars> mismatches, missing descriptions, and undeclared variables. The same engine runs in CI as python manage.py cotton_lint.
Insights dashboard — config health, annotation coverage, zombie components, most-referenced ranking. Spot rot before it ships.
Ctrl+K switcher with structured filters (prop:size, slot:actions, accepts-attrs, has-named-slots, deprecated) — find any component without leaving the keyboard.
Plus: a refactor planner (transitive dependency tree), an annotation builder (form-based @prop editor), a side-by-side compare view, and i18n chrome (English, Spanish, Basque, French). → Full feature tour
Compatibility
| Versions | |
|---|---|
| Python | 3.10 · 3.11 · 3.12 · 3.13 |
| Django | 4.2 LTS · 5.0 · 5.1 · 5.2 LTS · 6.0 |
| i18n | English (default) · Spanish · Basque · French |
CI verifies every valid Python × Django combination on every push (plus Windows + macOS smoke tests).
Contributing & local development
Clone, then make dev && make serve to run the bundled demo at http://localhost:8000/django-cotton-gallery/. Everything else — repo layout, tests, the Python × Django matrix, i18n, releases — lives in docs/contributors/. See also CONTRIBUTING.md and the CHANGELOG.
Support
If this project saves you time, consider sponsoring its development. It helps keep it maintained.
License
MIT — see LICENSE.
Metadata
Release files for django-cotton-gallery 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_cotton_gallery-1.0.1.tar.gz | 437.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_cotton_gallery-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 930.4 kB
Release files / django_cotton_gallery-1.0.1.tar.gz
| Download URL | django_cotton_gallery-1.0.1.tar.gz |
|---|---|
| Size | 437.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cf4c18e08b5fa25503f0c70fb38ae4ac777e09f9dc224897bc69d4fd48b9e06
|
|
BLAKE2b-256 checksum How to use checksums |
35ec14cd2d6d37e00235b2a64b6ac374a5552a9369cc5e5a67f467739489b801
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency logRelease files / django_cotton_gallery-1.0.1-py3-none-any.whl
| Download URL | django_cotton_gallery-1.0.1-py3-none-any.whl |
|---|---|
| Size | 492.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49d7c698e0a5d7e94c2ac2063399b5d409214100e36fac2d57ff592ee342c7c5
|
|
BLAKE2b-256 checksum How to use checksums |
f7a51d8542dd19d5fb30aa41fa25e5abbffecf8e0221e796e20e32da6dda31e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.
Transparency log