Drop-in playground for Django Cotton component libraries — annotated, copy-and-pasteable, themable.
Project description
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.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_cotton_gallery-0.1.0.tar.gz.
File metadata
- Download URL: django_cotton_gallery-0.1.0.tar.gz
- Upload date:
- Size: 368.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99f10f5e0742603e33058568547284b9fa3483a4a74aa39a8a0cb3cb9bba331a
|
|
| MD5 |
5e46c4cb0ced224adb085ddb180a6d6a
|
|
| BLAKE2b-256 |
fbf24c402cd8b04b44f0ef7ad5c37f83bb2feee25322f7e0820976ff967ae6a2
|
Provenance
The following attestation bundles were made for django_cotton_gallery-0.1.0.tar.gz:
Publisher:
release.yml on velezanthony/django-cotton-gallery
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_cotton_gallery-0.1.0.tar.gz -
Subject digest:
99f10f5e0742603e33058568547284b9fa3483a4a74aa39a8a0cb3cb9bba331a - Sigstore transparency entry: 2039537162
- Sigstore integration time:
-
Permalink:
velezanthony/django-cotton-gallery@69fda4e8b825c5186e3568ff1bb9b1bcba6a8b9d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/velezanthony
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@69fda4e8b825c5186e3568ff1bb9b1bcba6a8b9d -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_cotton_gallery-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_cotton_gallery-0.1.0-py3-none-any.whl
- Upload date:
- Size: 418.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a010fe3e167269e1c6693726693cfa282a2d55707555d9421756aac9e05da86
|
|
| MD5 |
c8457a261bfe31718044daf9a41a9d67
|
|
| BLAKE2b-256 |
4f51b82e7a77e5b9122776fbf2204129f3517a044c9ca19f2063f8fad4810cc6
|
Provenance
The following attestation bundles were made for django_cotton_gallery-0.1.0-py3-none-any.whl:
Publisher:
release.yml on velezanthony/django-cotton-gallery
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_cotton_gallery-0.1.0-py3-none-any.whl -
Subject digest:
9a010fe3e167269e1c6693726693cfa282a2d55707555d9421756aac9e05da86 - Sigstore transparency entry: 2039537250
- Sigstore integration time:
-
Permalink:
velezanthony/django-cotton-gallery@69fda4e8b825c5186e3568ff1bb9b1bcba6a8b9d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/velezanthony
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@69fda4e8b825c5186e3568ff1bb9b1bcba6a8b9d -
Trigger Event:
push
-
Statement type: