summaryrefslogtreecommitdiff
path: root/tests/modeladmin
AgeCommit message (Collapse)Author
2023-02-01[4.2.x] Refs #33476 -- Applied Black's 2023 stable style.David Smith
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 Backport of 097e3a70c1481ee7b042b2edd91b2be86fb7b5b6 from main
2022-04-15Fixed #11803 -- Allowed admin select widgets to display new related objects.mgaligniana
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.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-02-03Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak
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], )
2022-01-11Fixed #11715 -- Changed default value of ModelAdmin.actions/inlines to empty ↵Jacob Walls
tuples. This clarifies the intended pattern of overwriting the default value rather than mutating it.
2021-09-03Fixed #32975 -- Fixed admin system check for inlines with foreign keys to ↵taulant
proxy models.
2021-07-05Refs #24121 -- Added __repr__() to AdminSite, DefaultAdminSite, and ModelAdmin.Eduardo Aldair Ahumada Garcia Jurado
Thanks tlebrize for the initial patch.
2021-03-04Fixed #32494 -- Adjusted system check for raw_id_fields to warn about ↵Hasan Ramezani
Field.attname.
2021-03-04Corrected messages of admin checks for invalid model field names.Hasan Ramezani
2021-01-13Fixed #16117 -- Added decorators for admin action and display functions.Nick Pope
Refs #25134, #32099.
2020-11-13Unified admin action description generation.Nick Pope
Actions added to AdminSite.actions would not have the first character of their description capitalized. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-09-14Fixed #32003 -- Added obj argument to has_perm() methods in tests.Alexander Todorov
2020-05-15Refs #31395 -- Relied on setUpTestData() test data isolation in various tests.Simon Charette
2020-04-17Fixed #30311 -- Restored ability to override global admin actions.hashlash
2020-01-10Fixed #30980 -- Improved error message when checking uniqueness of admin ↵Adam Donaghy
actions' __name__. Thanks Keshav Kumar for the initial patch.
2019-07-10Fixed #30543 -- Fixed checks of ModelAdmin.list_display for fields ↵Hasan Ramezani
accessible only via instance. Co-Authored-By: Andrew Simons <andrewsimons@bubblegroup.com>
2019-01-17Refs #27991 -- Made obj a required argument of ↵Tim Graham
InlineModelAdmin.has_add_permission(). Per deprecation timeline.
2019-01-11Fixed #30097 -- Made 'obj' arg of InlineModelAdmin.has_add_permission() ↵MaximZemskov
optional. Restored backwards compatibility after refs #27991. Regression in be6ca89396c031619947921c81b8795d816e3285.
2018-12-03Fixed #29930 -- Allowed editing in admin with view-only inlines.Carlton Gibson
Co-authored-by: Tim Graham <timograham@gmail.com>
2018-11-27Switched setUp() to setUpTestData() where possible in Django's tests.Simon Charette
2018-11-20Fixed #29282 -- Prevented some admin checks from crashing with TypeError.Sanyam Khurana
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2018-11-09Fixed #29917 -- Stopped collecting ModelAdmin.actions from base ModelAdmins.Matthias Kestenholz
2018-10-31Fixed #29901 -- Allowed overriding an ↵Javier Matos Odut
autocomplete/raw_id_fields/radio_fields widget with ModelAdmin.get_formset().
2018-10-02Fixed #29711 -- Added a system check for uniquness of admin actions' __name__.Przemysław Buczkowski
2018-08-30Fixed #29723 -- Fixed crash if InlineModelAdmin.has_add_permission() doesn't ↵Tim Graham
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.
2018-06-18Fixed #29419 -- Allowed permissioning of admin actions.Carlton Gibson
2018-06-15Fixed #23869 -- Made ModelAdmin.get_deleted_objects() use ↵Henk Kahlfuß
has_delete_permission() for permissions checking.
2018-06-14Refs #29428 -- Fixed admin check crash when using a query expression in ↵Tim Graham
ModelAdmin.ordering.
2018-06-13Refs #29419, #8936 -- Removed change permission requirement for admin actions.Carlton Gibson
Partially reverted 825f0beda804e48e9197fcf3b0d909f9f548aa47.
2018-05-16Fixed #8936 -- Added a view permission and a read-only admin.olivierdalang
Co-authored-by: Petr Dlouhy <petr.dlouhy@email.cz> Co-authored-by: Olivier Dalang <olivier.dalang@gmail.com>
2018-05-09Fixed #29363 -- Added SimpleTestCase.assertWarnsMessage().Morgan Aubert
2018-04-16Fixed inconsistent formatting in tests/modeladmin/test_checks.py.Tim Graham
2018-04-13Fixed #29322 -- Made admin check all ModelAdmin fieldsets for duplicates.Matthias Kestenholz
2018-04-04Fixed #27991 -- Added obj arg to InlineModelAdmin.has_add_permission().Jon Dufresne
Thanks Vladimir Ivanov for the initial patch.
2018-02-24Fixed #17962 -- Added ModelAdmin.get_deleted_objects().Becky Smith
2018-02-02Fixed imports per isort 4.3.1.Tim Graham
Partially reverted 9bcf73d788866bc93f8248cb2e9d601ecbc4b50c.
2018-02-01Fixed imports per isort 4.3.0.Mariusz Felisiak
2018-01-03Fixed #28984 -- Made assorted code simplifications.Tim Graham
2017-12-28Removed unnecessary trailing commas and spaces in various code.Mariusz Felisiak
2017-12-13Fixed #28898 -- Corrected admin check to allow a OneToOneField in ↵Rodrigo Pinheiro Marques de Araújo
ModelAdmin.autocomplete_fields.
2017-09-18Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ↵Johannes Hoppe
ManyToManyField in the admin. Thanks Florian Apolloner and Tim Graham for review and contributing to the patch.
2017-09-03Refs #27804 -- Used subTest() in a modeladmin test.Nick Pope
2017-06-19Added a test for ModelAdmin.__str__().Anton Samarchyan
2017-06-02Improved test coverage of contrib/admin/checks.py.Anton Samarchyan
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
2017-03-02Fixed #27889 -- Fixed incorrect check error if ModelAdmin.ordering refers to ↵David Szotten
'pk'.
2017-02-07Fixed #27356 -- Fixed ModelAdmin.lookup_allowed() for some nested relations.Anton Samarchyan
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette