diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 531ce4d..50033c4 100644
a
|
b
|
class ModelAdmin(BaseModelAdmin):
|
757 | 757 | if isinstance(response, HttpResponse): |
758 | 758 | return response |
759 | 759 | else: |
760 | | return HttpResponseRedirect(".") |
| 760 | return HttpResponseRedirect(request.get_full_path()) |
761 | 761 | else: |
762 | 762 | msg = _("No action selected.") |
763 | 763 | self.message_user(request, msg) |
diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py
index abb28de..d8e4066 100644
a
|
b
|
class AdminActionsTest(TestCase):
|
1375 | 1375 | response = self.client.post('/test_admin/admin/admin_views/externalsubscriber/', action_data) |
1376 | 1376 | self.failUnlessEqual(response.status_code, 302) |
1377 | 1377 | |
| 1378 | def test_default_redirect(self): |
| 1379 | """ |
| 1380 | Test that actions which don't return an HttpResponse are redirected to |
| 1381 | the same page, retaining the querystring (which may contain changelist |
| 1382 | information). |
| 1383 | """ |
| 1384 | action_data = { |
| 1385 | ACTION_CHECKBOX_NAME: [1], |
| 1386 | 'action' : 'external_mail', |
| 1387 | 'index': 0, |
| 1388 | } |
| 1389 | url = '/test_admin/admin/admin_views/externalsubscriber/?ot=asc&o=1' |
| 1390 | response = self.client.post(url, action_data) |
| 1391 | self.assertRedirects(response, url) |
| 1392 | |
1378 | 1393 | def test_model_without_action(self): |
1379 | 1394 | "Tests a ModelAdmin without any action" |
1380 | 1395 | response = self.client.get('/test_admin/admin/admin_views/oldsubscriber/') |