admin

Django admin customization with ModelAdmin

The Django admin is powerful when customized. I set list_display for column layout, list_filter and search_fields for finding records. Using readonly_fields, I prevent editing certain fields. The fieldsets organize the form layout. For computed values

Turbo Drive: disable caching on volatile admin pages

Turbo Drive caches pages aggressively, which is usually great. For volatile admin dashboards (counts, queues, toggles) you often want no-cache to avoid confusing “stale UI” bugs. turbo_cache_control makes the intent explicit.

Stimulus: bulk selection + Turbo batch action

For batch operations, Stimulus can manage the UI state (select all, indeterminate checkbox) while Turbo submits a regular form. This keeps the server in charge of authorization and the UI simple.

Guard Rails for Dangerous Admin Actions

Admin actions are production sharp edges. Require a typed confirmation string, log actor + request_id, and run the dangerous work in a background job. This reduces accidental incidents.

Admin “quick toggle” with Turbo Streams and a single partial

Admin toggles (published/unpublished, featured/unfeatured) are a perfect Hotwire use case: server-rendered state, instant UI update. I render the toggle as a partial inside a frame, and the update action responds with a turbo stream replacing that fra