Skip to content

Releases: emichaud/django-smallstack

v0.8.30 — Related Object Tabs

22 Apr 15:44

Choose a tag to compare

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_by on 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 = 20

No API Impact

The related tabs feature is entirely HTML-side. No changes to REST API endpoints or serialization.

v0.8.29

22 Apr 14:06

Choose a tag to compare

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 endpointPOST /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

05 Apr 01:11

Choose a tag to compare

Display system expansion

New: CardDisplay family with pluggable item templates

  • CardDisplay now ships as a zero-config key-value card grid — no subclass needed.
  • Subclasses author new card variants by pairing an item_template partial with a build_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 a block variant for daily-stat dashboards alongside the default chip variant.
  • 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-title class for consistent CRUD page headings.
  • detail_grid.html no longer swallows falsy values.

Adoption

  • Heartbeat daily stats replace the custom month-grid view with CalendarDisplay(variant="block") + an sla_status model 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

03 Apr 15:07

Choose a tag to compare

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-ID header for request correlation
  • Reuses incoming X-Request-ID from load balancers, or generates req_{uuid}
  • Stored in RequestLog.request_id for correlating user-reported errors to log entries

Debug Toolbar Environment Gate

  • Controlled by DEBUG_TOOLBAR=true env 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

03 Apr 01:29

Choose a tag to compare

What's New

  • Zone-based nav separationnav.register() now accepts a zone parameter (default "smallstack"), keeping admin and website nav items isolated
  • Website base template — New templates/website/base.html with 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

02 Apr 23:56

Choose a tag to compare

  • Bump version to v0.8.25
  • SDK bulk operations polish (empty-ids guards, Partial<T> type safety, hasBulkErrors helper, JSDoc on MutationAction)

v0.8.24

02 Apr 04:33

Choose a tag to compare

What's New

  • APIToken auth fieldstoken_type and access_level fields 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.py model registry in smallstack app
  • Filter bar fixes — Fixed input border variable (--input-border instead 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_fields
  • 0008_apitoken_type_and_access_level

Run make migrate after updating.

v0.8.23

29 Mar 01:15

Choose a tag to compare

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-by keeps 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-area for tighter swap scope

Explorer Default Change

  • Explorer now defaults to TableDisplay instead of the deprecated Table2Display (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

28 Mar 19:15

Choose a tag to compare

Stable table column widths

What's new

  • table-layout: fixed on .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: ellipsis and shows the full value on hover
  • column_widths on CRUDView — optional dict ({"name": "30%", "description": "50%"}) for custom column proportions
  • <colgroup> support — manual tables can set explicit column widths for proper proportions
  • sortable_th template 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 title attributes on all activity table cells

Docs updated

  • tables.md — replaced deprecated django-tables2 sections with stable column width docs and column_widths examples
  • building-crud-pages.md — replaced {% render_table %} / {% load django_tables2 %} examples with {% crud_table %} pattern
  • user-manager.md — removed table_class = UserTable from CRUDView example

Full changelog

v0.8.21...v0.8.22

v0.8.21

28 Mar 17:07

Choose a tag to compare

What's New

Ordering & OpenAPI Spec

  • ?ordering=field,-field on all CRUDView list endpoints and user list
  • GET /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.md to 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.md and .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
  • QuerySet type hints and cleaner variable naming
  • 176 tests passing

🤖 Generated with Claude Code