Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

332 items tagged “django”

EveryBlock source code released. EveryBlock’s Knight Foundation grant required them to release the source code after two years, under the GPL. Lots of neat Django / PostgreSQL / GIS tricks to be found within. 0 1st July 2009, 8:01 pm

Towards a Standard for Django Session Messages. I completely agree that Django’s user.message_set (which I helped design) is unfit for purpose, but I don’t think sessions are the right solution for messages sent to users. A signed cookie containing either the full message or a key referencing the message body on the server is a much more generally useful solution as it avoids the need for a round trip to a persistent store entirely. 1 19th June 2009, 9:57 pm

Investigate your MP’s expenses. Launched today, this is the project that has been keeping me ultra-busy for the past week—we’re crowdsourcing the analysis of the 700,000+ scanned MP expenses documents released this morning. It’s the Guardian’s first live Django-powered application, and also the first time we’ve hosted something on EC2. 13 18th June 2009, 11:16 pm

Installing Django, Solr, Varnish and Supervisord with Buildout. Useful, detailed instructions... but I still think this stuff is Way Too Difficult at the moment. I’m a big fan of the idea of sites that are assembled from multiple smaller web services talking HTTP to each other, but ensuring all the moving parts stay running is massively more painful than just running Apache and MySQL. 1 7th June 2009, 1:54 pm

Testing Django Views for Concurrency Issues. Neat decorator for executing a Django view under high concurrency in your unit tests, to help spot errors caused by database race conditions that should be executed inside a transaction. 0 27th May 2009, 10:01 am

Introducing Yardbird. I absolutely love it—an IRC bot built on top of Twisted that passes incoming messages off to Django code running in a separate thread. Requests and Response objects are used to represent incoming and outgoing messages, and Django’s regex-based URL routing is used to dispatch messages to different handling functions based on their content. 6 22nd May 2009, 11:13 pm

Django tip: Caching and two-phased template rendering. Neat trick for expensive pages which can be mostly cached with the exception of the “logged in as” bit—run them through the template system twice, caching the intermediary generated template. 1 19th May 2009, 1:34 am

djng—a Django powered microframework

djng is nearly two weeks old now, so it’s about time I wrote a bit about the project. [... 1500 words]

South’s Design. Andrew Godwin explains why South resorts to parsing your models.py file in order to construct information about for creating automatic migrations. 0 13th May 2009, 12:30 pm

Contextual (via) I’ve been trying to figure out a sane way to replace Django’s settings.py global module with something that’s designed to be reconfigured at run-time. Contextual appears to be trying to solve exactly that problem. 4 12th May 2009, 1:19 pm

mmalone’s django-caching. Mike Malone shares code used by Pownce to add QuerySet level caching to Django. It’s a smart implementation—a CachingQuerySet class inspects the arguments passed to get(), and if they’re just a straight forward exact PK lookup hits memcache for the object before hitting the database. Signals are used to invalidate the cache. 5 7th May 2009, 7:36 am

ericflo’s django-tokyo-sessions. A Django sessions backend using Tokyo Cabinet, via Tokyo Tyrant and the PyTyrant library. A fast key/value store is a much better solution for sessions than a relational database. 4 7th May 2009, 7:30 am

hash_ring 1.2. A Python library for consistent hashing with memcached, using MD5 and the same algorithm as libketama. Exposes an interface that is identical to regular memcache making this a drop-in replacement. 5 5th May 2009, 1:45 pm

djangopeople.net on GitHub. I’ve released the source code for Django People, the geographical community site developed last year by myself and Natalie Downe (it hasn’t otherwise been touched since April last year, so it needs porting to Django 1.1). If you want a new feature on the site, implement it and I’ll see about merging it in. 8 4th May 2009, 6:12 pm

django-piston. Promising looking Django mini-framework for creating RESTful APIs, from the bitbucket team. Ticks all of Jacob’s boxes, even including built-in pluggable authentication support with HTTP Basic, Digest and OAuth out of the box. 0 30th April 2009, 7:55 pm

REST worst practices. Jacob Kaplan-Moss’ thoughts on the characteristics of a well designed Django REST API library, from November 2008. 0 30th April 2009, 7:53 pm

python-sqlparse (via) Python library for re-identing SQL statements. This could make debugging Django’s generated SQL a whole lot easier. You can try the library out using an App Engine hosted application (complete with an API). 0 28th April 2009, 8:25 pm

Haystack (via) A brand new modular search plugin for Django, by Daniel Lindsley. The interface is modelled after the Django ORM (complete with declarative classes for defining your search schema) and it ships with backends for both Solr and pure-python Whoosh, with more on the way. Excellent documentation. 1 17th April 2009, 9:53 pm

Reducing XSS by way of Automatic Context-Aware Escaping in Template Systems (via) The Google Online Security Blog reminds us that simply HTML-escaping everything isn’t enough—the type of escaping needed depends on the current markup context, for example variables inside JavaScript blocks should be escaped differently. Google’s open source Ctemplate library uses an HTML parser to keep track of the current context and apply the correct escaping function automatically. 0 14th April 2009, 9:26 am

django-shorturls. Jacob took my self-admittedly shonky shorter URL code and turned it in to a proper reusable Django application. 1 13th April 2009, 9:31 am

rev=canonical bookmarklet and designing shorter URLs

I’ve watched the proliferation of URL shortening services over the past year with a certain amount of dismay. I care about the health of the web and try to ensure that URLs I am responsible will last for as long as possible, and I think it’s very unlikely that all of these new services will still be around in twenty years time. Last month I suggested that the Internet Archive start mirroring redirect databases, and last week I was pleased to hear that Archiveteam, a different organisation, had already started crawling. [... 920 words]

Scaling Django web apps on Apache. Cool to see this kind of article cropping up on IBM developerWorks, but it’s a shame they don’t mention mod_wsgi. 1 10th April 2009, 9:23 am

How to use Django with Apache and mod_wsgi. My favourite deployment option is now included in the official Django docs, thanks to Alex Gaynor. I tend to run a stripped down Apache with mod_wsgi behind an nginx proxy, and have nginx serve static files directly. This avoids the need for a completely separate media server (although a separate media domain is still a good idea for better client-side performance). 9 1st April 2009, 12:24 am

Southerly Breezes. Andrew Godwin is slowly assimilating the best ideas from other Django migration systems in to South—the latest additions include ORM Freezing from Migratory and automatic change detection. Exciting stuff. 2 15th March 2009, 1:17 pm

django-gae2django. An implementation of the Google App Engine API (datastore, memcache, urlfetch, users and mail) that runs on Django, allowing you to take an existing application written for App Engine and deploy it on your own server on top of Django. 0 9th March 2009, 3:37 pm

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.” 3 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. 5 3rd March 2009, 3:03 pm

django-springsteen and Distributed Search. Will Larson’s Django search library currently just talks to Yahoo! BOSS, but is designed to be extensible for other external search services. Interestingly, it uses threads to fire off several HTTP requests in parallel from within the Django view. 0 25th February 2009, 10:28 pm

FAPWS3-0.2 (WSGI server based on libev). Another strong contender for Python’s answer to Mongrel—3500 requests/s for static files, 43 for a simple dynamic (Django powered) pages and 4.8 for a heavy SQL query—all benchmarked with 300 concurrent requests. 4 25th February 2009, 10:21 pm

DB2 support for Django is coming. From IBM, under the Apache 2.0 License. I’m not sure if this makes it hard to bundle it with the rest of Django, which uses the BSD license. 2 18th February 2009, 10:58 pm

Announcing django-viewtools. A really excellent idea—run ./manage.py viewtools --pdb /path/on/site/ to debug a view in your Django project that is raising an error using the Python debugger, or use --profile to run the full request cycle for that URL through the profiler. 1 17th February 2009, 9:35 pm

The Django and Ubuntu Intrepid Almanac. Will Larson’s impressively comprehensive guide to configuring and securing an Ubuntu VPS from scratch to run Django, using PostgreSQL and Apache/mod_wsgi behind nginx. 0 14th February 2009, 3:42 pm

EuroDjangoCon 2009. Tickets are now on sale for the conference, scheduled for 4th-6th of May (not March as I originally said) in Prague (followed by two days of development sprints). 1 12th February 2009, 4:59 pm

Django Settings Tip—Setting Relative Paths. This is the first thing I do in every single one of my Django projects—it makes projects relocatable to other machines with just a couple of lines of code. I wouldn’t be at all upset to see it added to the default Django settings.py file created by ./manage.py startproject 1 12th February 2009, 12:30 pm

solango. Another attempt at a Django/Solr integration library, based on code written for “a top 20 newspaper site” (I’d love to know which one). This is well documented, uses a registration model clearly inspired by the Django admin which keeps search related metadata out of your regular models and includes management commands for re-indexing and generating Solr schema.xml files. 1 4th February 2009, 12:22 pm

Infrastructure for Modern Web Sites. Leonard’s thoughts on what the next generation of web frameworks should aim to provide. 2 29th January 2009, 1:36 pm

Changeset 9793: SMTP testing documentation. I didn’t know this trick: running “python -m smtpd -n -c DebuggingServer localhost:1025” will start up a simple SMTP server which dumps received e-mails to the terminal instead of forwarding them on. 3 29th January 2009, 1:35 pm

EuroDjangoCon. 4th-6th of May 2009, in Prague. Talk submissions are open now, and registration starts on the 6th of February. 0 24th January 2009, 6:54 pm

Train Crash Leads LA Times to Create Django Database on Deadline. A story from last September. I didn’t know the LA Times used Django. UPDATE: Yes I did, I introduced their panel about it at DjangoCon. Sorry, mind like a sieve sometimes. 2 21st January 2009, 5:19 pm

What is django.contrib? I’d add that including a package in django.contrib is a promise that the core development team will ensure that package is updated to work with future versions of Django. 0 20th January 2009, 10:58 am

Washington Post Update. Peter Harkins summarises the large number of Django-powered database journalism projects released by the Post since September 2007. 1 16th January 2009, 12:18 pm

Django now has fast tests. Changeset 9756 switched Django’s TestCase class to running tests inside a transaction and rolling back at the end (instead of doing a full dump and reload). “Ellington’s test suite, which was taking around 1.5-2 hours to run on Postgres, has been reduced to 10 minutes.” 3 16th January 2009, 11:40 am

The Django Book: Version 2.0 (via) Adrian’s working on a new edition of the Django Book updated to cover version 1.0. As with the first edition, it will be available free online in addition to a published Apress paperback. The first three chapters are now available. 0 9th January 2009, 2:54 pm

Rate limiting with memcached

On Monday, several high profile “celebrity” Twitter accounts started spouting nonsense, the victims of stolen passwords. Wired has the full story—someone ran a dictionary attack against a Twitter staff member, discovered their password and used Twitter’s admin tools to reset the passwords on the accounts they wanted to steal. [... 910 words]

Represent. Andrei Scheinkman and Derek Willis describe how they built the NYTimes Represent feature using GeoDjango and PostGIS. 0 29th December 2008, 10:10 pm

Represent and GeoDjango. The NYTimes new Represent application is built on GeoDjango. 0 20th December 2008, 9:07 pm

Integrating Facebook Connect with Django in 15 minutes. Django authentication middleware that calls the Facebook REST API using a cookie set by Facebook Connect and checks if that person is your Facebook friend. Despite most of the magic happening on the server you still need Facebook’s JavaScript to set that cookie in the first place. 1 17th December 2008, 1:18 pm

ETags And Modification Times In Django. Part of Malcolm’s series of tutorials on implementing advanced HTTP concepts in Django. 0 13th December 2008, 9:49 am

Django 1.0.2 released. An update to last week’s 1.0.1 release, which I failed to link to. 1.0.2 mainly fixes some packaging issues, while 1.0.1 contains “over two hundred fixes to the original Django 1.0 codebase”. The team are holding up the promise to move to a regular release cycle after 1.0. 0 19th November 2008, 8:46 am

The new Lawrence.com. The world’s best local entertainment website, relaunched on Django 1.0 with an accompanying substantial redesign. 1 18th November 2008, 2:25 pm

Secrets of the Django ORM. An undocumented (and unsupported) method of poking a Django QuerySet’s internal query to add group_by and having clauses to a SQL query. 0 8th November 2008, 11:49 pm

What’s New in Python 2.6 (via) Python 2.6 final has been released (the last 2.x version before 3.0). multiprocessing and simplejson (as json) are now in the standard library, any backwards compatible 3.0 features have been added and the official docs are now powered by Sphinx (used by Django 1.0 as well). There’s plenty more. 10 2nd October 2008, 11:47 am

Using the New MySQL Query Profiler. Extremely powerful new feature in MySQL 5.0.37. Definitely something for the Django debug toolbar. 2 1st October 2008, 1:20 am

Decorator to limit request rates to individual views. Neat piece of code for public facing web APIs written in Django. Update: some smart criticisms in the comments. 2 24th September 2008, 1:13 pm

bpgsql. Barry Pederson’s pure Python PostgreSQL client library now ships with a Django backend. 0 23rd September 2008, 11:42 am

RestView—a class for creating a view that dispatches based on request.method (via) I finally got around to writing up a simple approach I’ve been using for REST-style view functions in Django that dispatch based on request.method. 1 21st September 2008, 8:47 pm

Introducing the Django Debug Toolbar. Another project inspired by DjangoCon: a component based debugging toolbar for Django. I like the architecture so far. 1 21st September 2008, 6:32 pm

Django version 1.1 roadmap. Django 1.1 is due out in March, but the deadline for feature proposals is November the 7th. 0 20th September 2008, 7:17 pm

Django’s release process. Django is moving to time-based releases, with minor releases (new features but no backwards incompatible changes) approximately every six months. 0 20th September 2008, 7:16 pm

DjangoCon and learning from Zope 2. Mark Ramm presented probably the most thought-provoking talk at DjangoCon. He’s started writing it up as a series of posts. 14 17th September 2008, 11:25 pm

YouTube Playlist: DjangoCon 2008 Sessions. YouTube’s tag and search indexes appear to lag behind the main site by quite a while; this appears to be the definitive index page for videos of talks at DjangoCon. 3 16th September 2008, 4:50 am

YouTube: djangocon tag. Google have started posting videos of presentations at DjangoCon on YouTube. 3 16th September 2008, 2:43 am

DjangoCon and PyCon UK

September is a big month for conferences. DjangoCon was a weekend ago in Mountain View (forcing me to miss both d.Construct and BarCamp Brighton), PyCon UK was this weekend in Birmingham, I’m writing this from @media Ajax and BarCamp London 5 is coming up over another weekend at the end of this month. As always, I’ve been posting details of upcoming talks and notes and materials from previous ones on my talks page. [... 446 words]

Kevin Teague explains the Python packaging ecosystem. The distinction between setuptools, PyPI, distutils, eggs, easy_install, pkg_resources and zc.buildout used to make my head spin. Kevin Teague’s outstanding explanation made it all make sense. 1 15th September 2008, 2:06 pm

django-batchadmin (via) Seriously classy reusable Django app that adds batch editing (multiple delete by default, with hooks to add your own custom batch actions) to the Django admin changelist screen, using best practice techniques of sub-classing ModelAdmin and hence requiring no patches to Django core itself. 0 15th September 2008, 10:46 am

Django snippets: Orderable inlines using drag and drop with jQuery UI. Code example from my PyCon tutorial on customising the Django admin interface. 3 13th September 2008, 12:19 pm

djangopony.com (via) “Magic that can’t be removed” 2 13th September 2008, 12:10 pm

The TimeToLead.eu technical stack: Django and Flex. Nice case study of a site using Django’s i18n support along with django-rosetta. 0 11th September 2008, 8:33 pm

Hugely informative thread on multi-db support in Django. I brain-dumped some ideas for a Django multi-database connection API on the developer list, and got a ton of smart push-back from people who’ve been there and have the scars to prove it. 0 10th September 2008, 11:31 pm

The web framework for ponies. At DjangoCon Cal Henderson suggested that Django should get a mascot with “magical powers”. Brian Veloso obliges. 1 9th September 2008, 11:59 pm

django-html. A small project I’m working on to make Django behave better with regards to HTML v.s. XHTML. 11 9th September 2008, 11:59 pm

Django snippets: server with debugging backdoor. Six lines of code that uses spawning to fire up a Django server on port 8000 and a remote interactive interpreter backdoor on port 8001, so you can interogate the state of your server within the same process. 0 8th September 2008, 10:15 pm

Django tickets with keyword “djangocon”. Adrian and Jacob ran an “I want a pony” session during their closing keynote at DjangoCon—I’ve filed the feature requests as tickets tagged with the “djangocon” keyword. 1 8th September 2008, 3:02 am

Think Wize crew celebrates the Django 1.0 release. With a trip to the Django Reinhardt museum at his birthplace in the village of Liberchies, Belgium. 0 5th September 2008, 1:55 pm

Django 1.0 release notes. What’s new in Django 1.0. Short answer: one heck of a lot. 0 4th September 2008, 1:10 am

Django 1.0 released! Outstanding. Massive thanks to everyone who contributed. We made it! 0 4th September 2008, 1:08 am

Low level hooks for multi-database support in Django. As discussed in this sub-thread on reddit: The internal Django Query class has a ’connection’ attribute which can be set by the constructor. This low level hook is the secret to talking to more than one database at once, but higher level APIs have not yet been defined. Jacob Kaplan-Moss: “As a matter of fact, at least a couple high-traffic Django sites are using the new hooks.” 3 3rd September 2008, 11:33 pm

dmigrations thread on Django Nashville. The Django Nashville Google Group is currently hosting the most interesting discussion of dmigrations. 0 3rd September 2008, 10:36 pm

Announcing dmigrations

The team at Global Radio (formerly GCap Media) is the largest group of Django developers I’ve personally worked with, consisting of 14 developers split into two scrum teams, all contributing to the same overall codebase. [... 625 words]

Django: Security fix released. The Django admin used to save partially-submitted forms if your session expired, and continue the submission when you logged in. It turns out that’s actually an unblockable CSRF exploit and is hence broken as designed, so it’s now been removed. Thanks Ed Eliot and other GCap colleagues for helping me flesh out the potential attack. 8 3rd September 2008, 12:14 am

Capital Radio (the new site). Launched today, this is the Django-powered project I’ve been working on with the fantastic team at GCap. 0 28th August 2008, 2:47 pm

Using Akismet with Django’s new comments framework. A nice example that demonstrates two features that were recently rolled in to the Django 1.0 betas: the new signals library and the new comments framework. 1 28th August 2008, 10:12 am

Django snippets: Sign a string using SHA1, then shrink it using url-safe base65. I needed a way to create tamper-proof URLs and cookies by signing them, but didn’t want the overhead of a full 40 character SHA1 hash. After some experimentation, it turns out you can knock a 40 char hash down to 27 characters by encoding it using a custom base65 encoding which only uses URL-safe characters. 6 27th August 2008, 10:18 pm

Django 1.0 beta 2 released! 1.0 draws ever closer. Important new features include major documentation and comment system refactorings, plus the removal of a bunch of deprecated code (including oldforms). Feature and string freezes are now in place, so it’s just bugs and documentation improvements between now and the final release. 0 27th August 2008, 2:41 pm

Django 1.0 release party. The big ass-party will be at the Tied House in Mountain View on Saturday the 6th from 7pm. RSVP on the linked announcement. 3 27th August 2008, 12:07 pm

Django documentation (for 1.0). The documentation refactor is in: the docs for the upcoming 1.0 release have been tidied up, rearranged and ported to a new documentation system based on Sphinx (the Python documentation toolkit, NOT the full-text search engine). The URL has also changed to docs.djangoproject.com. 10 24th August 2008, 10:49 am

The Python Property Builtin. The always-educational Adam Gomaa explains the Python property built-in and shows how it can be used to improve Django’s model-based URL generation. 0 23rd August 2008, 1:08 pm

django-timezones. Models, form fields and a template filter for dealing with timezones in Django. 1 21st August 2008, 11:18 pm

Persistent Django on Amazon EC2 and EBS—the easy way. Useful tutorial on getting Django up and running on EC2 with EBS for a persistent PostgreSQL database. 1 21st August 2008, 9:32 pm

Cyberstar. Adrian made the front cover of the Chicago Tribune magazine! 1 18th August 2008, 11:56 pm

minidetector. Neat piece of Django middleware that adds a “mobile = True” attribute to the request object if the request’s user-agent matches a list of strings of known low-power browsers in mobiles, PDAs or game consoles. 1 15th August 2008, 8:21 am

This Week in Django. After 33 episodes Django’s usually-weekly podcast finally has its own website. 0 14th August 2008, 2:57 pm

Django snippets: RequestFactory. I’ve been wanting this for ages; when I finally got around to writing it it turned out to only be a dozen or so lines of code. Makes it easy to create mock request objects in Django, which you can then use for testing view functions directly (bypassing the current test client mechanism which requires views to be assigned to a URLconf before they can be tested). 1 12th August 2008, 12:40 pm

Changeset 8266—Added ModelAdmin.save_model() and ModelAdmin.save_formset() methods. One of those small changes that opens up enormous possibilities—it’s now incredibly easy to customise exactly how a model is saved in the Django admin interface by over-riding the save_model method. 1 10th August 2008, 1:17 pm

Django 1.0 alpha 2 release notes (via) The last preview release before the 1.0 beta. Big new features are GeoDjango, pluggable file storage (which went in earlier today) and Jython compatibility. The beta is scheduled for August 14th. 0 8th August 2008, 11:57 pm

South. A brand new light-weight Django migrations tool from Andrew Godwin. On first glance, this is spookily similar to the system we’ve been putting together at GCap. 2 8th August 2008, 11:42 am

GeoDjango Documentation. Merged to Django trunk a few hours ago. The tutorial isn’t there yet, but the rest of the docs are worth exploring. 1 5th August 2008, 11:06 pm

Changeset 8162. “Implemented a secure password reset form that uses a token and prompts user for new password”—also sneaks base36 encoding and decoding in to Django. 3 31st July 2008, 10:54 pm

Super User Conditional Page Exception Reporting. The name is almost as long as the code snippet: this serves Django’s debug page to logged in super-users, falling back to the default 500 template for everyone else. 0 31st July 2008, 9:06 pm

Spawning + Django. The latest version of Spawning (a fast Python web server built on top of the Eventlet non-blocking coroutine networking library) can run Django applications out of the box, using threads and processes to work around the blocking nature of the ORM’s database drivers. Eric Florenzano reports better performance than Apache and mod_wsgi, and is now hosting his site on it. 2 31st July 2008, 10:56 am

DjangoCon & Django 1.0 updates. DjangoCon tickets will be released in two batches of 100. The first set will be available at 12 noon UTC on Thursday July 31st; the second set will be released at 6pm UTC on Friday August 1st. 0 30th July 2008, 10:25 am

Extra fields on many-to-many relationships (via) Checked in just over an hour ago, Django now lets you specify a custom “through” table for a ManyToManyField. Great work by Eric Florenzano. 0 29th July 2008, 1:58 pm

FLOSS Weekly 34: Django. Randal Schwartz interviewed Jacob Kaplan-Moss at OSCON for the consistently excellent FLOSS Weekly podcast. 2 27th July 2008, 9:47 am

Dojango version 0.3 released. A reusable Django application that provides Dojo, helper functions (dojo.data integration) and tools for switching between Dojo versions. 1 24th July 2008, 12:47 am

Python BoF and Django Drinkup (via) At OSCON? Come along to the Jax Bar tonight (Tuesday 22nd) from 7pm to 10pm to hang out with fellow Pythoneers and Djangonaughts. 0 22nd July 2008, 6:48 pm

Replacing Django’s Template Language With Jinja2. Part of Wil Larson’s series on taking advantage of Django’s loose coupling. 0 22nd July 2008, 5:18 pm

ComicVine.com. Also powered by Django, Whiskey Media’s comic book encyclopedia and community. 43,000 characters and 94,000 issues and counting. 2 22nd July 2008, 7:12 am

GiantBomb.com. Launched today, powered by Django—a combination of (mostly ex-Gamespot) quality editorial content and a massive structured wiki of every computer game ever released. This is going to be a lot of fun—all of the crazy detailed content that Wikipedia tends to reject. 2 22nd July 2008, 7:09 am

Django 1.0 alpha release notes. The big features are newforms-admin, unicode everywhere, the queryset-refactor ORM improvements and auto-escaping in templates. 0 22nd July 2008, 6:04 am

Django 1.0 alpha released! Not meant for production use, but a pretty solid preview of what’s coming in 1.0 proper. The beta is scheduled for August 5th. 0 22nd July 2008, 6:01 am

newforms-admin branch has been merged into trunk. Congrats to Brian Rosner for the merge. django.newforms has been renamed to django.forms as well—1.0 grows ever closer. 0 20th July 2008, 11:17 pm

DjangoCon 2008. The official DjangoCon site is up, along with a mostly complete schedule. 0 20th July 2008, 8:49 pm

Jinja2 Final aka Jinjavitus Released. The Jinja template engine now has auto-escaping as an optional feature, disabled by default. Worth considering as an almost drop-in replacement for Django’s template language if features such as macros and compilation to Python code appeal to you. 2 19th July 2008, 11:52 pm

DjangoCon 2008. Venue: Gooleplex, San Francisco Bay Area. Dates: 6th and 7th Sept. Official post will be on djangoproject.com soon.

Robert Lofthouse 2 13th July 2008, 4:50 pm

It looks like the first ever Django conference will take place in early September in the San Francisco bay area.

Me, on Twitter 5 7th July 2008, 5:14 pm

Django Unit Tests and Transactions. If you’re using a transactional database engine (MySQL with InnoDB, Postgres or SQLite) you can speed things up by running each of your unit tests inside a transaction and rolling back in tearDown(). 0 7th July 2008, 2:14 pm

Django File Uploads (via) Nearly two years in the making, Django’s file upload capacity has received a major (and backwards incompatible) upgrade. Previously, files were uploaded by default in to RAM—now, files larger than 2.5MB are streamed to a temporary file and extensive hooks are provided to customise where they end up—streaming to S3, for example. 8 1st July 2008, 5 pm

Graphite. Real-time graphing package for server monitoring, similar to RRDTool. Created by the team at Orbitz, using Django and ExtJS for the frontend and Cairo to generate the graphs. 0 28th June 2008, 11:53 pm

CookBookNewFormsFieldOrdering. Handy tip—change the order of fields in a Django newforms instance by over-riding form.fields.keyOrder (since fields is a SortedDict). 3 27th June 2008, 1:02 am

mod_rpaf for Apache. A more secure alternative to Django’s equivalent middleware: sets the REMOTE_ADDR of incoming requests from whitelisted load balancers to the X-Forwarded-For header, without any risk that if the load balancers are missing attackers could abuse it to spoof their IP addresses. 0 24th June 2008, 5:02 pm

Django snippets: Command to dump data as a python script. Extremely useful—dumps the data for an application as an executable Python script which will re-import it in to another database without any risk of colliding with existing IDs, sorting out foreign keys along the way. 1 24th June 2008, 12:07 pm

The basics of creating a tumblelog with Django (via) Ryan Berg suggests having a StreamItem model that links uses a GenericForeignKey to link to other content types, then using signals to cause a StreamItem to be created for every other model type. I should switch to doing that on this blog: at the moment I have to query three separate tables to build the tumblelog part which results in messy code for ordering and pagination. 3 24th June 2008, 11:09 am

What is it like to write a technical book? Plenty of food for thought from the lead author of the new edition of High Performance MySQL. It’s amazing how Word is still an integral part of most technical book projects despite its obvious inadequacies compared to a toolchain based on plain text files and Subversion (the Django Book used ReST and Subversion to great effect). 9 20th June 2008, 8:18 am

PortingDjangoTo3k. Martin von Loewis has started assembling a patch. His write-up illustrates some key differences between Python 2.X and Python 3—it looks like Django’s unicode handling is going to require the most work. 4 19th June 2008, 5:53 pm

New foundation for Django. Django now has its own nonprofit software foundation (courtesy of a bunch of tough paperwork by Jacob Kaplan-Moss), and fittingly the Lawrence-Journal World get the exclusive. 0 17th June 2008, 5:16 pm

DebugFooter middleware with Pygments sql syntax highlighting. Andreas Marr has enhanced my Django DebugFooter middleware with proper syntax highlighting for the logged SQL. 2 14th June 2008, 10:04 am

Censoring the Internet at Paraguay. The state owned telecommunication company DNS hijacked the opposition party’s domain to point at a porn site during the election back in April. Maybe we don’t want a django.py vanity domain after all... 2 13th June 2008, 3:24 pm

RFC: Django 1.0 roadmap and timeline. Jacob’s proposed target is “early September” for the final 1.0 release. 0 12th June 2008, 10:34 am

Shortcutting render_to_response. I tend to use a simple wrapper function, but the other options described here are worth exploring. This is why I’m so keen on Django’s “take a request object, return a response object” philosophy—it makes it trivial to extend the framework in the direction you want. 0 10th June 2008, 11:49 am

Debugging Django, a slidecast. I used SlideShare’s slidecast tool for the first time to synchronize audio of my Django London User Group talk with the slides. The talk included several live demos which aren’t represented in the slides so it’s a bit piecemeal in places. 0 25th May 2008, 2:47 pm

modswgi: Debugging Techniques. mod_wsgi is excellent software, and the documentation is equally superb. I used these instructions recently to run the Python debugger inside a running instance of Apache, which helped my track down some import errors that weren’t occurring with Django’s development server. 0 25th May 2008, 1:34 pm

On-board vs. Off-board Comet. Useful distinction. On-board comet runs on the same server as the rest of your application; Off-board comet is served from a separate server (generally a subdomain) and a separate stack. If you want to stick with PHP, Rails or Django for the rest of your site off-board comet looks like the way to go. 2 22nd May 2008, 5:02 pm

Debugging Django

I gave a talk on Debugging Django applications at Monday’s inaugural meeting of DJUGL, the London Django Users Group. I wanted to talk about something that wasn’t particularly well documented elsewhere, so I pitched the talk as “Bug Driven Development”—what happens when Test Driven Development goes the way of this unfortunate pony. The slides [... 1759 words]

Django: security fix released. XSS hole in the Admin application’s login page—updates and patches are available for trunk, 0.96, 0.95 and 0.91. 0 14th May 2008, 7:49 am

Django admin OmniGraffle stencil. Alex Lee put together a beautiful stencil for OmniGraffle containing all of the common UI elements seen in the Django admin interface, as a tool for wireframing. 1 13th May 2008, 5:58 pm

django-db-log. Middleware that logs Django exceptions to the database, using a clever scheme based on an MD5 of the traceback text to group duplicate errors in to batches. 1 13th May 2008, 8:07 am

Byteflow Blog Engine. This looks like the most full-featured of the Django blog engines by a pretty big margin, including OpenID client and server support. A product of the growing Russian/Ukrainian Django community. 8 11th May 2008, 7:41 pm

Django Users Group London meetup, 19th of May. The inaugural meeting of DJUGL will be on the 19th of May at the Capital Radio building in Leicester Square, sponsored by GCap Media. Three presentations starting at 7pm (I’ll be giving one of them), then on to the pub. Sign up on EventWax; there are only 70 places. 0 2nd May 2008, 12:19 pm

jQuery style chaining with the Django ORM

Django’s ORM is, in my opinion, the unsung gem of the framework. For the subset of SQL that’s used in most web applications it’s very hard to beat. It’s a beautiful piece of API design, and I tip my hat to the people who designed and built it. [... 820 words]

QuerysetRefactorBranch. What’s new and changed now that queryset-refactor has merged to trunk. 1 27th April 2008, 7:34 am

Queryset-refactor branch has been merged into trunk. Malcolm’s latest Django masterpiece is complete. 0 27th April 2008, 7:21 am

Multiple inheritance of newforms and modelforms. If you ever see “Error when calling the metaclass bases metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases” when trying multiple inheritance with newforms and modelforms, here’s a scary solution I found. 0 12th April 2008, 12:54 pm

Sharedance (via) “Sharedance is a high-performance server that centralize ephemeral key/data pairs on remote hosts, without the overhead and the complexity of an SQL database.”—ideally suited to session data, which is a poor fit for a full relational database. 3 12th April 2008, 10:39 am

Active on IRC in the past hour. New Django People feature in collaboration with Brian Rosner—DjangoBot now provides information on currently active IRC participants. There’s an opt-out privacy control and the bot sends you a message about it the first time it logs your activity. 6 12th April 2008, 12:58 am

django-rosetta—Google Code. Very classy Django-powered interface for both reading and writing your project’s gettext catalog files, hence allowing application translators to work through a web interface. 0 11th April 2008, 7:31 am

Google App Engine for developers. Best in-depth coverage so far, from Niall Kennedy. I didn’t know that Guido had worked on the Django compatibility layer. 4 10th April 2008, 11:14 pm

The Google App Engine model class, db.Model, is not the same as the model class used by Django. As a result, you cannot directly use the Django forms framework with Google App Engine. However, Google App Engine includes a module, db.djangoforms, which casts between the datastore models used with Google App Engine and the Django models specification. In most cases, you can use db.djangoforms.ModelForm in the same manner as the Django framework.

Google App Engine docs 2 8th April 2008, 1:48 pm

Running Django on Google App Engine. Django 0.96 is included, but you need to disable the ORM related parts and use the Google App Engine Bigtable interface instead. 4 8th April 2008, 1:15 pm

Why the webstandards world appears to be choosing Django. I’m not convinced that this is a definite trend, but it certainly makes for an interesting discussion. 0 4th April 2008, 8:33 am

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. 1 31st March 2008, 1:19 pm

Exposing calendar events using iCalendar in Django. A simple abstraction around the vobject Python library. 0 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. 4 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. 0 26th March 2008, 2:42 pm

FormWizard: multiple-step forms in Django. Available in recent trunk versions. 0 26th March 2008, 1:23 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. 6 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. 0 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. 0 22nd March 2008, 7:23 pm

wikinear.com, OAuth and Fire Eagle

I’m pleased to announce wikinear.com. It’s a simple site that does just one thing: show you a list of the five Wikipedia pages that are geographically closest to your current location. It’s designed (or not-designed) to be used mainly from mobile phones. [... 1147 words]

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. 0 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. 2 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. 0 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. 0 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. 1 19th March 2008, 9:43 am

Integrating reCAPTCHA with Django. Looks pretty straight forward. 0 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. 0 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. 0 5th March 2008, 12:03 am

queryset-refactor changeset 7126. Malcolm just checked model inheritance in to the queryset-refactor branch, with full documentation and unit tests. People have been requesting this for ages. 5 18th February 2008, 9:46 am

themaneater.com Launch. The Maneater’s online edition is where Adrian cut his web development teeth, so it’s great to see them up and running on Django. Important to note that KeepAlive can completely murder Apache/Django performance. 1 10th February 2008, 8:10 am

mydeco. Major new Django-powered start-up has launched, based in London. 1 8th February 2008, 11:43 am

Django San Diego. A real-life meeting of Django developers in San Diego, as a direct result of profiles on djangopeople.net. Victory! 1 8th February 2008, 10:20 am

Python Web Framework on the JVM. An update on both Jython and the Django on Jython project—it looks like Jython 2.5 isn’t that far away. 0 30th January 2008, 2:06 am

Linkherd—django. Linkherd is a Django-powered startup that offers sub-reddit style functionality. I’ve set up a Django site there as well. 2 26th January 2008, 11:58 pm

Django sub-reddit. Reddit are trialling the ability to create custom sub-reddits, so I put one up for Django links and discussions. 0 26th January 2008, 11:56 pm

Community sites on Django People. Small new feature: I can now add community sites to individual country pages. If you know of any regional community sites that I’ve missed, let me know in a comment or by e-mail. 11 25th January 2008, 12:40 am

Django People: OpenID and microformats

In hindsight, it was a mistake to launch Django People without support for OpenID. It was on the original feature list, but in the end I decided to cut any feature that wasn’t completely essential in order to get the site launched before it drowned in an ocean of “wouldn’t-it-be-cool-ifs”. [... 626 words]

Introducing EveryBlock. EveryBlock launched! Adrian Holovaty, Wilson Miner, Paul Smith and Daniel X. O’Neil’s startup which answers the question, “What’s happening in my neighborhood?” Cities covered by the launch are Chicago, New York and San Francisco. 0 23rd January 2008, 9:56 pm

Django People: Colophon. I’ve added a colophon to Django People, something I try to do for all of my personal projects. 2 23rd January 2008, 4:58 pm

Caching Layer for Django ORM. Interesting extension to Django’s ORM that adds automatic caching of querysets and smart cache invalidation. 0 23rd January 2008, 3:18 pm

GeoNames: missing countries. United Arab Emirates and a few other countries are missing from the GeoNames XML set I used to seed Django People. I’ve added UAE by hand; I’ll add the others as soon as I have time. 0 23rd January 2008, 10:45 am

Django People

I’m constantly surprised by the number of people I run in to at conferences (or even in one case on the train) who are using Django but are completely invisible to the Django community. It seems that this is the downside of having good documentation: many people just read it and start building, without ever showing their face on the mailing lists or IRC. [... 194 words]

World’s ugliest Django app. Brilliant hack from Paul Bissex: a self-contained Django application in 70 lines of code which shows off some internals trickery and makes use of a bunch of handy django.contrib packages. 0 22nd January 2008, 1:34 am

Django at PyCon. Unfortunately I’ll be missing US PyCon this year (I’ll be at SxSW and Webstock in New Zealand though)—but it’s great to see that there’s a strong line-up of Django related presentations. 1 21st January 2008, 9:54 pm

django-evserver. Marek Majkowski got Comet working with Django using a custom WSGI server that wraps libevent using ctypes. 0 19th January 2008, 12:15 pm

Django Developer Jobs. Just an observation: the Django job market is booming at the moment, with 16 new job ads posted so far this year (that’s nearly one a day). If you want to be paid money to develop in Django there’s never been a better time. 4 18th January 2008, 3:51 pm

Django snippets: “for” template tag with support for “else” if array is empty. A neat solution to a common pattern; I’d personally like to see this included in Django proper. 8 16th January 2008, 9:42 pm

A little something I’ve been working on. Paul Bissex has been working on a Django book with Jeff Forcier and Wesley Chun, to be published by Prentice Hall. It sounds like they’re a good way along the process. 2 14th January 2008, 10:47 pm

Good architectural layering, and Bzr 1.1. Mark Shuttleworth on the growing importance of plug-in architectures as an open source project evolves, as they allow new developers to release their own components without needing commit access to the project. Django is pretty good for this, but more hooks (and a faster event dispatch system) would be useful. 0 9th January 2008, 2:06 pm

Job: Django developer in London. I’m consulting with GCap Media at the moment, who are looking to hire full-time Django developers in London for some really interesting projects. Please feel free to contact me directly with questions. 1 7th January 2008, 9:37 pm

Announcing StaticGenerator for Django. Simple but powerful static file generator for Django applications—just tell it about your model instances and it will create an entire static site based on calling get_absolute_url() on each one. Uses signals to repopulate the cache when a model changes. 0 7th January 2008, 9:26 pm

Google apps for your newsroom. How the LJ World team use online tools like Google Spreadsheet, Swivel, ManyEyes and Google MyMaps to collaborate with the newsroom and build data-heavy applications even faster. 0 7th January 2008, 9:24 pm

FUD and TurboGears. Not cool: the TurboGears guys have been targeted by some (hopefully not deliberate) FUD along the lines of “the author of the TurboGears book is using Django now”, based on Mark posting about his research in to other frameworks. 2 7th January 2008, 9:02 am

Django Tip: Complex Forms. Malcolm demonstrates some advanced tricks with newforms. 0 6th January 2008, 10:14 pm

Filtering foreign key choices in newforms-admin. A nice introduction to the Django newform-admin branch, including an example of how to easily implement row-level permissions. 0 6th January 2008, 8:31 pm

Django on Jython (via) Outstanding work from Jim Baker and the Jython team: Django now runs on the modern branch of Jython, with a couple of patches and some failed doctests due to dictionary order (a problem with Django’s test suite). 9 4th January 2008, 12:35 pm

Chatting with Adrian Holovaty. Fabio Akita interviews Adrian about Django and related topics. 0 1st January 2008, 11:44 am

This Week in Django podcast. Michael Trier’s been doing a really fantastic job putting together a Django podcast. The most recent episode (number 4) includes an update on the newforms-admin branch and a couple of handy tips. 0 1st January 2008, 10:44 am

django-mptt (via) Jonathan Buchanan’s simple utility for performing Modified Preorder Tree Traversal (efficient tree operations in SQL) on Django models. 0 29th December 2007, 11:33 am

Django and Comet. How to build a chat application using Django and the Orbited comet server. Orbited can be set up to proxy most requests through to a Django backend while handling any comet requests itself. 0 26th December 2007, 9:05 pm

WebOb. WebOb is “an extraction and refinement of pieces from Paste”—provides a very nice request and response object, clearly inspired partly by Django. The documentation includes the differences between the WebOb API and that of other frameworks. 1 23rd December 2007, 10:22 am

Using Unipath to Keep Things Portable. Django tip to avoid hard-coding full paths. I usually set a global called OUR_ROOT in settings.py using os.path.dirname(__file__) and use os.path.join with it to construct any other paths that I need. 5 21st December 2007, 10:45 am

Frameworks Exist for Conceptual Integrity. Adam Gomaa just taught me a bunch of interesting things about Django’s underlying philosophy. Looks like I need to re-read the Mythical Man-Month. 0 17th December 2007, 1:58 pm

Chapter 7: Form Processing. The chapter on newforms I contributed to “The Definitive Guide to Django” is now online, along with the rest of the published book. 0 16th December 2007, 9:44 pm

Two-Faced Django. Excellent Django tutorial by Will Larson that shows how to build a polling application with an interface both on the Web and in Facebook. Also touches on unit testing and Ajax using jQuery. 0 14th December 2007, 2:44 pm

“The Definitive Guide to Django” is now shipping from Amazon. The book looks absolutely fantastic (bias disclosure: I contributed the newforms chapter)—huge congratulations to Adrian and Jacob. 6 11th December 2007, 9:12 pm

Updates to template_utils. James Bennett’s Django template_utils library now provides tags for consuming external RSS and Atom feeds. Combine with template fragment caching for an instant mashup written just using templates. 0 10th December 2007, 3:25 pm

Django snippets: Authenticate against Active Directory. Uses a custom authentication backend with the Python ldap module. If Django hasn’t seen the user before a new Django user account is created with data from ldap. 0 10th December 2007, 8:40 am

Blogmaker, a free blogging app for Django (via) “Blogmaker is a full-featured, production-quality blogging application for Django. It supports trackbacks, ping and comments with moderation and honeypot spam prevention.” 1 7th December 2007, 1:04 am

Django Basic Apps. Nathan Borror has released a suite of simple, reusable Django applications: Basic Blog, Basic Places, Basic People, Basic Library and Basic Profiles. 0 5th December 2007, 3:30 pm

If you only remember one thing about handling non-HTML output via Django: know that you can use the HttpResponse object as if it were a file. Writing to such an object and returning it will give you the output you wrote. It’s a very simple concept, but one that translates well to third-party libraries.

Alex de Landgraaf 0 3rd December 2007, 8:44 pm

First Notes on Django. Cool, the IETF are developing internal tools with Django. 0 3rd December 2007, 11:38 am

Why the h can’t Rails escape HTML automatically? It would be a pretty huge change, but auto-escaping in Rails 2.0 could close up a lot of accidental XSS holes. 8 1st December 2007, 8:34 pm

sorl-thumbnail. This looks like a decent attempt at a generic Django thumbnailing service, but I’m always wary of code that allows URL hackers to create large numbers of files that will be cached to disk. UPDATE: My mistake, thumbnail creation can only be caused by template authors. 5 27th November 2007, 7:17 pm

Using django.newforms with Pylons. It’s always good to see Django components used outside of the framework itself. For the record, you can avoid the DJANGO_SETTINGS_MODULE environment variable entirely using django.conf.settings.configure (search for it). 0 27th November 2007, 3:01 pm

Newforms, part 1. James Bennett provides a detailed description of Django’s newforms (not so new now though, they’ve been around for over a year), complete with attractive diagrams. 0 23rd November 2007, 11:54 pm

Django Evolution. Really smart take on the problem of updating database tables to reflect changes to Django models. Code that automatically modifies your database tables can be pretty scary, but Evolution seems to hit the right balance. 0 23rd November 2007, 11:49 pm

Professional Python Frameworks: Web 2.0 Programming with Django and Turbogears. Apparently published by Wrox in October 2007, beating the “official” Django book by just over a month. Has anyone seen this on bookshelves yet? 5 16th November 2007, 9:16 pm

Django Changeset 6671. Malcolm Tredinnick: “Implemented auto-escaping of variable output in templates”. Fantastic—Django now has protection against accidental XSS holes, turned on by default. 6 14th November 2007, 5:05 pm

Django Book Update. It’s done! Went to the printer on Friday, due in bookstores in the second week of December (just in time for Christmas). Congrats to Adrian and Jacob. 0 14th November 2007, 12:59 am

Django documentation bookmarklets. James Bennett continues his month-long series of daily Django tutorials with documentation for one of Django’s best kept secrets: application introspection HTTP headers and bookmarklets that make use of them. 0 8th November 2007, 10:59 am

Hello Revver.com 2.0. Revver, one of the more established video startups, have launched their new version which is powered by Django. 0 2nd November 2007, 7:03 am

Django security fix released. Django’s internationalisation system has a denial of service hole in it; you’re vulnerable if you are using the i18n middleware. Fixes have been made available for trunk, 0.96, 0.95 and 0.91. 0 26th October 2007, 9:47 pm

Using the extra() QuerySet modifier in Django for WeGoEat. You can use select() on a QuerySet to obtain extra values using subqueries. 0 24th October 2007, 7:28 pm

ASP.NET MVC Framework. This looks pretty good. It includes clean URL support that’s very similar to how Django does things (with a nice alternative syntax for developers who don’t like regular expressions). 1 22nd October 2007, 1:45 pm

Django may be built for the Web, but CouchDB is built of the Web. I’ve never seen software that so completely embraces the philosophies behind HTTP. CouchDB makes Django look old-school in the same way that Django makes ASP look outdated.

Jacob Kaplan-Moss 0 20th October 2007, 1:46 pm

LastGraph. Now Available. Andrew Godwin has relaunched his LastGraph Last.fm graphing application. The new version is built on Django and S3 and uses Andrew’s Graphication graphing library based on Cairo. 0 15th October 2007, 10:02 pm

Two Weeks With Django. A Rails developer tries Django but ends up switching back to Rails. I think we could definitely take some steps towards making the initial user experience a bit smoother—currently you have to decide things like how you’ll serve static files and where you’ll keep your templates. Once you’ve got that lot set up it’s mostly plain sailing but it does mean there’s a bit of a bump in the learning curve. 14 15th October 2007, 9:51 pm

Two months with Ruby on Rails. Good rant—covers both the good and the bad. The first complaint is the lack of XSS protection by default in the template language. Django has the same problem, but the solution was 90% there when I saw Malcolm at OSCON. 5 9th October 2007, 12:23 pm

tranquil. Inspired take on the Django ORM to SQLAlchemy problem: lets you define your models with the Django ORM but use SQLAlchemy to run queries against them. 0 9th October 2007, 2:30 am

DbMigration—a schema migration tool for Django. Nice and simple tool for adding schema migrations to a Django application. 0 27th September 2007, 3:04 pm

djangogigs.com—from idea to release in 6 hours. Now that’s what I call rapid development. 2 26th September 2007, 4:53 pm

Django GridContainer. Media Temple’s virtualized Django hosting is now accepting applications for beta testers. 0 22nd September 2007, 12:01 pm

Zope3 for Djangoers. I prefer “Djangonauts”, personally. Useful overview of Zope 3 for people with Django experience (first of a multi-part series). 0 14th September 2007, 3:20 pm

Restructured Text to Anything. Slick set of online tools for converting Restructured Text (one of the more mature wiki-style markup languages) to HTML or PDF. Includes a nice looking API. Powered by Django. 3 13th September 2007, 3:54 pm

django-sphinx (via) More code from Curse Gaming; this time a really nice API for adding Sphinx full-text search to a Django model. 1 9th September 2007, 12:35 am

Advanced Django. Slides from my hour long tutorial at PyCon UK this morning. Most of the material was adapted from OSCON, but I also added a new section covering newforms. 3 8th September 2007, 1 pm

Django on Jython: What I’ve done until now. It’s not quite there yet (the new Jython is Python 2.2 with a few 2.3 features; Django requires 2.3 at least) but it’s looking pretty promising. 0 4th September 2007, 2:53 am

Django vs feedparser on dates. Some useful tips in the comments. I find Python’s timezone stuff endlessly frustrating: I know it can do what I want, but it always takes me a ridiculously long time to figure out the necessary incantations. 0 2nd September 2007, 10:17 am

A Django Cache Status. Django view to display stats pulled from your memcached server. 0 25th August 2007, 2:08 pm

Satchmo 0.5 Release. Django powered e-commerce application, “the webshop for perfectionists with deadlines”. 1 22nd August 2007, 10:36 pm

Django and the iPhone tutorial. How to install SSH, Python and Django on your iPhone and get Django running against the call database. Less complicated than I expected. 0 21st August 2007, 11:34 am

BabelDjango. Tools for integrating Christopher Lenz’s Babel i18n framework with Django. 0 20th August 2007, 2:59 pm

Django on the iPhone. Jacob got it working. The next image in his photostream shows the Django admin application querying his phone’s local database of calls. 0 19th August 2007, 7:58 am

Changeset 5925. You can now register custom commands for your application with Django’s manage.py script. More sensible than littering your application’s root directory with shell scripts. 2 18th August 2007, 11:06 am

AuditTrail. Add change tracking and history to a Django model with a single line of code. Doesn’t handle relationships though, which is definitely the toughest part of this problem. 0 15th August 2007, 1 pm

Finding Lookup Items that Are Not Used. How to do left outer joins (and other custom SQL) using the Django ORM. 0 13th August 2007, 5:08 pm

Ubuntu -- python-django. Sweet, Django 0.96 is packaged for Ubuntu Gutsy. 3 11th August 2007, 8:47 am

Inline images are stored as data URI:s in the intermediate format (and usually also in the source documents), but since not all browsers support this format, the renderer replaces the data URI:s with HTTP pointers to an image cache directory.

Fredrik Lundh 0 7th August 2007, 10:52 am

A nice example of when to use reduce in python. As a shortcut for assembling a large OR query using the Django ORM. 1 2nd August 2007, 11:51 pm

Django, iCal and vObject. Easy iCal generation for Django using vObject. 0 1st August 2007, 11:09 am

Java’s Fear of Commitment (via) How Java culture emphasises interfaces and layers of abstraction over solving problems directly. 0 1st August 2007, 10:32 am

Django weekly roundup: July 30. Every active open source project needs something like this. 1 30th July 2007, 5:03 pm

mod_wsgi 1.0 Release Candiate Available. mod_wsgi is shaping up to be an excellent alternative to mod_python. 0 26th July 2007, 8:21 pm

Instant Django. Portable Django environment for Windows, no installation required. Can also be run from a USB thumb drive. 0 24th July 2007, 6:49 pm

Django Master Class. Notes and slides from the OSCON tutorial I gave yesterday with Jacob Kaplan-Moss and Jeremy Dunck. 4 24th July 2007, 3:20 pm

Undelete in Django. Inspired by the conversation about undo the other day, Nathan Ostgard created a simple solution based around custom managers and a trashed_at model field. 1 20th July 2007, 6:54 pm

Seasoning Templates. “Designing a template language is a lot like seasoning a dish; there’s a whole range of tastes out there.” 0 19th July 2007, 6:04 pm

Logic in Templates. I don’t think it would hurt Django to have a bit more support for conditional logic in templates, but I wouldn’t go as far as supporting the ability to call Python functions directly. 7 19th July 2007, 8:35 am

A Recipe for OpenID-Enabling Your Site. Detailed guide to setting your site up as an OpenID consumer from Plaxo, who just launched their OpenID implementation. It basically describes the design I’m using for the next release of django-openid. 3 18th July 2007, 7:50 am

Never use a warning when you mean undo. The abundance of “undo” is one of my favourite things about Gmail. I wonder if there’s anything Django could do to make implementing undo functionality easier... 15 17th July 2007, 11 am

A great two years. The first public release of Django was tagged in Subversion two years ago today. 1 15th July 2007, 9:53 pm

Partial OpenID provider implementation from idproxy.net. It’ll take a while to package up provider support for django-openid, but in the meantime here’s some partial, incomplete, poorly documented example code ripped from idproxy.net. Hopefully this will give people trying to figure out the JanRain Python library a bit of a leg up. 2 12th July 2007, 6:48 pm

PyCon UK 2007. The weekend of the 8th and 9th of September, currently accepting talk submissions. I’ll be running a Django tutorial session. 1 10th July 2007, 9:42 am

Interview with Leah Culver: The Making of Pownce. Django + Perlbal + S3 + AIR. 0 7th July 2007, 10:05 pm

The Django Web Application Framework. I’m slowly pushing my presentations from the past couple of years up to Slideshare. This is a Django talk from April 2006, so it’s a little out of date. 0 5th July 2007, 1:07 am

UnicodeBranch: Porting Applications. A checklist for porting Django applications to handle the new unicode changes. If your application only handles ASCII text at the moment you shouldn’t have to change a thing. 0 4th July 2007, 2:41 pm

Unicode data in Django. Documentation for Django’s new unicode support. 0 4th July 2007, 2:24 pm

Django changeset 5609. “Merged Unicode branch into trunk. This should be fully backwards compatible for all practical purposes.” 1 4th July 2007, 2:22 pm

I can’t say enough good things about Django. Professionally, it was one of the best technical decisions that I got to make early on at Tabblo.

Antonio Rodriguez 0 3rd July 2007, 1:38 am

Gmail and Django. I’d never considered using Gmail to send e-mail from applications, but it could be a useful way of avoiding having outbound e-mail falsely flagged as spam. 4 2nd July 2007, 9:46 pm

Django status update: June 26. Outstanding detailed overview of recent happenings in the Django community, courtesy of Clint Ecker. 0 27th June 2007, 2:30 pm

Django-fr. Community site for French language Django developers. They’ve already made a promising start on translating the documentation. 0 21st June 2007, 10:50 am

Washington Post and Facebook. Deryck Hodge on hacking against Facebook API using Django. 0 19th June 2007, 10:33 am

Doing Local Right. The slides from my presentation at @media 2007. 0 9th June 2007, 7:31 pm

Deploying a Django app on the desktop. Silver Stripe used cx_freeze to package their commercial agile project management Django application as an easy to run Windows executable. 2 1st June 2007, 9:45 pm

Review Board. VMWare release a slick looking Django-powered code review system, with hooks in to Subversion and Perforce. 2 31st May 2007, 8:32 am

typogrify (via) “Typogrify is a collection of Django template filters that to help prettify your web typography by preventing ugly quotes and widows and providing CSS hooks to style some special cases.” 0 29th May 2007, 7:38 pm

oxfordgeeks.net

Nat and I had a bit of a mini-hackday this bank holiday Monday. Nat’s been doing a great job summoning local geeks out of the woodwork with Oxford Geek Nights event, but it’s still pretty hard to find other interesting events in the Oxfordshire area. It’s not that there aren’t any, it’s just that the geek community in Oxford is currently pretty fragmented. [... 295 words]

Django unicode-branch: testers wanted. Malcolm’s outstanding work on the unicode branch appears to be nearing completion. 0 24th May 2007, 11:46 pm

Rapid development serving 500,000 pages/hour (via) Curse Gaming are getting impressive performance out of Django. 1 24th May 2007, 4:11 pm

Django Internships at the Journal-World. The Journal-World is an amazing place to start your career. 0 2nd May 2007, 9:54 pm

MintCache for Django. Caching scheme for Django that solves the dog-pile effect, where high traffic causes many processes to regenerate stale cached data at the same time. 3 2nd May 2007, 8:49 am

django-logging. Looks neat—includes the ability to use Python’s standard logging module to log messages to a footer appended to your site’s HTML output. 0 24th April 2007, 6:50 am

Turn your Django application in to an OpenID consumer

I’ve just put the finishing touches on the first releasable version of django_openidconsumer, a package that makes it easy to add OpenID consumer support to any Django application. [... 229 words]

modwsgi. Apache module (written in C) for hosting Python WSGI applications, no mod_python required. Includes Django integration instructions. Has anyone tried this out? 5 14th April 2007, 9:48 am

Naming URL patterns (via) You can now apply a name to a URL pattern in Django development version, which makes the {% url %} template tag far more useful. 1 10th April 2007, 12:19 am

Avoid IE Brokenness When using Vary and Attachments (via) Django middleware that works around a bug in IE where external applications fail to load content that was served with a Vary header. 1 9th April 2007, 9:41 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. 0 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. 2 27th March 2007, 1:51 pm

mod_python: Expat Causing Apache Crash. We ran in to this problem today. 1 27th March 2007, 11:49 am

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.” 0 25th March 2007, 7:56 pm

Django version 0.96 release notes. The two big improvements are the newforms library and the ability to use callables directly in your URLconfs, enabling a bunch of useful new tricks. 0 23rd March 2007, 11:47 pm

HP acquires Tabblo. The first high profile Django-powered acquisition? Very well deserved; Tabblo is an excellent application. 0 23rd March 2007, 3:49 pm

More Django (likely more than is healthy). Jacob’s advanced Django tutorial from PyCon. I really like the template he’s using to present the slides and notes. 1 1st March 2007, 11:08 pm

Django snippets. James Bennett’s new site for Django snippets. The source code to the whole site is available. 0 26th February 2007, 10:08 am

Django IRC FAQ. Frequently asked questions from the Django IRC channel. 3 20th February 2007, 10:07 am

Quick Django Benching. Django under Apache/mod_python outperforms nginx/FastCGI and LightTPD/FastCGI once you ramp up the concurrency levels. My setup for this site (Apache/mod_python behind an nginx proxy, with nginx handling static files) should give the best of both worlds. 1 17th February 2007, 4:56 pm

Django templates in Venus. It’s nice to see the Django template system being used outside the context of the overall framework. 0 14th February 2007, 11:22 pm

Cats or Dogs (via) Finds statistically interesting facts based on people answering a sequence of “X or Y” questions. Written in Django by James Tauber in less than four hours. 0 11th February 2007, 1:49 am

About LiveBus.org. I love sites with a colophon. LiveBus.org is powered by Django. 0 10th February 2007, 10:57 pm

Why you should be using disambiguated URLs

Good URLs are important. The best URLs are readable, reliable and hackable. [... 553 words]

Jeff Croft: Geocoding My Life. Really smart weblog integration of the Flickr API, using the Geocoder.us reverse geocoder along with hand entered locations to create a browseable archive of photos by location. 1 1st February 2007, 1:27 pm

The Django Book: Deploying Django. Solid advice based on years of experience at the Journal-World and the Washington Post. 1 26th January 2007, 12:38 pm

The Django newforms-admin branch. This should make customising the Django admin application a whole lot easier. 0 15th January 2007, 2:43 am

Using TextMate with Django. Including a nice looking theme inspired by the Django website. 0 15th January 2007, 2:16 am

Hacking Django, how Bazaar. This is a neat trick: use Subversion to track an upstream project, then create Bazaar branches to manage your own development against the trunk. 1 12th January 2007, 10:34 am

In fact Django reminds me a bit of the character in Airplane who always answers the “what do you make of that?” question literally... “Why, I can make a hat or a brooch or a pterodactyl...”

Scott Gilbertson 2 10th January 2007, 11:17 am

DjangoID. Django-based OpenID server for hosting your own (or someone else’s) identity. 1 7th January 2007, 9:54 pm

More home improvements

I’ve had an offline Christmas, not entirely through choice (broadband at my Dad’s new place in rural France isn’t working yet) but welcome. I did have my laptop with me, and I’m using Bazaar for version control so being offline isn’t a barrier to checking in code. I’ve just rolled out a bunch of new features that I put together over the past few days. [... 514 words]

Serving Multiple Hosts from a Single Django Instance. Includes a patch to pull the urlconf from the request object, where it has been placed by some custom middleware. 0 25th December 2006, 11:21 pm

Rails vs Django Paper and Slides. Even if you’ve already read the paper you should check out the slides. Really good flow, clear and clever use of diagrams. 0 24th December 2006, 12:43 pm

WebFaction blog: BIG holiday present! (via) WebFaction offer Django/Rails/TurboGears hosting for $7.50/month, allowing one long-running process and 40MB of RAM for their basic plan. 0 22nd December 2006, 11:44 pm

The Daily Python-URL. Python’s number one news source, now powered by Django. 0 22nd December 2006, 11:39 pm

Chapter 15: Other contributed sub-frameworks (djangobook.com). Includes detailed documentation of the powerful (but under-exposed) sites framework, flatpages and CSRF protection. 0 19th December 2006, 10:14 am

Django on Dreamhost: incomplete headers. Fix this problem on Dreamhost by renaming django.fcgi to dispatch.fcgi (they special-case for Rails users; Django users can tag along). 0 17th December 2006, 9:36 am

Finally powered by Django

It’s been way too long, but I’ve finally replaced the ball of PHP duct tape that has run this site for the past four years with a shiny new blog engine powered by Django. [... 330 words]

Curse launches with Django platform. Handles 500k visits/hour! 0 14th December 2006, 3:02 am

Django on Dreamhost: incomplete headers. Calling your file dispatch.fcgi (as opposed to django.fcgi) fixes the problem. 0 3rd December 2006, 7:04 pm

Google Mondrian. Internal Google application, powered in part by Django! 0 1st December 2006, 11:27 am

LUG Radio Live and Ask Later

I attended two grassroots technology events in the past two weeks: LUG Radio Live 2006 and London Ask Later (previously known as Techa Kucha night, name changed after some emails from the holders of the UK Pecha Kucha trademark). Both were excellent events in their own right, and great examples of event organisation done on a small to non-existent budget. [... 820 words]

Django and JSON. Neat trick to serialize Djange QuerySets as JSON. 0 20th June 2006, 8:16 am

Speaking gigs

I’ve been doing a fair amount of public speaking recently, based on the principle that the only way to get good at it is to get a lot of practise. My last two talks were a session on Django and Web Application Frameworks at the ACCU 2006 conference and a talk on the Yahoo! Developer Network for NMK’s Beers and Innovation series. [... 304 words]

Subversion tips: working with branches. Django gets a mention for best practices. 0 13th February 2006, 3:20 pm

Happy New Year!

It’s just gone midnight here in England (I’m in Exeter for the new year), so Happy New Year to all. Top weblog-related priority for 2006: upgrade this aging heap of badly written object-oriented PHP to something better. I’ll try and get some good content flowing more regularly as well. [... 58 words]

Notes on public speaking

I’m pretty inexperienced as a public speaker, but somehow I landed two speaking gigs in as many weeks recently and learnt some useful lessons about presenting in the process. [... 552 words]

Django gods—Uncyclopedia. Utterly bizzare. I do like squirrels though. 0 7th October 2005, 3:45 pm

Django and Rails London meetup

Here’s a date for your diary: Sam Newman is arranging a meetup for Django and Rails enthusiasts (and anyone else with an interest) on Monday the 5th of September at 7pm in Smiths of Smithfield. If you want to attend, leave a comment on Sam’s entry to give an idea of numbers. I’m signed up—it should be a fun evening. [... 64 words]

How Django processes a request

I’ve decided to kick-start some architecture documentation for Django by describing how the core request handling mechanism in Django works. I’m talking about the part of Django that takes a request from a browser and turns it in to a response—I won’t be discussing the template system, object-relational mapper or automated admin interface, which are all separate components; in fact, you don’t need to use any of those to build a Django application. [... 674 words]

Exciting developments with Django

The amount of activity surrounding the Django web framework since its not-quite release a few weeks ago is amazing. Adrian, Jacob and Wilson have been working over-time, with 395 check-ins to source control since the 13th of July. They’ve added WSGI support, a development web server, unit-tests, a ton of documentation, SQLite support, database introspection and dozens of other feature tweaks and bug fixes. Check out the project Timeline for an idea of just how frenetic things have been. [... 271 words]

Introducing Django

You may know that I spent a year working in Kansas for a local newspaper—the Lawrence Journal-World. I’m delighted to announce that a decent chunk of the software I worked on there is now available as open-source, in the form of the Django web framework. [... 614 words]

A django site