Changes between Version 2 and Version 3 of Ticket #32659, comment 9


Ignore:
Timestamp:
Jun 19, 2021, 12:41:43 PM (3 years ago)
Author:
Erik van Widenfelt

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32659, comment 9

    v2 v3  
    1 This had nothing to do with caching or `collectstatic` for me. I traced it to the `admin_site` attribute of `AutocompleteJsonView`.The view tries to get the `model_admin` class for the `remote model` from Django's default admin site. If you registered your remote model in a custom admin site a `KeyError` is raised (line 84). This behavior has changed from 3.1.12 to 3.2.0.
     1This had nothing to do with caching or `collectstatic` for me. I traced it to the `admin_site` attribute of `AutocompleteJsonView`.The view tries to get the `model_admin` class for the `remote model` from Django's default admin site. If you registered your remote model in a custom admin site a `KeyError` is raised (line 84). This behavior has changed from 3.1.12 to 3.2.0. See changes in commit 3071660acfbdf4b5c59457c8e9dc345d5e8894c5.
    22
    33A quick/dirty fix is to scan through the registered `AdminSites` in `all_sites` for the `admin_site ` that has registered the `remote_model`:
Back to Top