summaryrefslogtreecommitdiff
path: root/tests/modeladmin
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #34513 -- Added system check for relational fields in ↵Bakdolot2023-05-021-0/+24
| | | | ModelAdmin.list_display.
* Fixed #34481 -- Added system check for reverse related fields in ↵Bakdolot2023-04-241-1/+14
| | | | ModelAdmin.list_display.
* Fixed #22569 -- Made ModelAdmin.lookup_allowed() respect get_list_filter().sarahboyce2023-04-171-7/+89
| | | | Thank you Simon Meers for the initial patch.
* Fixed #28384 -- Fixed ModelAdmin.lookup_allowed() for OneToOneField primary ↵sarahboyce2023-03-281-0/+29
| | | | keys and nested relations.
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-011-0/+2
| | | | | | | | 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
* Fixed #11803 -- Allowed admin select widgets to display new related objects.mgaligniana2022-04-151-2/+2
| | | | | | | Adjusted admin javascript to add newly created related objects to already loaded select widgets. In this version, applies only where limit_choices_to is not set.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-071-7/+12
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-074-537/+701
|
* Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak2022-02-031-2/+1
| | | | | | | | | | | | | | | | | In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
* Fixed #11715 -- Changed default value of ModelAdmin.actions/inlines to empty ↵Jacob Walls2022-01-111-0/+5
| | | | | | | tuples. This clarifies the intended pattern of overwriting the default value rather than mutating it.
* Fixed #32975 -- Fixed admin system check for inlines with foreign keys to ↵taulant2021-09-031-1/+28
| | | | proxy models.
* Refs #24121 -- Added __repr__() to AdminSite, DefaultAdminSite, and ModelAdmin.Eduardo Aldair Ahumada Garcia Jurado2021-07-051-0/+7
| | | | Thanks tlebrize for the initial patch.
* Fixed #32494 -- Adjusted system check for raw_id_fields to warn about ↵Hasan Ramezani2021-03-041-0/+12
| | | | Field.attname.
* Corrected messages of admin checks for invalid model field names.Hasan Ramezani2021-03-041-9/+9
|
* Fixed #16117 -- Added decorators for admin action and display functions.Nick Pope2021-01-132-9/+17
| | | Refs #25134, #32099.
* Unified admin action description generation.Nick Pope2020-11-131-0/+25
| | | | | | Actions added to AdminSite.actions would not have the first character of their description capitalized. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #32003 -- Added obj argument to has_perm() methods in tests.Alexander Todorov2020-09-141-5/+5
|
* Refs #31395 -- Relied on setUpTestData() test data isolation in various tests.Simon Charette2020-05-151-2/+5
|
* Fixed #30311 -- Restored ability to override global admin actions.hashlash2020-04-171-0/+39
|
* Fixed #30980 -- Improved error message when checking uniqueness of admin ↵Adam Donaghy2020-01-101-3/+2
| | | | | | actions' __name__. Thanks Keshav Kumar for the initial patch.
* Fixed #30543 -- Fixed checks of ModelAdmin.list_display for fields ↵Hasan Ramezani2019-07-101-1/+20
| | | | | | accessible only via instance. Co-Authored-By: Andrew Simons <andrewsimons@bubblegroup.com>
* Refs #27991 -- Made obj a required argument of ↵Tim Graham2019-01-172-135/+0
| | | | | | InlineModelAdmin.has_add_permission(). Per deprecation timeline.
* Fixed #30097 -- Made 'obj' arg of InlineModelAdmin.has_add_permission() ↵MaximZemskov2019-01-111-0/+24
| | | | | | | optional. Restored backwards compatibility after refs #27991. Regression in be6ca89396c031619947921c81b8795d816e3285.
* Fixed #29930 -- Allowed editing in admin with view-only inlines.Carlton Gibson2018-12-031-0/+4
| | | Co-authored-by: Tim Graham <timograham@gmail.com>
* Switched setUp() to setUpTestData() where possible in Django's tests.Simon Charette2018-11-271-2/+5
|
* Fixed #29282 -- Prevented some admin checks from crashing with TypeError.Sanyam Khurana2018-11-201-5/+108
| | | Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
* Fixed #29917 -- Stopped collecting ModelAdmin.actions from base ModelAdmins.Matthias Kestenholz2018-11-091-0/+21
|
* Fixed #29901 -- Allowed overriding an ↵Javier Matos Odut2018-10-311-0/+22
| | | | autocomplete/raw_id_fields/radio_fields widget with ModelAdmin.get_formset().
* Fixed #29711 -- Added a system check for uniquness of admin actions' __name__.Przemysław Buczkowski2018-10-021-0/+27
|
* Fixed #29723 -- Fixed crash if InlineModelAdmin.has_add_permission() doesn't ↵Tim Graham2018-08-301-0/+46
| | | | | | | | accept the obj argument. * Refs #27991 -- Added testing for ModelAdmin.get_inline_instances() if the inline's has_add_permission() doesn't accept 'obj'. * Fixed #29723 -- Fixed crash if InlineModelAdmin.has_add_permission() doesn't accept the obj argument.
* Fixed #29419 -- Allowed permissioning of admin actions.Carlton Gibson2018-06-182-0/+76
|
* Fixed #23869 -- Made ModelAdmin.get_deleted_objects() use ↵Henk Kahlfuß2018-06-151-1/+22
| | | | has_delete_permission() for permissions checking.
* Refs #29428 -- Fixed admin check crash when using a query expression in ↵Tim Graham2018-06-141-0/+19
| | | | ModelAdmin.ordering.
* Refs #29419, #8936 -- Removed change permission requirement for admin actions.Carlton Gibson2018-06-131-13/+1
| | | | Partially reverted 825f0beda804e48e9197fcf3b0d909f9f548aa47.
* Fixed #8936 -- Added a view permission and a read-only admin.olivierdalang2018-05-161-1/+43
| | | | | Co-authored-by: Petr Dlouhy <petr.dlouhy@email.cz> Co-authored-by: Olivier Dalang <olivier.dalang@gmail.com>
* Fixed #29363 -- Added SimpleTestCase.assertWarnsMessage().Morgan Aubert2018-05-091-9/+4
|
* Fixed inconsistent formatting in tests/modeladmin/test_checks.py.Tim Graham2018-04-161-2/+4
|
* Fixed #29322 -- Made admin check all ModelAdmin fieldsets for duplicates.Matthias Kestenholz2018-04-131-0/+13
|
* Fixed #27991 -- Added obj arg to InlineModelAdmin.has_add_permission().Jon Dufresne2018-04-042-0/+82
| | | | Thanks Vladimir Ivanov for the initial patch.
* Fixed #17962 -- Added ModelAdmin.get_deleted_objects().Becky Smith2018-02-241-0/+10
|
* Fixed imports per isort 4.3.1.Tim Graham2018-02-021-1/+2
| | | | Partially reverted 9bcf73d788866bc93f8248cb2e9d601ecbc4b50c.
* Fixed imports per isort 4.3.0.Mariusz Felisiak2018-02-011-2/+1
|
* Fixed #28984 -- Made assorted code simplifications.Tim Graham2018-01-031-12/+4
|
* Removed unnecessary trailing commas and spaces in various code.Mariusz Felisiak2017-12-281-4/+4
|
* Fixed #28898 -- Corrected admin check to allow a OneToOneField in ↵Rodrigo Pinheiro Marques de Araújo2017-12-131-1/+14
| | | | ModelAdmin.autocomplete_fields.
* Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ↵Johannes Hoppe2017-09-183-7/+134
| | | | | | | ManyToManyField in the admin. Thanks Florian Apolloner and Tim Graham for review and contributing to the patch.
* Refs #27804 -- Used subTest() in a modeladmin test.Nick Pope2017-09-031-4/+23
|
* Added a test for ModelAdmin.__str__().Anton Samarchyan2017-06-191-0/+4
|
* Improved test coverage of contrib/admin/checks.py.Anton Samarchyan2017-06-021-0/+23
|
* Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne2017-06-011-1/+1
|