Jacob Kaplan-Moss

2 items tagged “snippets”

📌 Django Admin Customization Examples #
📌 Django snippets: RESTful class dispatch

Yet another spin on class-based HTTP method dispatch in Django. The neat trick this time around is with a classmethod dispatcher that creates a request-local instance of the class, thus letting you save state on self without causing errors. Neat technique. #