0
0
mirror of https://github.com/django/django.git synced 2024-11-22 03:18:31 +01:00
Commit Graph

69 Commits

Author SHA1 Message Date
Simon Charette
57307bbc7d Fixed #35666 -- Documented stacklevel usage and testing, and adjusted test suite accordingly.
Over the years we've had multiple instances of hit and misses when
emitting warnings: either setting the wrong stacklevel or not setting
it at all.

This work adds assertions for the existing warnings that were declaring
the correct stacklevel, but were lacking tests for it.
2024-08-28 11:44:05 -03:00
Tom Carrick
4ade8386eb Fixed #10743 -- Allowed lookups for related fields in ModelAdmin.list_display.
Co-authored-by: Alex Garcia <me@alexoteiza.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Nina Menezes <https://github.com/nmenezes0>
2024-02-05 21:42:04 -03:00
Alexander Lazarević
4787972c94 Refs #28404 -- Made displaying property values in admin respect non-None empty values. 2024-01-11 12:47:06 +01:00
Alexander Lazarević
9b02ad91ea Fixed #28404 -- Made displaying values in admin respect Field's empty_values. 2024-01-10 08:34:25 +01:00
Alexander Lazarević
1b0a8991ae Refs #28404 -- Split test_null_display_for_field() test. 2024-01-09 11:44:16 +01:00
Akash Kumar Sen
40b3975e7d Fixed #34462 -- Made admin log actions in bulk.
This also deprecates ModelAdmin.log_deletion() and
LogEntryManager.log_action().
2023-10-31 18:06:44 +01:00
konsti
48a1929ca0
Removed unnecessary trailing commas in tests. 2023-08-22 12:42:57 +02:00
sarahboyce
d2b688b966 Fixed #1873 -- Handled multi-valued query parameters in admin changelist filters. 2023-03-16 08:38:44 +01:00
Jacob Rief
473283d241
Fixed #34303 –- Allowed customizing admin site log entry list.
Added AdminSite.get_log_entries() as an override point and made this
available to the template via each_context().
2023-02-08 18:37:32 +01:00
David Smith
097e3a70c1 Refs #33476 -- Applied Black's 2023 stable style.
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.

https://github.com/psf/black/releases/tag/23.1.0
2023-02-01 11:04:38 +01:00
Mariusz Felisiak
d795259ea9
Replaced assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate.
Follow up to 3f7b327562.
2022-10-07 13:05:35 +02:00
Mariusz Felisiak
7119f40c98 Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
django-bot
9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Claude Paroz
676bd084f2 Fixed #32873 -- Deprecated settings.USE_L10N.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-09-14 12:05:43 +02:00
Mariusz Felisiak
d992f4e3c2 Refs #31369 -- Removed models.NullBooleanField per deprecation timeline. 2021-01-14 17:50:04 +01:00
Nick Pope
9204485396
Fixed #16117 -- Added decorators for admin action and display functions.
Refs #25134, #32099.
2021-01-13 17:19:22 +01:00
Qi Zhao
de81676b51 Fixed #32080 -- Fixed displaying Unicode chars in forms.JSONField and read-only JSONField values in admin. 2020-10-09 08:14:17 +02:00
Mariusz Felisiak
1e96de4f97
Added test for django.contrib.admin.utils.help_text_for_field(). 2020-06-25 11:23:26 +02:00
Simon Charette
94f63b926f Refs #31395 -- Relied on setUpTestData() test data isolation in various tests. 2020-05-15 20:22:56 +02:00
dbxnr
fc0f7f6c15 Fixed #31157 -- Fixed displaying read-only JSONField values in admin. 2020-05-08 09:44:42 +02:00
dbxnr
675ce4dd35 Refs #31157 -- Added tests for display_for_field() with empty JSONField. 2020-05-08 09:37:49 +02:00
Jon Dufresne
42b9a23267 Fixed #30400 -- Improved typography of user facing strings.
Thanks Claude Paroz for assistance with translations.
2019-06-28 16:46:18 +02:00
Sanyam Khurana
87f5d07eed Fixed #12952 -- Adjusted admin log change messages to use form labels instead of field names. 2019-06-14 18:20:29 +02:00
Tim Graham
043bd70942 Updated test URL patterns to use path() and re_path(). 2018-12-31 10:47:32 -05:00
Tim Graham
d311124be5 Fixed #29682 -- Fixed admin change form crash if a view-only model's form has an extra field. 2018-08-20 11:14:20 -04:00
Nicolas Noé
c4158d050f Fixed #29370 -- Added choices to LogEntry.action_flag field. 2018-05-07 10:07:45 -04:00
Tim Graham
5fa4f40f45 Fixed #29227 -- Allowed BooleanField to be null=True.
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-20 12:10:10 -04:00
Tim Graham
fa75b2cb51
Refs #27795 -- Removed force_bytes/text() usage in tests. 2018-02-07 14:20:04 -05:00
Jon Dufresne
ff05de760c Fixed #29038 -- Removed closing slash from HTML void tags. 2018-01-21 02:09:10 -05:00
Jonas Haag
602481d0c9 Fixed #28986 -- Prevented boolean values in admin list display from being formatted with thousand separators. 2018-01-03 15:02:06 -05:00
Jonas Haag
ea10efebfa Added display_for_value() tests for boolean values. 2018-01-03 15:02:00 -05:00
Mads Jensen
a51c4de194 Used assertRaisesMessage() to test Django's error messages. 2017-07-29 19:07:23 -04:00
Anton Samarchyan
0b9ccf9e60 Completed test coverage for admin's LogEntry model. 2017-06-19 14:12:38 -04:00
Collin Anderson
7c9cb1ed37 Refs #27953 -- Removed hardcoded uses of Model.__str__() in tests. 2017-06-09 13:28:50 -04:00
Claude Paroz
389c3ffc04 Updated tests after French translation update 2017-04-04 13:07:47 +02:00
Claude Paroz
c651331b34 Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
2017-02-07 09:04:04 +01:00
Tim Graham
29f607927f Fixed spelling of "nonexistent". 2017-02-03 08:01:45 -05:00
Claude Paroz
dc8834cad4 Refs #23919 -- Removed unneeded force_str calls 2017-01-20 08:44:31 +01: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
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
za
321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Tim Graham
e5f5e8ac17 Refs #27218 -- Fixed LogEntry tests on MySQL 5.5. 2016-10-05 09:17:26 -04:00
François Freitag
aa9569fce1 Fixed #27218 -- Returned LogEntry instances from ModelAdmin.log_*() methods. 2016-10-04 14:08:53 -04:00
Claude Paroz
67eee5e4fa Fixed #27302 -- Fixed ModelAdmin.construct_change_message() changed field detection
Thanks Ramiro Morales for the report and Tim Graham for the review.
2016-10-01 20:14:27 +02:00
Tim Graham
24123c3136 Fixed admin_utils test failures due to translation updates. 2016-08-01 15:40:46 -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
Dan Watson
ad403ffa45 Fixed #26582 -- Added prettier admin display for list values. 2016-05-07 15:49:41 -04:00
Tim Graham
92053acbb9 Fixed E128 flake8 warnings in tests/. 2016-04-08 10:12:33 -04:00