Jon Dufresne
ff05de760c
Fixed #29038 -- Removed closing slash from HTML void tags.
2018-01-21 02:09:10 -05:00
Vasilis Aggelou
777f216d55
Fixed #15522 -- Added ModelAdmin.delete_queryset() to customize "delete selected objects" deletion.
2018-01-05 18:28:45 -05:00
Paulo
d1286a8a68
Fixed #28517 -- Fixed admin delete confirmation view crash when related models don't have a delete permission.
2018-01-04 19:07:46 -05:00
Mariusz Felisiak
83a36ac49a
Removed unnecessary trailing commas and spaces in various code.
2017-12-28 21:07:29 +01:00
Tim Graham
7664fe2759
Refs #28871 -- Fixed admin_views selenium test failure.
2017-12-02 09:54:31 -05:00
Tim Graham
81057645f6
Fixed #28871 -- Fixed initialization of autocomplete widgets in "Add another" inlines.
...
Also allowed autocomplete widgets to work on AdminSites with a name other
than 'admin'.
2017-12-01 22:14:32 -05:00
Tim Graham
474bd7a5d4
Used a separate admin site for autocomplete tests.
2017-12-01 21:57:05 -05:00
shanghui
ebb998976e
Fixed #28751 -- Corrected the error message for inactive users in AdminAuthenticationForm.
...
Thanks SeungWon Kang for the report and Tim Graham for the review.
2017-11-08 09:39:12 -05:00
Claude Paroz
0cf00769ad
Fixed #28585 -- Calculated admin's change form multipart context variable from forms and formsets
...
Thanks Tim Graham for the review.
2017-11-07 19:06:32 -05:00
Tim Graham
8b9a163afa
Refs #28688 -- Updated a selenium test for admin's URLify.js change.
...
English words aren't removed if non-ASCII chars are present.
2017-10-24 11:03:36 -04:00
Tim Graham
48d57788ee
Refs #26447 -- Removed the USE_ETAGS setting per deprecation timeline.
2017-09-22 12:51:18 -04:00
Johannes Hoppe
94cd8efc50
Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ManyToManyField in the admin.
...
Thanks Florian Apolloner and Tim Graham for review and
contributing to the patch.
2017-09-18 13:48:02 -04:00
Anton Samarchyan
a469e158a9
Added tests for PermissionDenied in admin's delete_selected() view.
2017-06-19 16:01:48 -04:00
Tim Graham
7d52de31af
Moved admin's action view tests to a separate file.
2017-06-19 16:00:06 -04:00
Anton Samarchyan
57f4b3ce37
Added tests for AdminSite's add/disable/get action methods.
2017-06-19 15:53:51 -04:00
Lincoln Smith
15b465c584
Fixed #27998 -- Made ManyToManyField changes logged in admin's object history.
2017-06-14 13:07:06 -04:00
Collin Anderson
7c9cb1ed37
Refs #27953 -- Removed hardcoded uses of Model.__str__() in tests.
2017-06-09 13:28:50 -04:00
Paulo
4ad2f86284
Fixed #28202 -- Fixed FieldListFilter.get_queryset() crash on invalid input.
2017-06-06 07:54:31 -04:00
Paulo
b7f99f84bc
Fixed #28262 -- Fixed incorrect DisallowedModelAdminLookup when a nested reverse relation is in list_filter.
2017-06-05 10:29:54 -04:00
Tim Graham
0841a31baf
Fixed admin_views IntegrityError test failure.
...
Regression in 38a5a23c32
.
2017-06-02 14:59:01 -04:00
Tim Graham
38a5a23c32
Fixed admin_views test when run in reverse.
...
Modifying self.s1 created in setUpTestData() leaked state.
Regression in 45585d3cbb
.
2017-06-02 13:35:03 -04:00
Tim Graham
45585d3cbb
Removed pk hardcoding in admin_views tests.
2017-06-02 10:01:41 -04:00
Jon Dufresne
2c69824e5a
Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.
2017-06-01 19:08:59 -04:00
Bruno Alla
6092ea8fa6
Refs #27804 -- Used subTest() in several tests.
2017-05-24 08:36:34 -04:00
Tim Graham
6b4f018b2b
Replaced type-specific assertions with assertEqual().
...
Python docs say, "it's usually not necessary to invoke these methods directly."
2017-03-17 07:51:48 -04:00
Anton Samarchyan
e88d2dfcf4
Fixed #27475 -- Fixed NonExistentTimeError crash in ModelAdmin.date_hierarchy.
2017-03-06 12:01:31 -05:00
chillaranand
d6eaf7c018
Refs #23919 -- Replaced super(ClassName, self) with super().
2017-01-25 12:23:46 -05:00
Jon Dufresne
0d74c41981
Replaced dict() usage with dict literals.
...
Literals are faster and more idiomatic.
2017-01-23 19:13:49 -05:00
Tim Graham
d170c63351
Refs #23919 -- Removed misc references to Python 2.
2017-01-21 20:02:00 -05:00
Tim Graham
7aba69145d
Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.
2017-01-20 08:17:20 -05:00
Tim Graham
4e729feaa6
Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
...
These functions do nothing on Python 3.
2017-01-20 08:01:02 -05:00
Simon Charette
cecc079168
Refs #23919 -- Stopped inheriting from object to define new style classes.
2017-01-19 08:39:46 +01:00
Claude Paroz
2b281cc35e
Refs #23919 -- Removed most of remaining six usage
...
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz
7b2f2e74ad
Refs #23919 -- Removed six.<various>_types usage
...
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz
f3c43ad1fd
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
2017-01-18 13:44:34 +01:00
Claude Paroz
d7b9aaa366
Refs #23919 -- Removed encoding preambles and future imports
2017-01-18 09:55:19 +01:00
Tim Graham
d67a46e104
Refs #25135 -- Removed support for the contrib.admin allow_tags attribute.
...
Per deprecation timeline.
2017-01-17 20:52:01 -05:00
Adam Chainz
cd86f03591
Refs #26961 -- Fixed invalid ModelAdmins in tests.
2017-01-07 10:06:51 -05:00
Tim Graham
8ea541e6a2
Refs #2856 -- Removed redundant escaping in admin's "Perhaps it was deleted?" message.
2017-01-04 10:22:17 -05:00
Karen Tracey
27267afc41
Fixed #2856 -- Replaced some 404s with messages in admin.
...
Instead of a 404, return a redirect to admin index page with a message
indicating that the requested object does not exist. This avoids the
admin returning 404 from "Recent Actions" links for deleted objects.
2017-01-03 11:31:05 -05:00
Preston Timmons
b52c73008a
Fixed #15667 -- Added template-based widget rendering.
...
Thanks Carl Meyer and Tim Graham for contributing to the patch.
2016-12-27 17:50:10 -05:00
Adonys Alea Boffill
8ba01d1e42
Fixed #26543 -- Prevented "confirm form submission" browser prompt when reloading after an admin actions failure.
2016-12-23 17:29:24 -05:00
Claude Paroz
1206d7fa57
Refs #25753 -- Reset l10n cache when format settings change
...
Thanks Jaap Roes for the initial patch.
2016-12-21 17:40:08 +01:00
Michael Scott
1e629928e9
Fixed #27313 -- Allowed overriding admin popup response template.
2016-12-14 18:10:56 -05:00
Tim Graham
b5f0b3478d
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
2016-12-07 17:42:31 -05:00
Ramin Farajpour Cami
967be82443
Fixed E305 flake8 warnings.
2016-11-14 12:30:46 -05:00
Jacob Rief
b3162cab94
Fixed #27386 -- Wrapped admin's readonly fields in <div> rather than <p>.
2016-11-12 10:02:57 -05:00
za
321e94fa41
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
2016-11-10 21:30:21 -05:00
Halil Kaya
2027d6acf7
Fixed #26954 -- Prevented ModelAdmin.has_module_permission()=False from blocking access to the app index page.
2016-10-13 09:11:36 -04:00
Denis Cornehl
a840710e1e
Fixed #26447 -- Deprecated settings.USE_ETAGS in favor of ConditionalGetMiddleware.
2016-10-10 14:55:59 -04:00
Tim Graham
6f3c78dbe6
Fixed #27266 -- Allowed using assertFormError()/assertFormsetError() in admin forms and formsets.
...
Thanks Diego Andrés Sanabria Martín for the report and review.
2016-09-27 09:56:19 -04:00
Jon Dufresne
2c716c1dc7
Fixed #27256 -- Changed Select widget's selected attribute to use HTML5 boolean syntax.
2016-09-21 15:12:13 -07:00
Tim Graham
8119b679eb
Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
...
http://bugs.python.org/issue27364
2016-09-17 15:44:06 -04:00
Jibodeah
9459ec82aa
Fixed #26170 -- Made ModelAdmin views run transactions on the correct database.
...
Thanks juntatalor for the initial patch.
2016-09-14 16:06:39 -04:00
Jon Dufresne
8b050cf9dc
Refs #26524 -- Added a test for a <OneToOneField>_id reference in ModelAdmin.list_display.
2016-09-12 19:20:35 -07:00
Jon Dufresne
e24c0a2d7c
Fixed #26524 -- Fixed crash in admin change view when displaying many to many forward refs.
...
Thanks Tim Graham for the regression test.
2016-09-12 19:20:35 -07:00
Alexander Gaevsky
2d26b4637f
Fixed #27207 -- Replaced <p> tag with <div> in admin help texts.
2016-09-10 16:54:10 -04:00
Tim Graham
ef021412d5
Normalized spelling of ETag.
2016-09-09 11:00:21 -04:00
Stanislav Karpov
b387189d86
Fixed #26919 -- Added the action form's media in the changelist view.
2016-08-11 19:35:31 -04:00
Adam Chainz
a757c68129
Fixed admin_views clashing field check error.
...
admin_views.Recommendation.recommender: (models.E006) The field 'recommender'
clashes with the field 'recommender' from model 'admin_views.title'.
2016-08-10 15:54:29 -04:00
Tim Graham
93c538694e
Fixed XSS in admin's add/change related popup.
...
This is a security fix.
2016-07-18 11:17:01 -04:00
Kenneth
2f587737d7
Fixed #26872 -- Fixed text overflow in ModelAdmin.list_filter.
2016-07-09 08:06:42 -04:00
Tim Graham
c9ae09addf
Replaced use of TestCase.fail() with assertRaises().
...
Also removed try/except/fail antipattern that hides exceptions.
2016-06-28 11:21:26 -04:00
Shabda Raaj
b0acb1e73e
Fixed #26779 -- Added extra_context parameter to admin's i18n_javascript view.
2016-06-27 15:37:32 -04:00
Jon Dufresne
4f336f6652
Fixed #26747 -- Used more specific assertions in the Django test suite.
2016-06-16 14:19:18 -04:00
Oliver Sauder
5d8375fe66
Fixed #4548 -- Added username hint to admin's change_password form.
2016-06-09 12:18:15 -04:00
krishbharadwaj
f6681393d3
Fixing #26524 -- Made a foreign key id reference in ModelAdmin.list_display display the id.
2016-06-08 17:20:03 -04:00
Emad Mokhtar
c4980e28e5
Fixed #26290 -- Warned that paginating an unordered QuerySet may result in inconsistent results.
2016-06-08 14:09:24 -04:00
Vytis Banaitis
2f9c4e2b6f
Fixed #19963 -- Added support for date_hierarchy across relations.
2016-06-04 12:14:02 -04:00
Dan Stephenson
1206eea11e
Fixed #26558 -- Removed need for request context processor on admin login page.
2016-05-04 09:43:24 -04:00
Anssi Kääriäinen
7f51876f99
Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading.
2016-04-29 13:06:32 -04:00
Jon Dufresne
ec6121693f
Fixed #22383 -- Added support for HTML5 required attribute on required form fields.
2016-04-21 19:16:38 -04:00
Markus Amalthea Magnuson
08cd6a0e56
Fixed #16327 -- Redirected "Save as new" to change view instead of the changelist.
2016-04-20 11:31:44 -04:00
Tim Graham
92053acbb9
Fixed E128 flake8 warnings in tests/.
2016-04-08 10:12:33 -04:00
Akshesh
a7c813ba04
Fixed #21734 -- Handled ProtectedError in a POST to admin's delete_selected action.
2016-03-29 07:42:23 -04:00
Tim Graham
acfaec3db5
Fixed #26387 -- Restored the functionality of the admin's raw_id_fields in list_editable.
2016-03-25 13:47:42 -04:00
Tim Graham
4b510c3889
Removed unused variable.
2016-03-21 20:20:04 -04:00
Akshesh
49ac10b4de
Fixed #26235 -- Handled ProtectedError in a POST to admin's delete_view().
2016-03-21 19:25:27 -04:00
Akshesh
44c0ecdd92
Fixed #25364 -- Added generic way to test on all browsers supported by selenium.
...
Browser names should be passed as a comma separated list to the --selenium flag.
Thanks Tim Graham, Simon Charette and Moritz Sichert for review and discussion.
2016-03-15 13:10:32 -04:00
Tim Graham
004ba0f99e
Removed unneeded hint=None/obj=None in system check messages.
2016-02-12 13:01:25 -05:00
Tim Graham
015fad9060
Fixed #26175 -- Removed SHA1 password hashes in tests.
2016-02-06 08:47:21 -05:00
Federico Capoano
e972a7d03d
Fixed #13875 -- Made admin's submit_row template tag pass whole context.
2016-02-04 11:56:16 -05:00
Tim Graham
37f7ef41fb
Fixed #24316 -- Made ModelAdmin.list_display callables use an appropriate CSS class name.
...
Thanks Berker Peksag for the review.
2016-02-02 10:22:59 -05:00
Myk Willis
62f3acc70a
Fixed incorrect permissions check for admin's "Save as new".
...
This is a security fix.
2016-02-01 11:57:00 -05:00
Alexander Gaevsky
9a33d3d764
Fixed #26060 -- Fixed crash with reverse OneToOneField in ModelAdmin.readonly_fields.
2016-01-21 13:21:28 -05:00
Tim Graham
294d0d8815
Fixed #26048 -- Made admin selenium tests use implicitly_wait()
2016-01-11 14:16:17 -05:00
Tim Graham
2ed2db2ea3
Replaced selenium.find_element_by_css_selector where by_id is sufficient.
2016-01-11 09:16:23 -05:00
Tim Graham
3541ca1504
Refs #25165 -- Fixed JSON serialization for delete popup in the admin.
2016-01-09 13:35:58 -05:00
Alexander Gaevsky
5052f79df4
Added a test for adding a UUID pk object using the "Add related" admin popup.
...
Follow up to refs #25997 but this case wasn't broken.
2016-01-08 18:49:03 -05:00
Claude Paroz
cf7894be88
Fixed #21113 -- Made LogEntry.change_message language independent
...
Thanks Tim Graham for the review.
2016-01-08 20:34:59 +01:00
Alexander Gaevsky
ade54ffa34
Refs #25165 -- Fixed JSON serialization for add/edit popup in the admin.
...
Forwardport of test in o839d71d8562abe0b245024e55ca1d02a45e58fd from stable/1.9.x
(refs #25997 ).
2016-01-08 12:28:32 -05:00
Tim Graham
822a03b3e4
Refs #25165 -- Fixed failure of admin's "Add another" popup to close.
...
Thanks Thomas Grainger for the fix.
2016-01-08 11:41:01 -05:00
Scott Pashley
7cc2efc2d6
Fixed #26035 -- Prevented user-tools from appearing on admin logout page.
2016-01-06 13:48:02 -05:00
Marten Kenbeek
16411b8400
Fixed #26013 -- Moved django.core.urlresolvers to django.urls.
...
Thanks to Tim Graham for the review.
2015-12-31 14:21:29 -05:00
Alexander Gaevsky
69208a5a1c
Fixed #25465 -- Restored line breaks conversion in admin readonly fields.
2015-12-29 19:31:43 -05:00
Claude Paroz
35c41987ec
Moved LogEntry-related tests to their own test case
...
Thanks Tim Graham for reviewing and contributing to the patch.
Refs #21113 .
2015-12-28 20:29:08 +01:00
Tim Graham
24a190d53c
Fixed previous commit ( e3d782fe80
) on Python 3.
2015-12-28 12:26:39 -05:00
Tim Graham
e3d782fe80
Added the response to an admin_views test assertion to aid debugging.
2015-12-28 11:25:46 -05:00
Tim Graham
f18b08748a
Fixed #25903 -- Fixed the admin's list_editable add/change buttons.
2015-12-21 09:29:57 -05:00
Sergey Fedoseev
8ab58b8052
Fixed #25883 -- Fixed admin deletion page summary counts for related objects.
2015-12-10 18:09:03 -05:00