Releases: emichaud/django-smallstack
v0.8.30 — Related Object Tabs
Related Object Tabs on CRUDView Detail Pages
Detail pages now automatically show a tabbed section for reverse FK relations. Each tab displays a paginated table of related objects with links into their own CRUDView detail page.
Features
- Auto-discovery: Only relations whose related model has a registered CRUDView are shown — no configuration needed for the common case
- Lazy HTMX loading: Only the active tab fetches data; tab counts are the only eager queries
- FK field hidden: The FK field pointing back to the parent is automatically excluded from tab columns
- Rich context model: Templates get full metadata (counts, URLs, model info) for flexible UI customization
- Configurable:
related_tabs,related_tabs_exclude,related_tabs_paginate_byon CRUDView;explorer_related_tabs*variants for Explorer admin classes
Configuration
class CustomerCRUDView(CRUDView):
model = Customer
related_tabs = ["order_set", "invoice_set"] # or None for auto-discover, False to disable
related_tabs_exclude = ["internal_note_set"]
related_tabs_paginate_by = 20No API Impact
The related tabs feature is entirely HTML-side. No changes to REST API endpoints or serialization.
v0.8.29
Heartbeat HTTP Endpoint
Replaced the cron-based manage.py heartbeat command with an HTTP endpoint (POST /heartbeat/ping/) to eliminate SQLite "database is locked" errors.
Changes
- New endpoint —
POST /heartbeat/ping/(CSRF-exempt, localhost-only) runs the heartbeat check inside a gunicorn worker - Service extraction — core heartbeat logic moved to
apps/heartbeat/services.py, shared by the endpoint and management command - Cron updated — now uses
curl -sf -X POST http://localhost:${PORT:-8000}/heartbeat/ping/ - Management command retained — still available for manual use and
--reset-epoch - Docs updated — uptime monitoring guide, about page, Docker architecture diagram, and empty-state template
v0.8.28
Display system expansion
New: CardDisplay family with pluggable item templates
CardDisplaynow ships as a zero-config key-value card grid — no subclass needed.- Subclasses author new card variants by pairing an
item_templatepartial with abuild_card()override. AvatarCardDisplay— avatar + title + subtitle + pill, with dotted-path / callable support on every field kwarg.
New: CalendarDisplay
- Month-grid calendar for any model with a date or datetime field.
- Ranged events (
end_field), status tinting (status_field→ success/warning/danger), and ablockvariant for daily-stat dashboards alongside the defaultchipvariant. - Timezone-aware, Monday-start, URL-navigable via
?month=YYYY-MM.
New: list_columns / explorer_list_fields
- UI-only column override — trim the list table without affecting API/CSV output or the form-field set.
UI polish
- Stat-card style toolbar filters with inline labels + record count.
.crud-titleclass for consistent CRUD page headings.detail_grid.htmlno longer swallows falsy values.
Adoption
- Heartbeat daily stats replace the custom month-grid view with
CalendarDisplay(variant="block")+ ansla_statusmodel property (~120 lines deleted). - Profile, User, and LogEntry admins adopt the new card/calendar displays and
explorer_list_fields.
Skill docs: docs/skills/card-displays.md, docs/skills/calendar-displays.md.
v0.8.27
What's New
Swagger UI & ReDoc API Documentation
- Interactive API docs at
/api/docs/(Swagger UI) and/api/redoc/(ReDoc) - CDN-loaded — no Python packages required
- Per-response CSP headers to allow CDN scripts without weakening global CSP
- ReDoc themed to match SmallStack brand colors
Request ID Middleware
- Every response includes
X-Request-IDheader for request correlation - Reuses incoming
X-Request-IDfrom load balancers, or generatesreq_{uuid} - Stored in
RequestLog.request_idfor correlating user-reported errors to log entries
Debug Toolbar Environment Gate
- Controlled by
DEBUG_TOOLBAR=trueenv var (off by default) - Stays out of the way for screenshots and normal development
- Excludes
/api/docs/and/api/redoc/to prevent HTML injection issues - Error preview pages (
/_error/400/etc.) now work independently of toolbar
Bulk Select Dark Theme Fix
- Checkbox styling now uses theme-aware colors instead of white backgrounds
Documentation
- New help page: API Documentation — Swagger/ReDoc usage, theming, CSP, troubleshooting
- New help page: Debug Toolbar — enabling, panels guide, common scenarios, Docker tips
- New AI skill: update-docs-and-skills — file group map for keeping docs in sync after code changes
- Updated skills and help docs for request IDs across activity tracking, logging, and API references
v0.8.26
What's New
- Zone-based nav separation —
nav.register()now accepts azoneparameter (default"smallstack"), keeping admin and website nav items isolated - Website base template — New
templates/website/base.htmlwith no sidebar and a simple topbar; website pages extend this instead of the SmallStack base - Shared user menu — Extracted user dropdown into
smallstack/includes/user_menu.html, used by both website and admin topbars for a consistent experience - Profile URLs at
/profile/— Moved from/smallstack/profile/to top-level; profile pages use the website base template - "View Site" sidebar link — SmallStack admin sidebar now includes a link back to
/, similar to Django admin's "View site" - Apps grid on website — Staff users see the admin apps grid dropdown on the website topbar
- Login redirects to
/— Users land on the website after login, not the admin dashboard - Version in user menu — Staff users see the SmallStack version in the user dropdown
v0.8.25
v0.8.24
What's New
- APIToken auth fields —
token_typeandaccess_levelfields for fine-grained token control (login vs manual, full vs readonly vs auth-only) - Explorer display system — New display palette, detail card/form views, and
explorer.pymodel registry in smallstack app - Filter bar fixes — Fixed input border variable (
--input-borderinstead of undefined--border-color), added active filter indicator styling - API expansion — Registration, password management, user admin endpoints with OpenAPI schema
- CRUD template updates — Redesigned list toolbar, display palette, object detail/list pages, stats accessory template
Upgrade Notes
This release adds two new migrations to apps/smallstack:
0007_add_apitoken_fields0008_apitoken_type_and_access_level
Run make migrate after updating.
v0.8.23
What's New
Detail Displays
- DetailFormDisplay — form-style readonly detail view
- DetailGridDisplay — two-column label/value grid detail view
- New detail display styles in
_form_styles.html
Pagination & Transitions
- Redesigned paginator — compact
« ‹ 1 of X › »navigation replaces numbered page links - Stable table height — CSS custom property
--paginate-bykeeps table container height consistent on short last pages - Smooth HTMX transitions — 150ms opacity fade scoped to the display area only (toolbar stays static)
- Paginator now targets
#crud-display-areafor tighter swap scope
Explorer Default Change
- Explorer now defaults to
TableDisplayinstead of the deprecatedTable2Display(django-tables2) - All explorer views get the new paginator, transitions, and stable height automatically
Fixes
- Fixed
object_list_partial.html— HTMX pagination no longer adds a duplicate card header or loses the toolbar - Sort column toggle changed from asc→desc→clear to asc↔desc (two-state)
Theme
- Dark-blue palette contrast improvements (links, buttons)
- Theme color quick reference doc page added
🤖 Generated with Claude Code
v0.8.22
Stable table column widths
What's new
table-layout: fixedon.crud-table— column widths are now determined by headers only, preventing reflow when sort order changes- CSS truncation with title tooltips — long cell content gets
text-overflow: ellipsisand shows the full value on hover column_widthson CRUDView — optional dict ({"name": "30%", "description": "50%"}) for custom column proportions<colgroup>support — manual tables can set explicit column widths for proper proportionssortable_thtemplate tag — standalone sortable header for manual tables outside CRUDView
Activity app migration
- Removed
apps/activity/tables.py(django-tables2 dependency) - Migrated activity request tables to manual HTML with
{% sortable_th %}and<colgroup>for fixed column widths - Added
titleattributes on all activity table cells
Docs updated
tables.md— replaced deprecated django-tables2 sections with stable column width docs andcolumn_widthsexamplesbuilding-crud-pages.md— replaced{% render_table %}/{% load django_tables2 %}examples with{% crud_table %}patternuser-manager.md— removedtable_class = UserTablefrom CRUDView example
Full changelog
v0.8.21
What's New
Ordering & OpenAPI Spec
?ordering=field,-fieldon all CRUDView list endpoints and user listGET /api/schema/openapi.json— full OpenAPI 3.0.3 spec generation- OpenAPI spec includes filter, expand, export, and aggregation query parameters
- Typed response schemas for all auth endpoints (codegen tools now generate proper types)
Documentation
- Fixed error format in
authentication.mdto match{"errors": {...}}convention - Rewrote token refresh docs to reference
/api/auth/token/refresh/ - Expanded token operation diagram with all endpoints including public
- Added TanStack Query integration guide to
frontend-integration.md - Added REST API settings to
settings.mdand.env.example - Added API cross-reference to
user-management.md - Added dev CORS auto-config notes
Code Quality
- Shared
_paginate()helper for CRUD + user list - Shared
_resolve_token_expiry()for login, register, refresh QuerySettype hints and cleaner variable naming- 176 tests passing
🤖 Generated with Claude Code