django-planet
April 28, 2024

Django: An admin extension to prevent state leaking between requests

published by Adam Johnson
in blog Adam Johnson
original entry Django: An admin extension to prevent state leaking between requests

Here’s a small protection I added to a project a few years ago. I was considering it again since I saw a similar potential bug in a Django middleware.

Long live the ModelAdmin instances

Django’s admin site is configured by the ModelAdmin class. You register this per model …