Commit Graph

55 Commits

Author SHA1 Message Date
Federico Jaramillo Martínez 372eaa395f Fixed #28991 -- Added EmptyFieldListFilter class in admin.filters.
Thanks Simon Charette and Carlton Gibson for reviews.

Co-Authored-By: Jonas Haag <jonas@lophus.org>
Co-Authored-By: Christophe Baldy <christophe.baldy@polyconseil.fr>
2020-01-03 07:58:04 +01:00
Jon Dufresne 39791c8e6d Harmonized Windows checks in tests to a single style. 2019-11-06 15:14:30 +01:00
Dan Moore bc94e3c1a2 Fixed #29919 -- Fixed RelatedOnlyFieldListFilter crash with reverse relationships. 2019-10-23 10:50:31 +02:00
zeyneloz 8289fc55ff Refs #30449 -- Made RelatedOnlyFieldListFilter respect ModelAdmin.ordering. 2019-08-15 10:29:10 +02:00
zeyneloz 00035672a4 Fixed #30449 -- Fixed RelatedFieldListFilter/RelatedOnlyFieldListFilter to respect model's Meta.ordering.
Regression in 6d4e5feb79.

Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-08-15 10:29:05 +02:00
Tim Graham 0004daa536
Used 4 space hanging indent for dictionaries.
Thanks Mariusz Felisiak for auditing.
2019-01-02 18:18:19 -05:00
Simon Charette 0f212db29d Made reused RequestFactory instances class attributes. 2018-11-27 09:49:02 -05:00
Simon Charette 84e7a9f4a7 Switched setUp() to setUpTestData() where possible in Django's tests. 2018-11-27 09:35:17 -05:00
Hasan Ramezani 6d4e5feb79 Fixed #29835 -- Made RelatedFieldListFilter respect ModelAdmin.ordering. 2018-11-14 14:29:39 -05: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
Tim Graham 5fa4f40f45 Fixed #29227 -- Allowed BooleanField to be null=True.
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-20 12:10:10 -04:00
Mariusz Felisiak 83a36ac49a
Removed unnecessary trailing commas and spaces in various code. 2017-12-28 21:07:29 +01:00
Simon Meers 7bba82453c Fixed #28496 -- Added ModelAdmin.get_changelist_instance(). 2017-08-22 08:17:26 -04:00
Paulo 4ad2f86284 Fixed #28202 -- Fixed FieldListFilter.get_queryset() crash on invalid input. 2017-06-06 07:54:31 -04:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Claude Paroz 2366100872 Removed unneeded force_text calls in the test suite 2017-01-24 18:45:54 +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
za 321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Jon Dufresne 4f336f6652 Fixed #26747 -- Used more specific assertions in the Django test suite. 2016-06-16 14:19:18 -04:00
Vincenzo Pandolfo 069319396f Fixed #26277 -- Added support for null values in ChoicesFieldListFilter. 2016-05-12 12:40:14 -04:00
Blake Griffith 5fdbd9e36c Changed gypsy to manouche in docs and tests.
"Gypsy" is considered a slur by the Romani people whom it refers to.
"manouche jazz" is used in place of "gypsy jazz" and is an accepted
term for the same genre of music.
2016-02-03 09:45:30 -05:00
rynomster 468d8211df Fixed #23971 -- Added "Has date"/"No date" choices for DateFieldListFilter. 2016-02-02 12:04:14 -05:00
Hasan 26ad01719d Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate. 2016-01-29 13:37:33 -05:00
Hasan 3d0dcd7f5a Refs #26022 -- Used context manager version of assertRaises in tests. 2016-01-29 12:32:18 -05:00
Nick Sandford 5fa7b592b3 Fixed #22810 -- Corrected admin changelist count for list filters that filter by default. 2015-11-18 19:54:27 -05:00
Tim Graham e9673c657a Cleaned up admin_filters' docstrings. 2015-11-14 11:30:24 -05:00
Tim Graham b1b14587ae Fixed admin_filters test failures when run in reverse. 2015-11-14 11:30:24 -05:00
Andrey Kuzmin 815f4d206d Fixed #25606 -- Added support for "__" lookup in RelatedOnlyFieldList 2015-11-12 19:50:54 -05:00
Tim Graham 9c5e272860 Fixed #25550 -- Deprecated direct assignment to the reverse side of a related set. 2015-10-27 07:57:15 -04:00
Tim Graham 4a50daf6b3 Fixed #25562 -- Skipped a time dependent admin_filters test on Windows. 2015-10-19 20:26:33 -04:00
Dražen Odobašić b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Tim Graham 064d4b1cb0 Fixed #25320 -- Reverted ManyToManyField.null to False for backwards compatibility.
Thanks Tom Christie for the report and review.
2015-09-01 07:59:39 -04:00
Flavio Curella c2e70f0265 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 2015-07-27 18:28:13 -04:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Konrad Świat 06b11b617e Fixed #23616 - Fixed generic relations in ModelAdmin.list_filter.
Thanks ranjur for reporting bug, timgraham for review,
and collinanderson for contributing tips.
2014-10-10 12:10:32 -04:00
Thomas Chaumeny b2aad7b836 Replaced set([foo, ...]) by {foo, ...} literals. Refs PR 3282.
Thanks Collin Anderson for the review.
2014-09-29 00:01:38 +07:00
Tim Graham d3543af750 Added sorting to some admin_view tests to prevent transient failures; refs #23380. 2014-09-08 17:10:58 -04:00
Baylee Feore f7d3a6255c Fixed #23380 -- Fixed flaky test: admin_filters.tests.ListFiltersTests.test_relatedfield 2014-09-05 20:05:51 -04:00
Ramiro Morales 3a297d7816 Fixed #23055 -- Made generic admin filter obey ModelAdmin queryset.
Thanks to Trac user synasius and to Ola Sitarska for helping in
identifying the issue and helping with the test case.
2014-08-30 10:07:00 -03:00
Florian Apolloner 6d256ae248 Fixed test failures from 98e8da3709. 2014-08-04 16:54:43 +02:00
Tim Graham b50ea73e1e Fixed two tests in previous commit; refs #16311. 2014-08-04 10:21:13 -04:00
Stanislas Guerra 98e8da3709 Fixed #16311 -- Added a RelatedOnlyFieldListFilter class in admin.filters. 2014-08-04 09:39:02 -04:00
Anubhav Joshi 011abb7d96 Fixed #19671 -- Added warnings that null and validators are ignored for ManyToManyField.
Thanks Loic Bistuer and Tim Graham for help and review.
2014-07-09 16:01:09 -04:00
Aymeric Augustin e32095616c Imported override_settings from its new location. 2013-12-23 21:37:56 +01:00
Loic Bistuer 6685713869 Fixed E127 pep8 warnings. 2013-12-14 11:59:15 -05:00
Vajrasky Kok 68b540c977 Fixed #21361 -- allowed access self.value() from SimpleListFilter lookup
Reviewed by Chris Medrela.
2013-11-19 09:14:22 +02:00
Alex Gaynor c347f78cc1 Fixed all E226 violations 2013-11-03 10:08:55 -08:00
Jason Myers 7a61c68c50 PEP8 cleanup
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02 23:50:49 -05:00
coagulant 8eec2d93b6 Fixed all E261 warnings 2013-11-02 23:50:33 -05:00