djangosnippets.org: Latest snippets posted by mwolgemuthhttp://djangosnippets.org/users/mwolgemuth/2009-01-23T09:33:38.863096-06:00mwolgemuthdecorator to synchronize method at class / module level
2009-01-23T09:33:38.863096-06:00mwolgemuthhttp://djangosnippets.org/snippets/1296/<p>This decorator allows you to wrap class methods or module functions and synchronize access to them. It maintains a dict of locks with a key for each unique name of combined module name and method name. (Implementing class name is lost in decorator? Otherwise it would have class name too …</p>
Freely redistributableCompact P3P policy header injection middleware
2008-09-25T20:50:45.432904-05:00mwolgemuthhttp://djangosnippets.org/snippets/1084/<p>This is like snippet 786, except it does it at the middleware layer, so you don't have to reference it in every view.
Super simple.</p>
<p>refer to: http://www.djangosnippets.org/snippets/786/</p>
Freely redistributable