About Administration Form Views

You can pass form values to administration views to prepopulate them.

For example, here is an admin action that redirects to announcement creation page:

@admin.action(description=_("Send announcement"))
def send_announcement(modeladmin, request, queryset):
    recipients = list(queryset.values_list("pk", flat=True))
    return redirect(
        reverse("admin:announcements_announcement_add")
        + f"?recipients={','.join(recipients)}"
    )

Tips and Tricks Programming Django 4.2 Django 3.2