viewflow/seedkit / skills/django-seedkit
django-seedkit
FlaggedBootstrap a new Django project, or add components — auth (allauth, magic-link, axes, 2FA), payments (Stripe, dj-stripe), REST (django-modern-rest, django-bolt), Celery / Django Tasks, async views & WebSockets (ASGI, uvicorn worker, django-channels, channels-redis), Tailwind+DaisyUI, favicon, SEO meta tags + sitemap, HTML email templates, S3 storage, structlog, healthchecks, Docker, CI, deploy (VPS / Fly / GitHub-SSH), dbbackup, Sentry/Bugsink — to an existing Django codebase. Use whenever the user wants to scaffold Django, integrate a Django package, set up async / WebSockets, set up production deploys, wire CI/CD, or extend an existing Django project.
references/storage-whitenoise.md
View on GitHub# Storage — WhiteNoise + Local Media
Docs: <https://whitenoise.evans.io/>
WhiteNoise serves **static files only**. User-uploaded media goes elsewhere:
- **VPS**: Caddy serves media from a Docker volume.
- **Managed platforms**: ephemeral filesystems lose media on redeploy — use `storage-s3.md`.
## Install
```sh
uv add whitenoise
```
## Settings — base / single-file
Static + media paths only (no middleware in base — runserver serves
static via finders in dev, and WhiteNoise's manifest storage needs
`collectstatic` to have run):
```python
STATIC_URL = "/static/"
STATIC_ROOT = BASE_DIR / "staticfiles"
MEDIA_URL = "/media/"
MEDIA_ROOT = BASE_DIR / "media"
```
## Settings — production.py
Insert `WhiteNoiseMiddleware` directly after `SecurityMiddleware`, and
flip `staticfiles` to manifest storage:
```python
sec_idx = MIDDLEWARE.index("django.middleware.security.SecurityMiddleware")
MIDDLEWARE.insert(sec_idx + 1, "whitenoise.middleware.WhiteNoiseMiddleware")
STORAGES = {
"default": {"BACKEND": "django.core.files.storage.FileSystemStorage"},
"staticfiles": {"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage"},
}
```
(Single-file layout: gate both on `not DEBUG`.)
`CompressedManifestStaticFilesStorage` is the only switch needed for compression + hashed filenames.
`STORAGES` (Django 4.2+) replaces legacy `STATICFILES_STORAGE` and `DEFAULT_FILE_STORAGE`. Don't set the legacy keys alongside it.
## config/urls.py
Serve media in dev:
```python
from django.conf import settings
from django.conf.urls.static import static
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
```
## VPS — docker-compose.prod.yml
Shared `media` volume between `web` and `caddy`. The production Dockerfile
runs gunicorn as `USER django`, but Docker copies image contents into a
**fresh** named volume only on first creation — and the resulting mount
point is owned by root. Pre-create `/app/media` with `chown django:django`
in the Dockerfile *before* the volume mounts in, otherwise the first upload
fails with `EACCES`:
```dockerfile
# In the production Dockerfile, before `USER django`:
RUN mkdir -p /app/media && chown django:django /app/media
```
```yaml
services:
web:
volumes:
- media:/app/media
caddy:
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
- media:/srv/media:ro
volumes:
pgdata:
caddy_data:
caddy_config:
media:
```
## VPS — Caddyfile
Media block: see `references/deploy-vps.md` (`## deploy/Caddyfile`, the `handle /media/*` block with `uri strip_prefix /media`).
## Managed platforms
WhiteNoise serves static from the container — nothing extra. Media on managed platforms needs external storage; use `storage-s3.md`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |