Changes between Version 2 and Version 3 of Ticket #32659, comment 9
- Timestamp:
- Jun 19, 2021, 12:41:43 PM (3 years ago)
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. 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. See changes in commit 3071660acfbdf4b5c59457c8e9dc345d5e8894c5. 2 2 3 3 A quick/dirty fix is to scan through the registered `AdminSites` in `all_sites` for the `admin_site ` that has registered the `remote_model`: