-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Django admin actions can define intermediate confirmation pages that require user input before executing. These are currently not supported by the MCP.
Current Behavior
Admin actions are executed immediately with the provided IDs. Actions that require intermediate pages (confirmation dialogs, additional input) cannot be properly used.
Expected Behavior
Support a two-step workflow for actions that require confirmation:
- First call returns
requires_confirmation: truewith the confirmation template/fields - Second call with confirmation data executes the action
Django Admin Reference
@admin.action(description="Archive selected articles")
def archive_articles(modeladmin, request, queryset):
if 'confirm' not in request.POST:
# Return intermediate page
return render(request, 'admin/confirm_archive.html', {
'queryset': queryset
})
# Execute action
queryset.update(archived=True)Implementation Notes
- Detect when action returns an HttpResponse (intermediate page)
- Extract form fields or confirmation requirements
- Support a
confirmed: trueparameter on subsequent calls - May need to serialize intermediate state
Complexity
This is a complex feature as intermediate pages can have arbitrary forms and logic.
Labels
enhancement
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels