djangosnippets.org: Latest snippets posted by bradbeattiehttp://djangosnippets.org/users/bradbeattie/2015-02-10T16:37:31.282397-06:00bradbeattieDeferrable function cache decorator
2015-02-10T16:37:31.282397-06:00bradbeattiehttp://djangosnippets.org/snippets/10464/<p>A variant of https://djangosnippets.org/snippets/2850/ that allows expensive calls to be deferred to an asynchronous process.</p>
Freely redistributableQRCode template tag
2012-11-22T19:04:22.533580-06:00bradbeattiehttp://djangosnippets.org/snippets/2852/<p>I had a hell of a time getting most QR code stuffs out there working with Django. Many projects, but problems here and problems there. The only additional code you'll need for this is to "pip install qrcode". After that, you're free to <img src="{% qrcode_datauri "http://localhost:8000/" %}" />.</p>
Freely redistributableFunction cache decorator
2012-11-21T12:38:13.613686-06:00bradbeattiehttp://djangosnippets.org/snippets/2850/<p>This is caching mechanism augmented to help address a number of common pitfalls in caching: cache stampeding, simultaneous expiry, cache invalidation, and the storing of None as a legitimate value.</p>
<p>No doubt the automatic key generation could stand to be simplified, but it works.</p>
Freely redistributable