Changes between Initial Version and Version 1 of Ticket #28262


Ignore:
Timestamp:
06/01/2017 12:59:14 PM (4 years ago)
Author:
Tim Graham
Comment:

I can reproduce the issue with some caveats. I used models.Model instead of BaseModel as you didn't provide a definition for that. I'm not sure if that difference matters.

I bisected the behavior change to c2e70f02653519db3a49cd48f5158ccad7434d25 which is odd because that commit shouldn't change behavior. However, before that commit (on 1.8), I get the error (admin.E116) The value of 'list_filter[0]' refers to 'auditor__auditor__institution', which does not refer to a Field. Afterward that commit, I see the DisallowedModelAdminLookup exception in this ticket's description.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28262

    • Property Component changed from Uncategorized to contrib.admin
  • Ticket #28262 – Description

    initial v1  
    2121}}}
    2222
    23 As of Django version 1.9 up to the latest release 1.11.1, the above lookup will raise server error when used by raising DisallowedModelAdminLookup (Filtering by auditor__auditor__institution__id__exact not allowed). This is because the lookup uses reverse relation between User and Auditor model.
     23As of Django version 1.9 up to the latest release 1.11.1, the above lookup will raise server error when used by raising `DisallowedModelAdminLookup (Filtering by auditor__auditor__institution__id__exact not allowed)`. This is because the lookup uses reverse relation between User and Auditor model.
    2424
    2525This lookup passes checks and only crashes when user tries to use the filter. I could not find the reasoning behind the implementation of lookup_allowed and why it would forbid using reverse relations. Nor could I find any documentation for this change in 1.9 release notes.
Back to Top