Simon Willison’s Weblog

Blogmarks tagged django, python in Mar

Filters: Type: blogmark × Month: Mar × django × python ×


The Onion Uses Django, And Why It Matters To Us. The Onion ported their main site from PHP and Drupal to Django in three months with a team of four developers, including a full migration of their archived content. Their developers answer questions about the switch in this thread on the Django sub-reddit. # 25th March 2010, 6:43 pm

Cache Machine: Automatic caching for your Django models. This is the third new ORM caching layer for Django I’ve seen in the past month! Cache Machine was developed for zamboni, the port of addons.mozilla.org to Django. Caching is enabled using a model mixin class (to hook up some post_delete hooks) and a custom caching manager. Invalidation works by maintaining a “flush list” of dependent cache entries for each object—this is currently stored in memcached and hence has potential race conditions, but a comment in the source code suggests that this could be solved by moving to redis. # 11th March 2010, 7:35 pm

Is johnny-cache for you? “Using Johnny is really adopting a particular caching strategy. This strategy isn’t always a win; it can impact performance negatively”—but for a high percentage of Django sites there’s a very good chance it will be a net bonus. # 2nd March 2010, 11:44 am

jmoiron.net: Johnny Cache. The blog entry announcing Johnny Cache (“a drop-in caching library/framework for Django that will cache all of your querysets forever in a consistent and safe manner”) to the world. # 1st March 2010, 11:48 am

It’s time for a change. Jacob Kaplan-Moss is joining Revolution Systems, who will now be offering professional Django support “to companies who need a Django expert on staff, but can’t afford someone full-time.” # 4th March 2009, 10:30 pm

Django snippets: Smart {% if %} template tag. Chris Beaven’s drop-in replacement for Django’s {% if %} tag that adds comparison operators (less than, greater than, not equal etc) while staying backwards compatible with the less able original. I love it. This is one place where I no longer favour Django’s stated philosophy: I think it’s perfectly reasonable to use comparisons in presentation logic, and I’ve found that in my own code the lack of an advanced if tag frequently leads to pure presentation logic sneaking in to my view functions. # 3rd March 2009, 3:03 pm

Django Development with Djblets. The Review Board team have extracted a library of useful Django utilities from their application. The first to be documented are helpers for reducing boilerplate in custom template tags. # 31st March 2008, 1:19 pm

Exposing calendar events using iCalendar in Django. A simple abstraction around the vobject Python library. # 30th March 2008, 6:31 pm

xPyUnit: Uniting in Python with XML reporting. Should be just the ticket for integrating Django’s testing framework with Cruise Control. # 27th March 2008, 12:35 pm

Setup mod_wsgi for Django and Shared Hosting. Tutorial by David Cramer; attached are useful comments from mod_wsgi author Graham Dumpleton. # 26th March 2008, 2:42 pm

Djangofriendly (via) Ryan Berg’s attractive new site collecting ratings and reviews for web hosts that support Django. I’m still happily hosted on a bytemark VPS, which isn’t currently listed on the site. # 26th March 2008, 8:47 am

Better Use of Newforms. Two really neat techniques: using an inclusion tag template to DRY your custom form templates, and adding what-to-do-next methods to the form class itself to cut down on the application code in your views. # 25th March 2008, 10:53 pm

views.py for wikinear.com (via) I’ve published the views.py file from wikinear.com as an example of simple Fire Eagle integration with a Django application. # 22nd March 2008, 7:23 pm

Version 2.0 of mod_wsgi is now available. Includes features that should make Python (and Django) on shared hosting much easier: a non-root user can touch their WSGI script file to restart just their application’s daemon processes when they make changes and Python virtual environments are supported to allow different versions of packages without interference. # 21st March 2008, 1:23 pm

mysql_cluster (via) My Russian isn’t all that good, but this looks like a neat way of getting Django to talk to a master/slave setup, written by Ivan Sagalaev. UPDATE: English docs are linked from the comments. # 21st March 2008, 8:45 am

Simple Exception Response for AJAX debugging. Neat solution to the problem of Django error pages showing up as raw HTML in the Firebug Ajax log. # 19th March 2008, 4:44 pm

IronPython, MS SQL, and PEP 249. How Dino Viehland got Django’s ORM to talk to the .NET database layer. # 19th March 2008, 9:46 am

Queryset Implementation. Malcolm explains the work that has gone in to the queryset-refactor branch. Executive summary: Python’s ORM is probably a lot better at SQL than you are. # 19th March 2008, 9:43 am

Integrating reCAPTCHA with Django. Looks pretty straight forward. # 19th March 2008, 9:41 am

Hacking Contributed Models. Neat Django trick using monkeypatching to make some minor tweaks to built-in contributed models such as auth or flatpages. # 11th March 2008, 5:51 am

In-Depth django-sphinx Tutorial. Another neat Django extension from the guys at Curse: easy integration with the sphinx full text search engine. # 5th March 2008, 12:03 am

DjangoKit. Early preview release of a tool that lets you package a Django application up as a fully contained OS X application. When Leopard ships with PyObjC this kind of thing will be even easier. # 29th March 2007, 12:50 am

cmemcache. Python extension for libmemcache which provides more than twice the performance of the pure-Python memcached client. Supported by Django development version. # 27th March 2007, 1:51 pm

Free Software Foundation to switch to Django. “FSF is switching from Zope to Django (both Python powered!) for web application development... Lots of new stuff coming soon, including contributions back to the Django community.” # 25th March 2007, 7:56 pm