summaryrefslogtreecommitdiff
path: root/django/contrib/admin/options.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2009-12-13 22:15:08 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2009-12-13 22:15:08 +0000
commit2794cceb5f6cf21f2c99b90c9d1e79475f830460 (patch)
tree708273f4e4cd96ca64c6f18e8de17d1055cd761f /django/contrib/admin/options.py
parent049dc42bdea8f524f9d52edd4ddc05ef0048d401 (diff)
downloaddjango-2794cceb5f6cf21f2c99b90c9d1e79475f830460.tar.gz
[soc2009/multidb] Merged up to trunk r11858.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/admin/options.py')
-rw-r--r--django/contrib/admin/options.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 7193beeee8..c055f4ea85 100644
--- a/django/contrib/admin/options.py
+++ b/django/contrib/admin/options.py
@@ -692,6 +692,9 @@ class ModelAdmin(BaseModelAdmin):
# perform an action on it, so bail.
selected = request.POST.getlist(helpers.ACTION_CHECKBOX_NAME)
if not selected:
+ # Reminder that something needs to be selected or nothing will happen
+ msg = "Items must be selected in order to perform actions on them. No items have been changed."
+ self.message_user(request, _(msg))
return None
response = func(self, request, queryset.filter(pk__in=selected))
@@ -703,6 +706,9 @@ class ModelAdmin(BaseModelAdmin):
return response
else:
return HttpResponseRedirect(".")
+ else:
+ msg = "No action selected."
+ self.message_user(request, _(msg))
@csrf_protect
@transaction.commit_on_success