summaryrefslogtreecommitdiff
path: root/tests/modeladmin/tests.py
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 -- Reformatted code with Black.django-bot
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-07-05Refs #24121 -- Added __repr__() to AdminSite, DefaultAdminSite, and ModelAdmin.Eduardo Aldair Ahumada Garcia Jurado
Thanks tlebrize for the initial patch.
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
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-10-31Fixed #29901 -- Allowed overriding an ↵Javier Matos Odut
autocomplete/raw_id_fields/radio_fields widget with ModelAdmin.get_formset().
2018-06-15Fixed #23869 -- Made ModelAdmin.get_deleted_objects() use ↵Henk Kahlfuß
has_delete_permission() for permissions checking.
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-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-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-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
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
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-12-21Moved modeladmin check tests to a separate file.Tim Graham
2016-12-19Fixed #27377 -- Clarified that prepopulated_fields doesn't work with ↵Henry Dang
OneToOneField.
2016-12-07Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.Tim Graham
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-10-07Fixed #24941 -- Added ModelAdmin.get_exclude().Zach Borboa
Thanks Ola Sitarska for the initial patch.
2016-10-05Refs #27218 -- Fixed LogEntry tests on MySQL 5.5.Tim Graham
2016-10-04Fixed #27218 -- Returned LogEntry instances from ModelAdmin.log_*() methods.François Freitag
2016-09-21Fixed #27256 -- Changed Select widget's selected attribute to use HTML5 ↵Jon Dufresne
boolean syntax.
2016-08-24Fixed #26816 -- Corrected an admin check to require inlines to subclass ↵Berker Peksag
InlineModelAdmin.
2016-08-23Fixed #26998 -- Reverted some admin checks from checking field.many_to_many ↵Collin Anderson
back to isinstance(field, models.ManyToManyField). This partially reverts 983c158da7723eb00a376bd31db76709da4d0260
2016-06-04Fixed #19963 -- Added support for date_hierarchy across relations.Vytis Banaitis
2016-04-21Fixed #22383 -- Added support for HTML5 required attribute on required form ↵Jon Dufresne
fields.
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2016-03-19Refs #24227 -- Replaced M2M isinstance checks by field.many_to_manyClaude Paroz
Thanks Markus Holtermann, Collin Anderson and Tim Graham for the reviews.
2016-03-01Fixed #26229 -- Improved check for model admin check admin.E124Alasdair Nicol
Refs #22792
2016-02-12Removed unneeded hint=None/obj=None in system check messages.Tim Graham
2015-12-03Fixed many spelling mistakes in code, comments, and docs.Josh Soref
2015-09-12Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić
2015-09-11Fixed #25374 -- Made ModelAdmin checks work on instances instead of classes.Malcolm Box
This allows dynamically-generated attributes to be specified in checked ModelAdmin attributes without triggering errors.
2015-07-02Fixed #24908 -- Fixed duplicate readonly field rendering.jpic
ModelAdmin added readonly_fields to exclude, but would not undeclare them if they were overridden.
2015-05-20Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-18Removed support for admin validators per deprecation timeline; refs #16905.Tim Graham