OSCON 2006: Django: Web Development with Journalists’ Deadlines

    Kevin Yank

    This week, Kevin Yank is reporting from OSCON 2006 in Portland, OR.

    Lead developer Jacob Kaplan-Moss bills Django as a competitor to Ruby on Rails. Django is a web development framework that was born at a small community newspaper in the city of Lawrence, Kansas, where it began its life as a content management system specialized for producing an online newspaper on tight deadlines.

    Like Rails, Django leverages the strengths of an “alternative” language—specifically, Python—to provide a web development platform that takes away a lot of the annoyances that a particular class of developers face repeatedly.

    Unlike Rails, Django doesn’t strictly conform to the Model-View-Controller (MVC) architecture that is so popular in web frameworks right now. Django does have models, and they are extremely simple to write. Write a Python class, list a series of fields, their types, and any special attributes (such as maximum length), and Django will automatically generate a slick administration interface with full support for users, user levels, and a generous helping of conveniences such as pulling EXIF data out of submitted images.

    The rest of Django feels significantly less like all the MVC frameworks out there. Everything circles around a slick, designer-friendly template engine, where templates can fit together in an inheritance hierarchy. This allows your designers to work with familiar HTML and CSS, and your developers to extend those to slot in dynamic data as required without touching the files created by the designers.

    Other niceties built into Django: automatic form validation, a set of generic views that form a great foundation for building your own administration interfaces, automated syndication (with full support for the various flavours of RSS and Atom), visitor commenting, full internationalization and localization, and much more.