Przemysław Buczkowski
70d0a1ca02
Fixed #29711 -- Added a system check for uniquness of admin actions' __name__.
2018-10-02 09:17:23 -04:00
Rodrigo
371ece2f06
Fixed #29695 -- Added system checks for admin's app dependencies and TEMPLATES setting.
2018-08-20 17:57:46 -04:00
Jon Dufresne
dc0868d414
Removed redundant 'model' argument in admin checks.
2018-08-20 09:11:42 -04:00
Carlton Gibson
958c7b301e
Fixed #29419 -- Allowed permissioning of admin actions.
2018-06-18 15:07:29 -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
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
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
Nick Pope
d13a9e44de
Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.
2017-12-11 07:08:45 -05:00
Hunter Richards
47016adbf5
Fixed #28490 -- Removed unused code in admin.E108 check.
2017-10-02 13:04:42 -04: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
Tim Graham
37520d284e
Removed useless hasattr() checks in ModelAdmin checks.
...
These attributes are defined on BaseModelAdmin and thus should always
be there.
2017-06-02 15:27:15 -04:00
Tom
7afb476469
Fixed #28226 -- Replaced use of str.join() with concatenation.
2017-05-27 13:59:05 -04:00
Jon Dufresne
92bc727271
Replaced temporary lists used for passing arguments with iterables.
2017-04-26 10:54:20 -04:00
Mads Jensen
ed0cbc8d8b
Refs #23919 -- Removed some Python 2 compatibility code and comments.
2017-03-27 13:12:27 -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
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
Adam Chainz
d57ecf40eb
Fixed #27673 -- Made admin's checks run at check time instead of during registration.
...
Thanks Morgan Aubert for the test.
2017-01-10 07:02:13 -05: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
Henry Dang
6af23a4521
Fixed #27377 -- Clarified that prepopulated_fields doesn't work with OneToOneField.
2016-12-19 08:33:46 -05:00
Nick Pope
f1664a2734
Replaced '__' with LOOKUP_SEP constant.
2016-10-11 11:14:06 -04: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
Tim Graham
2cd2d18851
Fixed W503 flake8 warnings.
2016-04-04 17:14:26 -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
Tim Graham
406675b1a0
Fixed #26176 -- Fixed E123 flake8 warnings.
2016-02-05 15:11:07 -05:00
Vincenzo Pandolfo
0490d72f2a
Fixed #24116 -- Moved AdminSite.check_dependencies() to system checks.
2016-01-22 18:29:56 -05: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
Fabrizio Ettore Messina
ece78684d9
Fixed #25267 -- Corrected message for admin.E122 system check.
2015-08-13 12:34:48 -04:00
Alasdair Nicol
8972818289
Fixed #25206 -- Fixed error message when checking a ModelAdmin fieldset's fields.
2015-08-03 08:58:39 -04:00
Andriy Sokolovskiy
4359be023b
Removed unreachable code
2015-06-29 17:14:29 -04:00
Anssi Kääriäinen
8f30556329
Renamed Field.rel attribute to remote_field
...
Field.rel is now deprecated. Rel objects have now also remote_field
attribute. This means that self == self.remote_field.remote_field.
In addition, made the Rel objects a bit more like Field objects. Still,
marked ManyToManyFields as null=True.
2015-03-25 08:16:12 -04:00
Tim Graham
0ed7d15563
Sorted imports with isort; refs #23860 .
2015-02-06 08:16:28 -05:00
Muthiah Annamalai
b75c707943
Fixed #24089 -- Added check for when ModelAdmin.fieldsets[1]['fields'] isn't a list/tuple.
2015-01-12 13:47:58 -05:00
Daniel Pyrathon
fb48eb0581
Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
...
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
2015-01-06 19:25:12 -05:00
Daniel Pyrathon
8958170755
Fixed #9104 -- Moved FieldDoesNotExist to core.exceptions
2015-01-02 10:46:04 -05:00
Mosson, Andrew
b7219c7ba5
Fixed #23497 -- Made admin system checks run for custom AdminSites.
2014-12-17 09:11:46 -05:00
Tim Graham
1101467ce0
Limited lines to 119 characters in django/
...
refs #23395 .
2014-09-05 09:22:16 -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
Russell Keith-Magee
70ec4d776e
Fixed #22034 -- Added a specific set of relation checks for GenericInlineModelAdmin.
...
Thanks to jwa for the report.
2014-03-08 11:25:23 +08:00
Russell Keith-Magee
20da67d325
Cleaned up a repr() hack that caused problems on Python3.
2014-03-04 09:50:09 +08:00
Russell Keith-Magee
3c5fc708f1
Edited contrib.admin check messages for grammar and consistency.
2014-03-03 13:27:17 +08:00
Tim Graham
65b421c661
Fixed some flake8 errors from recent commits.
2014-02-15 11:21:15 -05:00
Aaron France
23b781cc3d
Fixed #22018 -- Fixed checks for ModelAdmin.fields not handling sub-lists.
...
Flatten a level of sublists before checking for duplicate fields.
When given sublists such as:
```python
class FooAdmin(admin.ModelAdmin):
fields = ('one', ('one', 'two'))
```
The previous code did not correctly detect the duplicated 'one' field.
Thanks to jwa for the report.
2014-02-15 15:01:44 +01:00