{"version":"1.0","type":"rich","title":"How to whitelist other admin lookups with Django 1.2.5","description":"This example demonstrates how to override Django 1.2.5’s admin lookup restrictions by subclassing `ModelAdmin` and redefining the `lookup_allowed` method. It shows a whitelist approach that permits specific query parameters—such as `related__pk` and `related__custom_field`—while delegating all other checks to the parent class’s `super().lookup_allowed`. The code explicitly references Django’s `ModelAdmin` API and the `lookup_allowed` signature change in version 1.2.5, which added a `value` parameter. It relies on the built-in `super()` call to preserve default behavior for unlisted keys, illustrating a practical customization for admin list filtering.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-974149?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}