Commit Graph

520 Commits

Author SHA1 Message Date
Mariusz Felisiak 305757aec1
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
2024-01-26 12:45:07 +01:00
Marijke Luttekes e412d85b46
Fixed #35115 -- Made admin's footer render in <footer> tag. 2024-01-24 14:11:54 +01:00
Eliana Rosselli c83c639ba0 Fixed #34909 -- Associated links in admin navigation sidebar with row descriptions.
This adds aria-describedby attribute to the models' links in the admin
navigation sidebar.

Thanks Thibaud Colas for the review.

Co-authored-by: Dara Silvera <dsilvera@octobot.io>
2023-12-15 21:01:00 +01:00
Sarah Boyce af2fd36815 Refs #34995 -- Made Selenium tests more robust for admin_views and admin_widgets suites.
Depending on screen sizes, the selenium tests that would "click" or interact
with an element outside the scope of the visible window would produce test
failures (raising ElementNotInteractableException in CI runs).

This branch switches those to using ActionChains, which ensures that the click
(or other interaction) is performed only after successfully completing the
move to the relevant element.

Co-authored-by: Tom Carrick <tom@carrick.eu>
2023-11-30 10:39:10 -03:00
nessita 134cde8415
Removed hard-coded expected results in SeleniumTests.test_select_multiple test.
This ensures that both tests, test_select() and test_select_multiple(),
use analogous calculations for the expected amount of results, and for
the iteration when pressing "arrow down" and waiting for the ajax call
to complete.
2023-11-28 23:06:17 +01:00
Tom Carrick 729266c6f2 Fixed #34982 -- Fixed admin's read-only password widget and help texts alignment for tablet screen size.
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2023-11-27 14:42:25 -03:00
Mariusz Felisiak 5875f03ce6 Fixed #34944 -- Made GeneratedField.output_field required.
Regression in f333e3513e.
2023-11-14 20:22:07 +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
laserhyena 21382e2743 Fixed #34911 -- Corrected HTML heading levels on admindocs' main page. 2023-10-20 05:44:55 +02:00
ontowhee 89d2ae257b
Fixed #34905 -- Corrected admin's main content element rendered in <main> tag.
Regression in 91e617c743.

Thanks Tom Carrick for the report.
2023-10-19 17:25:50 +02:00
Sarah Boyce 71a813a72c
Made SeleniumTests.test_select_multiple less flaky by improving Selenium waits. 2023-10-19 16:01:52 +02:00
Sarah Boyce be56c982c0 Refs #34043 -- Added --screenshots option to runtests.py and selenium tests. 2023-10-18 06:14:40 +02:00
Sarah Boyce f6629ee2c9 Refs #34043 -- Added context managers to SeleniumTestCase for changing window size. 2023-10-16 10:36:26 +02:00
Mariana fc62e17778 Fixed #12241 -- Preserved query strings when using "Save and continue/add another" in admin.
Co-authored-by: Grady Yu <gradyy@users.noreply.github.com>
Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
Co-authored-by: Matthew Newton <matthewn@berkeley.edu>
2023-10-11 11:00:25 +02:00
lstaana 357365a64e Fixed #34835 -- Made admin's changelist filters render in <nav> tag. 2023-09-26 08:45:07 +02:00
Ryanwalker277 225328efd9 Fixed #31558 -- Added support for boolean attribute on properties in ModelAdmin.list_display. 2023-09-16 20:54:26 +02:00
Paolo Melchiorre 2f1ab16be5 Fixed #34842 -- Fixed ModelAdmin.readonly_fields crash with GeneratedFields. 2023-09-16 20:13:02 +02:00
Sarah Abderemane 814e7bc220 Fixed #34832 -- Made admin's header content render in <header> tag.
Header tag was changed to <header> get the landmark banner for
accessibility.
2023-09-15 05:36:43 +02:00
Sarah Abderemane 91e617c743 Fixed #34833 -- Made admin's main content render in <main> tag. 2023-09-14 05:41:31 +02:00
Mariusz Felisiak 2584783f46
Refs #9602 -- Moved AlreadyRegistered/NotRegistered exceptions to django.contrib.admin.exceptions. 2023-07-07 13:22:06 +02:00
Mariusz Felisiak f64fd47a76
Fixed #9602 -- Added AdminSite.get_model_admin().
This allows retrieving an admin class for the given model class without
using internal attributes.
2023-07-07 08:06:01 +02:00
sarahboyce 649262a406 Made some Selenium tests less flaky by adding explicit wait. 2023-07-05 09:45:50 +02:00
Mariusz Felisiak 42b4f81e6e Fixed isolation of SeleniumTests.test_search_input_filtered_page() test.
Test crashed when the sidebar was not closed.
2023-07-04 13:34:08 +02:00
Sarah Boyce 968684aed4 Made SeleniumTests.test_updating_related_objects_updates_fk_selects_except_autocompletes() test less flaky by adding explicit Selenium wait. 2023-07-04 13:34:08 +02:00
Yaser Amiri 3f1bc2222f Fixed #34656 -- Fixed unclosed div in admin password change template.
Regression in 6991880109.
2023-06-19 08:22:10 +02:00
sarahboyce 8b062eab8e Made SeleniumTests.test_inline_uuid_pk_add_with_popup less flaky by waiting until popup is closed. 2023-06-18 08:37:19 +02:00
sarahboyce decbfa834f Made SeleniumTests.test_select_multiple less flaky by adding explicit Selenium wait. 2023-06-13 08:26:34 +02:00
Nina Menezes 1699f8b52a Fixed #34628 -- Improved icons accessibility of related widget wrapper in admin.
This improves accessibility of icons by making them larger and grayscale
(when not selected).
2023-06-12 08:31:28 +02:00
Coen van der Kamp 10d9d0ccb2 Fixed #34622 -- Improved accessibility of related widget wrapper in admin.
This improves accessibility for screen reader users by adding
"aria-disabled" and removing "alt".

Thanks Thibaud Colas for the report.
2023-06-05 14:43:51 +02:00
Nina Menezes 27fed08e5f
Fixed #34618 -- Added icon descriptions in "Recent Actions" on the admin index. 2023-06-02 12:32:18 +02:00
Cheuk Ting Ho 65da6b2ae4
Fixed #34617 -- Enabled user zooming on mobile devices in the admin. 2023-06-01 13:37:25 +01:00
minusf 8b053c1e3c
Fixed #34592 -- Removed Safari/Chrome workaround for system fonts. 2023-05-24 10:26:25 +02:00
Coen van der Kamp 7bbbadc693 Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.
This also deprecates "http" as the default scheme.
2023-04-28 06:58:10 +02:00
Mariusz Felisiak 9440f6ba41
Fixed #34512 -- Restored breadcrumbs on admin app index view.
Thanks Adam (ataylor32) for the report.

Regression in 872b61193b.
2023-04-26 08:36:56 +02:00
Tom Carrick d687febce5 Fixed #34383 -- Fixed layout of admin fieldsets with multiple fields on the same line.
Thanks Antonio Candido Nazareth junior for the report.

Regression in 96a598356a.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-03-27 14:05:24 +02:00
sarahboyce 868e2fcdda Fixed #32539 -- Added toggleable facet filters to ModelAdmin.
Thanks Carlton Gibson, Simon Willison, David Smith, and Mariusz
Felisiak for reviews.
2023-03-03 20:24:57 +01:00
Mariusz Felisiak 52e54860bf
Moved duplicate user declarations to setUpTestData() in AdminSiteFinalCatchAllPatternTests. 2023-03-03 10:08:06 +01:00
Dominique Bischof 17e08b2177 Fixed #34377 -- Fixed preserving query strings in AdminSite.catch_all_view().
Included full path when redirecting with append slash to include query
strings.

Regression in ba31b01034.
2023-03-03 08:18:54 +01:00
Dominique Bischof 4338b6526d Refs #31747 -- Added more tests for preserving query strings when redirect with APPEND_SLASH in admin. 2023-03-03 08:18:54 +01:00
Alexandre Spaeth bfb8fda3e6 Refs #34342 -- Added tests for handling sync streaming responses by test client.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2023-02-17 10:48:00 +01:00
sarahboyce e678046681 Fixed #34316 -- Fixed layout of admin password change forms and help texts.
Regression in 96a598356a.
2023-02-13 09:41:31 +01:00
Bakdolot 325c44ac6c Fixed #34315 -- Preserved admin changelist filters on "Close" button. 2023-02-08 09:38:14 +01:00
Frederic Mheir 2878938626 Fixed #34301 -- Made admin's submit_row check add permission for "Save as new" button. 2023-02-07 07:01:10 +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 3bbe22dafc
Fixed #34233 -- Dropped support for Python 3.8 and 3.9. 2023-01-18 09:46:01 +01:00
Mariusz Felisiak e6f82438d4 Refs #32365 -- Removed support for pytz timezones per deprecation timeline. 2023-01-17 11:49:15 +01:00
Mariusz Felisiak 29b6a177d8
Fixed AdminViewDeletedObjectsTest.test_cyclic failure when using --keepdb.
This changes to hardcoded pks when hardcoded fks are used.
2022-12-06 11:14:32 +01:00
Rasmus Magnell c4aac2ac1e Fixed #34042 -- Improved accessibility of admin's navigation sidebar. 2022-10-12 10:21:17 +02:00
Gregor Gärtner 564b317fb5 Refs #33990 -- Renamed SimpleTestCase.assertFormsetError() to assertFormSetError().
Co-Authored-By: Michael Howitz <mh@gocept.com>
2022-10-07 11:22:16 +02:00
David Sanders 9976f3d4b8 Fixed #34025 -- Fixed selecting ModelAdmin.autocomplete_fields after adding/changing related instances via popups.
Regression in c72f6f36c1.

Thanks Alexandre da Silva for the report.
2022-09-28 11:28:01 +02:00