(modeladmin, request, queryset)
return render(request, template_name, context)
Bulk change of dashboard plugins action additional view.

    Data is changed in ``DashboardPluginAdmin.bulk_change_dashboard_plugins``
    method.
Bulk change of dashboard plugins action additional view.
Bulk change of dashboard plugins action additional view .
def bulk_change_dashboard_plugins(modeladmin, request, queryset):
    """Bulk change of dashboard plugins action additional view.

    Data is changed in ``DashboardPluginAdmin.bulk_change_dashboard_plugins``
    method.
    """
    opts = modeladmin.model._meta
    app_label = opts.app_label

    selected = request.POST.getlist(admin.ACTION_CHECKBOX_NAME)
    post = dict(request.POST)
    if selected:
        post['selected_dashboard_plugins'] = ','.join(selected)
    if 'POST' == request.method:
        form = BulkChangeDashboardPluginsForm(
            data=post,
            files=request.FILES,
            initial={'selected_dashboard_plugins': ','.join(selected)}
        )
    else:
        form = BulkChangeDashboardPluginsForm(
            initial={'selected_dashboard_plugins': ','.join(selected)}
        )

    context = {
        'form': form,
        'app_label': app_label,
        'opts': opts,
        'action_checkbox_name': helpers.ACTION_CHECKBOX_NAME,
    }

    template_name = 'dash/admin/bulk_change_dashboard_plugins.html'

    return render(request, template_name, context)
def bulk_change_dashboard_plugins ( modeladmin , request , queryset ) : opts = modeladmin . model . _meta app_label = opts . app_label selected = request . POST . getlist ( admin . ACTION_CHECKBOX_NAME ) post = dict ( request . POST ) if selected : post [ 'selected_dashboard_plugins' ] = ',' . join ( selected ) if 'POST' == request . method : form = BulkChangeDashboardPluginsForm ( data = post , files = request . FILES , initial = { 'selected_dashboard_plugins' : ',' . join ( selected ) } ) else : form = BulkChangeDashboardPluginsForm ( initial = { 'selected_dashboard_plugins' : ',' . join ( selected ) } ) context = { 'form' : form , 'app_label' : app_label , 'opts' : opts , 'action_checkbox_name' : helpers . ACTION_CHECKBOX_NAME , } template_name = 'dash/admin/bulk_change_dashboard_plugins.html' return render ( request , template_name , context )