1
0
mirror of https://github.com/django/django.git synced 2024-11-18 07:26:04 +00:00
Commit Graph

101 Commits

Author SHA1 Message Date
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
Carlton Gibson
8245c99ee6
Fixed #29930 -- Allowed editing in admin with view-only inlines.
Co-authored-by: Tim Graham <timograham@gmail.com>
2018-12-03 07:44:18 -08:00
Simon Charette
84e7a9f4a7 Switched setUp() to setUpTestData() where possible in Django's tests. 2018-11-27 09:35:17 -05:00
Sanyam Khurana
a7d6cab771 Fixed #29282 -- Prevented some admin checks from crashing with TypeError.
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2018-11-20 17:19:13 -05:00
Matthias Kestenholz
f9ff1df1da Fixed #29917 -- Stopped collecting ModelAdmin.actions from base ModelAdmins. 2018-11-09 18:52:30 -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
Przemysław Buczkowski
70d0a1ca02 Fixed #29711 -- Added a system check for uniquness of admin actions' __name__. 2018-10-02 09:17:23 -04:00
Tim Graham
fd8a7a5313 Fixed #29723 -- Fixed crash if InlineModelAdmin.has_add_permission() doesn't 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-08-30 11:22:50 +02:00
Carlton Gibson
958c7b301e Fixed #29419 -- Allowed permissioning of admin actions. 2018-06-18 15:07:29 -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
Tim Graham
ec2c9c3531 Refs #29428 -- Fixed admin check crash when using a query expression in ModelAdmin.ordering. 2018-06-14 21:04:43 -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
Morgan Aubert
704443acac Fixed #29363 -- Added SimpleTestCase.assertWarnsMessage(). 2018-05-09 11:40:28 -04:00
Tim Graham
a480ef89ad Fixed inconsistent formatting in tests/modeladmin/test_checks.py. 2018-04-16 13:35:40 -04:00
Matthias Kestenholz
13efbb233a Fixed #29322 -- Made admin check all ModelAdmin fieldsets for duplicates. 2018-04-13 11:08:30 -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
Mariusz Felisiak
83a36ac49a
Removed unnecessary trailing commas and spaces in various code. 2017-12-28 21:07:29 +01:00
Rodrigo Pinheiro Marques de Araújo
30a389bd77 Fixed #28898 -- Corrected admin check to allow a OneToOneField in ModelAdmin.autocomplete_fields. 2017-12-13 02:39:27 -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
Anton Samarchyan
2b53c8377d Improved test coverage of contrib/admin/checks.py. 2017-06-02 18:47:07 -04:00
Jon Dufresne
2c69824e5a Refs #23968 -- Removed unnecessary lists, generators, and tuple calls. 2017-06-01 19:08:59 -04:00
David Szotten
d82ee32aac Fixed #27889 -- Fixed incorrect check error if ModelAdmin.ordering refers to 'pk'. 2017-03-02 10:25:05 -05: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
f3c43ad1fd Refs #23919 -- Removed python_2_unicode_compatible decorator usage 2017-01-18 13:44:34 +01:00
Claude Paroz
d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Anton Samarchyan
da79240050 Fixed #26632 -- Skipped admin.E111 list_display_links check if get_list_display() is overridden. 2016-12-22 09:32:11 -05:00
Tim Graham
96271533d2 Moved modeladmin check tests to a separate file. 2016-12-21 17:23:57 -05:00
Tim Graham
12c1d6fe8f Refs #27377 -- Fixed reverse query name clash in test model. 2016-12-19 10:10:48 -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