Skip to content

Instantly share code, notes, and snippets.

@simonw
Created May 4, 2016 22:34
Show Gist options
  • Select an option

  • Save simonw/75a68c207994f7432da3b4f8d4dbbabe to your computer and use it in GitHub Desktop.

Select an option

Save simonw/75a68c207994f7432da3b4f8d4dbbabe to your computer and use it in GitHub Desktop.
How to re-enable arbitrary querystring lookups for Django objects in the admin (deliberately re-opening this old security hole so only do this if you 100% trust everyone with access to your Django admin panel: https://www.djangoproject.com/weblog/2010/dec/22/security/ )
admin.site.register(MyModel,
lookup_allowed=lambda *args, **kwargs: True,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment