Commit Graph

79 Commits

Author SHA1 Message Date
Simon Charette 94f63b926f Refs #31395 -- Relied on setUpTestData() test data isolation in various tests. 2020-05-15 20:22:56 +02:00
Tim Graham 6079ed82f4 Refs #27991 -- Made obj a required argument of InlineModelAdmin.has_add_permission().
Per deprecation timeline.
2019-01-17 11:14:07 -05:00
MaximZemskov 3c01fe30f3 Fixed #30097 -- Made 'obj' arg of InlineModelAdmin.has_add_permission() optional.
Restored backwards compatibility after refs #27991.
Regression in be6ca89396.
2019-01-11 18:02:43 -05:00
Javier Matos Odut 3d4d0a25b2 Fixed #29901 -- Allowed overriding an autocomplete/raw_id_fields/radio_fields widget with ModelAdmin.get_formset(). 2018-10-31 10:16:17 -04:00
Henk Kahlfuß 3eb9127678 Fixed #23869 -- Made ModelAdmin.get_deleted_objects() use has_delete_permission() for permissions checking. 2018-06-15 10:31:08 -04:00
Carlton Gibson b30f9b131c Refs #29419, #8936 -- Removed change permission requirement for admin actions.
Partially reverted 825f0beda8.
2018-06-13 14:49:28 -04:00
olivierdalang 825f0beda8 Fixed #8936 -- Added a view permission and a read-only admin.
Co-authored-by: Petr Dlouhy <petr.dlouhy@email.cz>
Co-authored-by: Olivier Dalang <olivier.dalang@gmail.com>
2018-05-16 06:44:55 -04:00
Jon Dufresne be6ca89396 Fixed #27991 -- Added obj arg to InlineModelAdmin.has_add_permission().
Thanks Vladimir Ivanov for the initial patch.
2018-04-04 19:21:50 -04:00
Becky Smith 8116e588db Fixed #17962 -- Added ModelAdmin.get_deleted_objects(). 2018-02-24 20:41:43 -05:00
Tim Graham d0a42a14c0 Fixed imports per isort 4.3.1.
Partially reverted 9bcf73d788.
2018-02-02 14:44:07 -05:00
Mariusz Felisiak 9bcf73d788 Fixed imports per isort 4.3.0. 2018-02-01 09:29:46 +01:00
Tim Graham acc8dd4142
Fixed #28984 -- Made assorted code simplifications. 2018-01-03 13:24:02 -05:00
Johannes Hoppe 94cd8efc50 Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ManyToManyField in the admin.
Thanks Florian Apolloner and Tim Graham for review and
contributing to the patch.
2017-09-18 13:48:02 -04:00
Nick Pope dea4cfb95b Refs #27804 -- Used subTest() in a modeladmin test. 2017-09-03 21:20:43 -04:00
Anton Samarchyan 90294cc2ae Added a test for ModelAdmin.__str__(). 2017-06-19 15:33:21 -04:00
Jon Dufresne 2c69824e5a Refs #23968 -- Removed unnecessary lists, generators, and tuple calls. 2017-06-01 19:08:59 -04:00
Anton Samarchyan b27166b769 Fixed #27356 -- Fixed ModelAdmin.lookup_allowed() for some nested relations. 2017-02-07 19:33:26 -05:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Simon Charette cecc079168 Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Tim Graham 96271533d2 Moved modeladmin check tests to a separate file. 2016-12-21 17:23:57 -05:00
Henry Dang 6af23a4521 Fixed #27377 -- Clarified that prepopulated_fields doesn't work with OneToOneField. 2016-12-19 08:33:46 -05:00
Tim Graham b5f0b3478d Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
Ramin Farajpour Cami 967be82443 Fixed E305 flake8 warnings. 2016-11-14 12:30:46 -05:00
za 321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Zach Borboa bf91be83d5 Fixed #24941 -- Added ModelAdmin.get_exclude().
Thanks Ola Sitarska for the initial patch.
2016-10-07 18:49:28 -04:00
Tim Graham e5f5e8ac17 Refs #27218 -- Fixed LogEntry tests on MySQL 5.5. 2016-10-05 09:17:26 -04:00
François Freitag aa9569fce1 Fixed #27218 -- Returned LogEntry instances from ModelAdmin.log_*() methods. 2016-10-04 14:08:53 -04:00
Jon Dufresne 2c716c1dc7 Fixed #27256 -- Changed Select widget's selected attribute to use HTML5 boolean syntax. 2016-09-21 15:12:13 -07:00
Berker Peksag 426bca002c Fixed #26816 -- Corrected an admin check to require inlines to subclass InlineModelAdmin. 2016-08-24 17:34:32 -04:00
Collin Anderson 384f89f8f8 Fixed #26998 -- Reverted some admin checks from checking field.many_to_many back to isinstance(field, models.ManyToManyField).
This partially reverts 983c158da7
2016-08-23 16:00:12 -04:00
Vytis Banaitis 2f9c4e2b6f Fixed #19963 -- Added support for date_hierarchy across relations. 2016-06-04 12:14:02 -04:00
Jon Dufresne ec6121693f Fixed #22383 -- Added support for HTML5 required attribute on required form fields. 2016-04-21 19:16:38 -04:00
Tim Graham 92053acbb9 Fixed E128 flake8 warnings in tests/. 2016-04-08 10:12:33 -04:00
Claude Paroz 983c158da7 Refs #24227 -- Replaced M2M isinstance checks by field.many_to_many
Thanks Markus Holtermann, Collin Anderson and Tim Graham for the reviews.
2016-03-19 09:24:27 +01:00
Alasdair Nicol 65bd053f11 Fixed #26229 -- Improved check for model admin check admin.E124
Refs #22792
2016-03-01 08:20:14 -05:00
Tim Graham 004ba0f99e Removed unneeded hint=None/obj=None in system check messages. 2016-02-12 13:01:25 -05:00
Josh Soref 93452a70e8 Fixed many spelling mistakes in code, comments, and docs. 2015-12-03 12:48:24 -05:00
Dražen Odobašić b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Malcolm Box 1d8eb0cae5 Fixed #25374 -- Made ModelAdmin checks work on instances instead of classes.
This allows dynamically-generated attributes to be specified in
checked ModelAdmin attributes without triggering errors.
2015-09-11 09:28:34 -04:00
jpic fedef7b2c6 Fixed #24908 -- Fixed duplicate readonly field rendering.
ModelAdmin added readonly_fields to exclude, but would not undeclare
them if they were overridden.
2015-07-02 13:37:30 -04:00
Simon Charette be67400b47 Refs #24652 -- Used SimpleTestCase where appropriate. 2015-05-20 13:46:13 -04:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Tim Graham 67a76500a5 Removed support for admin validators per deprecation timeline; refs #16905. 2015-01-18 14:43:21 -05:00
Simon Charette 07988744b3 Fixed #13165 -- Added edit and delete links to admin foreign key widgets.
Thanks to Collin Anderson for the review and suggestions and Tim for the
final review.
2015-01-10 12:24:52 -05:00
Claude Paroz 51890ce889 Applied ignore_warnings to Django tests 2014-12-30 18:16:25 +01:00
Diego Guimarães d05709821c Refs #23947 -- Made a modeladmin test cleanup after itself. 2014-12-05 16:19:59 -05:00
Maxime Turcotte 504c89e800 Fixed #6327 -- Added has_module_permission method to BaseModelAdmin
Thanks chrj for the suggestion.
2014-06-13 09:31:40 -04:00
Greg Chapple d8f19bb3b6 Fixed #22792 -- Updated checks for list_display_links in model admin 2014-06-10 09:35:05 -04:00
Anders Steinlein 4ef10f245a Fixed #17642 -- Added min_num support to modelformsets, inlines, and the admin.
Thanks Stephen Burrows for work on the patch as well.

Forwardport of 2914f66983 from stable/1.7.x
2014-05-15 07:25:35 -04:00