#34345: Add system check for filter_horizontal/filter_vertical on 
ManyToManyFields
with intermediary models.
-------------------------------------+-------------------------------------
     Reporter:  David Pratten        |                    Owner:  David
         Type:                       |  Pratten
  Cleanup/optimization               |                   Status:  assigned
    Component:  contrib.admin        |                  Version:  4.1
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

 Replying to [comment:6 David Pratten]:
 > - Are we redefining {{{admin.E013}}} there seems to already be a
 description of this error?
 > - Could you direct me to an explanation of where the documentation for
 the errors is held and how it is updated?

 We want to add `filter_vertical[n]` and `filter_horizontal[n]` to the
 existing error `admin.E013` that is documented in
 
[https://github.com/django/django/blob/8eef22dfed2d53df0da10c0090d9cb04f66efb15/docs/ref/checks.txt#L637-L639
 docs/ref/checks.txt], so we need to update the message in docs to the:

 ''"`fields[n]/filter_horizontal[n]/filter_vertical[n]/fieldsets[n][m]`
 cannot include the `ManyToManyField` `<field name>`, because that field
 manually specifies a relationship model."''

 Docs are wrapped at 79 chars.

 > - Could you direct me to an explanation of how to add a test case?

 I would add test methods to the
 `tests.modeladmin.test_checks.FilterHorizontalCheckTests` and
 `tests.modeladmin.test_checks.FilterVerticalCheckTests`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34345#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701865ee4fab7-398d1245-57fb-4617-8909-f2ef9a198a92-000000%40eu-central-1.amazonses.com.

Reply via email to