Hasan Ramezani
d1216e126f
Fixed #33051 -- Fixed highlighting the current model in admin's sidebar with non-ASCII model names.
2021-08-27 07:31:05 +02:00
Mart Sõmermaa
9b1158a7e0
Fixed #32993 -- Added AutocompleteJsonView.serialize_result() to allow customization.
2021-08-10 07:44:37 +02:00
Ties Jan Hefting
84400d2e9d
Fixed #32905 -- Added CSS class for non-form errors of formsets.
2021-07-15 07:00:39 +02:00
saeedblanchette
66ed03e7c9
Refs #24121 -- Added __repr__() to AdminForm, BlockContext, BlockTranslateNode, and IncludeNode.
2021-06-10 12:47:53 +02:00
David Sanders
2978c63a34
Fixed #32771 -- Used IS_POPUP_VAR constant instead of hard-coded value.
2021-05-20 07:04:26 +02:00
Slava Skvortsov
f7691d4812
Fixed #32754 -- Made AdminSite.catch_all_view() respect SCRIPT_NAME.
...
Regression in ba31b01034
.
2021-05-18 09:14:05 +02:00
Raffaele Salmaso
3733ae8957
Fixed #32031 -- Added model class for each model to AdminSite.each_context().
2021-05-13 06:57:09 +02:00
Nick Pope
2161db0792
Fixed capitalization of "ECMAScript" and "JavaScript".
2021-04-29 20:29:08 +02:00
Mariusz Felisiak
cd74aad90e
Refs #32682 -- Renamed use_distinct variable to may_have_duplicates.
...
QuerySet.distinct() is not the only way to avoid duplicate, it's also
not preferred.
2021-04-27 10:34:47 +02:00
Zain Patel
4e5bbb6ef2
Fixed #32681 -- Fixed VariableDoesNotExist when rendering some admin template.
...
Regression in 84609b3205
.
2021-04-26 07:08:16 +02:00
Mariusz Felisiak
23fa29f6a6
Fixed #32649 -- Fixed ModelAdmin.search_fields crash when searching against phrases with unbalanced quotes.
...
Thanks Dlis for the report.
Regression in 26a413507a
.
2021-04-14 12:23:47 +02:00
Maxim Milovanov
d915dd1c58
Fixed #32204 -- Added quick filter to admin's navigation sidebar.
2021-03-31 09:31:37 +02:00
Johannes Maron
03d0f12c82
Fixed #32466 -- Corrected autocomplete to_field resolution for complex cases.
...
In MTI or ForeignKey as primary key cases, it is required to fetch the attname
from the field instance on the remote model in order to reliably resolve the
to_field_name.
Co-authored-by: Johannes Maron <info@johanneshoppe.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2021-03-18 11:21:23 +01:00
Johannes Maron
0b120f5d64
Refs #29138 -- Added extra tests for autocomplete FK to_field variations.
2021-03-18 11:14:18 +01:00
Mariusz Felisiak
a6a94fb966
Removed unnecessary lines in test_has_view_or_change_permission_required().
...
AutocompleteJsonViewTests.user is already a staff member.
2021-03-10 15:37:28 +01:00
François Freitag
7ca7f4495b
Refs #21429 -- Added SimpleTestCase.assertNoLogs() on Python < 3.10.
2021-03-02 20:35:33 +01:00
Jacob Walls
9d7e31cc74
Removed unused code in admin_views tests.
...
Unused since its introduction in 7b21bfc074
and 1e4ad6f118
.
2021-02-26 20:49:21 +01:00
Amir Ajorloo
1710cdbe79
Fixed #32443 -- Removed "shifted" CSS class when admin's sidebar is disabled.
2021-02-18 09:18:19 +01:00
manav014
3119a6deca
Fixed #26607 -- Allowed customizing formset kwargs with ModelAdmin.get_formset_kwargs().
...
Thanks Nick Pope for reviews.
2021-02-15 11:37:35 +01:00
Paul Ganssle
10d1261984
Refs #32365 -- Allowed use of non-pytz timezone implementations.
2021-01-19 11:59:37 +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
Jon Dufresne
ba31b01034
Fixed #31747 -- Fixed model enumeration via admin URLs.
...
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2021-01-12 14:37:56 +01:00
Johannes Maron
3071660acf
Fixed #29010 , Fixed #29138 -- Added limit_choices_to and to_field support to autocomplete fields.
...
* Fixed #29010 -- Added limit_choices_to support to autocomplete fields.
* Fixed #29138 -- Allowed autocomplete fields to target a custom
to_field rather than the PK.
2021-01-12 11:37:38 +01:00
Nick Pope
9ef0394b54
Fixed typo in tests/admin_views/test_history_view.py test name.
2020-12-18 09:23:22 +01:00
Claude Paroz
187482d743
Avoided direct styles in admin templates.
...
Direct styles might be forbidden by Content Security Policies.
2020-11-10 21:32:15 +01:00
Jon Dufresne
cee93c6ba1
Refs #25780 -- Removed redundant status code assertions from tests.
2020-10-28 12:26:49 +01:00
Tim Graham
83a8da576d
Fixed admin_views's test_history_view on databases that don't use serial pks.
2020-10-26 10:44:55 +01:00
Tim Graham
78eeb24774
Made test_change_list_sorting_model_admin_reverse's assertions more specific.
...
The test could fail on databases like CockroachDB that use non-serial
primary keys if the numbers (2000, etc.) appeared in the pk values.
2020-10-18 19:48:06 +02:00
Tim Schilling
b7da588e88
Fixed #32091 -- Fixed admin search bar width on filtered admin page.
2020-10-09 11:39:22 +02:00
Julien Rebetez
b790883065
Fixed #31181 -- Added links to related models for admin's readonly fields.
2020-10-08 19:53:49 +02:00
Raffaele Salmaso
666f2e8acd
Refs #32034 -- Added test for title on admin app index view.
2020-09-23 10:01:03 +02:00
Tom Carrick
bcc2befd0e
Fixed #31789 -- Added a new headers interface to HttpResponse.
2020-09-14 08:41:59 +02:00
Jon Dufresne
84609b3205
Fixed #31993 -- Added subtitles to admin change/view pages.
2020-09-11 06:28:45 +02:00
Jon Dufresne
cbe34dc8ec
Refs #31993 -- Added more titles assertions for admin views.
2020-09-10 13:21:08 +02:00
Mariusz Felisiak
6a881197e9
Refs #31901 -- Fixed SeleniumTests.test_list_editable_popups with headless mode.
2020-09-02 15:16:03 +02:00
Carlton Gibson
0aeb802cf0
Fixed #31865 -- Adjusted admin nav sidebar template to reduce debug logging.
...
Thanks to Mariusz Felisiak for review.
2020-08-11 11:42:15 +02:00
Nick Pope
b203ec70fd
Refs #25513 -- Adjusted admin pagination to be 1-indexed.
2020-08-06 12:38:56 +02:00
Jon Dufresne
feb6581993
Fixed the centering of the "Log in" button on admin login page.
...
Previously, the button's container had a padding of 9.4em which was
approximately center but not precisely. Now, the container uses
'align:text-center' to let the browser center the button.
2020-06-26 06:59:33 +02:00
Jon Dufresne
60db8b7b37
Removed unnecessary admin CSS.
...
The "object-tools" container is never rendered as a descendant of
.form-row.
The "golink" CSS class is unused.
A <label> element has not been included in the login .submit-row since
5869afe32b
.
The "help" CSS class from login.css has been unused since
0e5faf225c
.
The <label> color in login.css is already inherited from the <body>
element and so does not need to be re-specified.
The #content-main container already has the property 'width: 100%' from
base.css and so does not need to be re-specified in login.css.
The <td> and <th> font-family property is inherited from the <body>
element and so does not need to be re-specified.
The <html> element has the attribute dir which automatically sets
the text direction in the layout. Adding the direction CSS property was
necessary to support IE which does not support the dir attribute, but IE
is no longer supported, so drop the direction property.
The 'font-size: 1em' property re-specifies the same font size. It
creates no visual difference.
The 'font-size: 14px' property often re-specifies the inherited value.
Avoid re-specifying it.
2020-06-25 11:46:05 +02:00
Hasan Ramezani
fbe82f8255
Refs #26761 -- Removed extra space in admin change list result header.
2020-06-25 06:33:12 +02:00
Alix
26a413507a
Fixed #6933 -- Added support for searching against quoted phrases in ModelAdmin.search_fields.
2020-06-18 20:17:20 +02:00
David Smith
10df5b7177
Refs #31670 -- Removed whitelist/blacklist terminology in docs and comments.
2020-06-17 13:15:56 +02:00
Tom Carrick
780473d756
Refs #31034 -- Improved accessibility of admin navigation sidebar.
2020-05-28 10:16:20 +02:00
Scott Cranfill
62f1655a64
Fixed #11157 -- Stopped removing stop words in admin's prepopulated_fields.
...
Co-Authored-By: Andy Chosak <andy@chosak.org>
2020-05-27 12:32:56 +02:00
kjpc-tech
099bce1bf0
Fixed #31590 -- Fixed ModelAdmin.date_hierarchy crash with an empty QuerySet.
...
Regression in 55cdf6c52d
.
2020-05-15 06:35:10 +02:00
Jon Dufresne
81ffedaacc
Fixed #31524 -- Removed minified static assets from the admin.
2020-05-14 16:07:56 +02:00
Jon Dufresne
d522b51c40
Fixed #31575 -- Added system check for admin sidebar request context processor dependency.
...
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2020-05-14 11:00:51 +02:00
Tom Carrick
d24ba1be7a
Fixed #31034 -- Added a navigation sidebar to the admin.
...
Co-authored-by: elky <elky@users.noreply.github.com>
Co-authored-by: Goetz <goetz.buerkle@gmail.com>
2020-05-11 18:16:38 +02:00
Jon Dufresne
d6aff369ad
Refs #30116 -- Simplified regex match group access with Match.__getitem__().
...
The method has been available since Python 3.6. The shorter syntax is
also marginally faster.
2020-05-11 12:01:28 +02:00
Nick Pope
8f10ceaa90
Changed `'%s' % value` pattern to `str(value)`.
2020-05-04 08:27:18 +02:00