feat(examples): jobs custom-form / legacy-iframe fixture + 1.10.0 (#659)#671
Merged
Merged
Conversation
…+ 1.10.0 Adds examples/jobs — a Job ModelAdmin that exercises the request-driven custom-view + custom-template pattern using only documented Django hooks (formfield_for_dbfield, an admin action, a change_view branch, a hand-rolled dual-listbox template). Path A renders the stock form-spec with the large-textarea metadata widget; Path B (?run_custom=1) returns renderer: legacy-iframe and the SPA embeds the legacy page in an iframe. Backend tests cover both paths and the ordered POST contract (#659). Raises dependency floors for the cross-repo contract: django-admin-rest-api ^1.5.0 (broadened legacy-iframe detection for request-driven custom views, #59) and django-admin-mcp-api >=1.3.0 (matching MCP release, #70). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
examples/jobs— the cross-repo custom-form fixture that proves the legacy-iframe escape hatch end-to-end. A singleJobmodel whoseModelAdminexercises the request-driven custom-view + custom-template pattern using only documented Django hooks (formfield_for_dbfield, an adminaction, achange_viewbranch, a hand-rolled dual-listbox template) — no SPA-specific API anywhere. The whole point: if this runs on/admin-react/, any legacy/admin/ModelAdmin does too.Two rendering paths
/admin-react/jobs/job/<pk>/change/: the stock form-spec;formfield_for_dbfieldsurfaces the large-textareametadatawidget (vLargeTextField), rendered natively by the SPA.?run_custom=1:change_viewrenders a custom dual-listbox template. The form-spec resolver returns{renderer: "legacy-iframe", legacy_url: …}(rest-api 1.5.0), and the SPA'sLegacyIframe(Detail-page form parity: honour ModelAdmin form / fieldsets / formfield_overrides / get_form (via rest-api form-spec) #659) embeds the legacy page in an iframe inside its own chrome. The ordered POST contract (getlist("selected_steps")) is preserved.What changed
examples/jobsapp (model, admin +get_step_registry, dual-listbox template, README) wired intoexamples/project.manage.py test examples.jobs).django-admin-rest-api→^1.5.0(autocomplete_fields / raw_id_fields support for high-cardinality FKs #59),django-admin-mcp-api→>=1.3.0(Consumer feedback drop — production-Django pilot (2026-05-26) #70). Lockfile updated.Validation
Completes the cross-repo trio: rest-api #59 (released 1.5.0) → mcp #70 (released 1.3.0) → react #659.
🤖 Generated with Claude Code