Ticket #12962: modeladmin-12595.diff
File modeladmin-12595.diff, 1.4 KB (added by , 15 years ago) |
---|
-
django/contrib/admin/options.py
698 698 changelist; it returns an HttpResponse if the action was handled, and 699 699 None otherwise. 700 700 """ 701 if 'index' not in request.POST:702 # If "Go" was not pushed then we can assume the POST was for703 # an inline edit save and we do not need to validate the form.704 return None705 701 706 702 # There can be multiple action forms on the page (at the top 707 703 # and bottom of the change list, for example). Get the action … … 978 974 return HttpResponseRedirect(request.path + '?' + ERROR_FLAG + '=1') 979 975 980 976 # If the request was POSTed, this might be a bulk action or a bulk edit. 981 # Try to look up an action first, but if this isn't an action the POST977 # Try to look up an action or confirmation first, but if this isn't an action the POST 982 978 # will fall through to the bulk edit check, below. 983 if actions and request.method == 'POST' :979 if actions and request.method == 'POST' and (helpers.ACTION_CHECKBOX_NAME in request.POST or 'index' in request.POST): 984 980 response = self.response_action(request, queryset=cl.get_query_set()) 985 981 if response: 986 982 return response