You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Visiting a record — including the Django-admin `/<pk>/change/` URL alias —
now opens the read-only DETAILS view instead of the edit form. A shared link
is safe to open: the viewer reads the record (FK/M2M as linked labels,
choices as display labels, inlines as read-only tables) and clicks the
toolbar Edit button to flip into edit mode in place. `?edit=1` still
deep-links straight to edit and lands the "Save and continue editing"
round-trip there; view-only users never see Edit. The add form is
unaffected.
Implementation: drop the route-forced `initialEditing` (the `/change` route
now renders the same `<DetailPage />` as `/<pk>`); edit mode derives solely
from `?edit=1`. The read/edit rendering split, FK-link/choice rendering, and
read-only inlines already existed — only the default mode changed. Adds
DetailPage tests for read-default, the `/change` alias, `?edit=1`, and the
view-only case. No backend / form-spec change.
Co-authored-by: Martin Castro Laminrs <mcastro@laminr.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments