This Week in Django 35 has been posted. Don’t miss it. We catch up with Robert Lofthouse, Chairman of DjangoCon and EuroDjangoCon.
This Week in Django 34 - 2008-08-17
This Week in Django 34 has been posted.
This week we discuss Django 1.0 Beta 1, a bunch of source commits, some cool projects from the community, and a tip of the week.
Django 1.0-Beta 1
Just released is Django 1.0-Beta 1. This is another huge milestone in the push towards Django 1.0. This also means that we are likely to see a more stable trunk, so it looks like it’s heads down on Django once again. Check out the release notes for more information.
But the coding never stops. Tomorrow begins the Release Candidate sprint in Austin, TX and via IRC on freenode #django-sprint. Jump in and squash bugs.
I want to thank all of the contributors for their very hard work.
This Week in Django 33 - 2008-08-10
This Week in Django 33 has been posted.
This week we discuss the NEW This Week in Django site, a bunch of source commits, and some cool projects from the community.
All show notes from now on will be on the new This Week in Django dedicated site.
This Week in Django Delayed
This Week in Django will be delayed this week. We hope to get it out by tomorrow evening. We have been experiencing technical difficulties. Thank you, and now back to our regular scheduled program…
Django 1.0-Alpha 2
Django 1.0 Alpha 2 was just released. This release adds in GeoDjango, Intermediary models and file storage refactor. Grab a copy and test it out.
File Storage Refactoring in Django
With Changeset 8244 we now have File Storage refactoring in the Django trunk. This was one of the big Version 1.0 items and helps get Django closer to the goal line. Congratulations are in order to Marty Alchin for all of his hard work over umpteen months. I really thought it would never make it. :)
This Week in Django 32 - 2008-08-03

This Week in Django is a weekly podcast about all things Django.
This week we have a very special guest, Justin Bronn, creator of GeoDjango the GIS branch of Django. We also discuss a few source commits, some cool projects from the community, and the Tip of the Week.
Please see the Show Notes below for all the pertinent information and links
Downloads
AAC Enhanced Podcast (53.6 MB, 1:08:44, AAC)
MP3 Edition (47.3 MB, 1:08:44, MP3)
OGG Edition (34.4 MB, 1:08:44, Vorbis)
The Enhanced Podcast version contains screenshots and easy access links to all of the items we discuss throughout the podcast.
Feeds Available
iTunes Feeds are available. By subscribing using the iTunes feeds the podcasts will automatically be downloaded for you when we release them.
iTunes Feeds
This Week in Django – AAC Edition
This Week in Django – MP3 Edition
Regular RSS Feeds
This Week in Django – AAC Edition
This Week in Django – MP3 Edition
This Week in Django – OGG Edition
Give Us Feedback
Want to give us some feedback on the show? We’re always looking for ideas or suggestions that will help improve each episode. Please contact us at feedback __at__ thisweekindjango.com.
Show Notes
Big News (0:48)
- DjangoCon tickets have come and go. If you didn’t get yours sign up for the waiting list.
- Version 1.0
- Beta 1 scheduled to drop on 8/5/08.
- Push to Beta 2 sprint – Friday August 8, 2008 in Lawrence, KS and on IRC (#django-sprint).
- Django Sprint in Berlin
Interview – Justin Bronn (5:11)
Justin Bronn is a computer scientist and third-year law student at the University of Houston who enjoys studying legal topics related to intellectual property and spatial law. Prior to creating GeoDjango, Justin worked as a patent engineer for an intellectual property boutique in Houston and developed scientific data analysis applications for the Southwest Research Institute in San Antonio.
CartoAnalytics is Justin Bronn’s consulting company. CartoAnalytics provides innovative solutions to harness the power of your geospatial data.
- Getting started with GeoDjango
- GeoDjango Site
- GeoDjango Wiki
- GeoDjango Docs
- GeoDjango: Web Applications for Geographers with Deadlines – Video of presentation From O’Reilly Where 2.0 Conference, Burlingame, CA, May 14, 2008.
- GeoDjango Presentation at FOSS4G2007
- An IRC channel is available – join
#geodjangoon freenode.
- Other items mentioned
- Houston Crime Maps – excellent reference application for GeoDjango.
- The limited_related admin plugin.
- Take Control of Your Maps – Excellent article by Paul Smith on using OpenLayers
- Open source geospatial libraries:
Tracking Trunk (39:51)
- Addition of Intermediate Models
(8136)– Excellent addition by Eric Forenzano and Russell Keith-Magee that allows you to add join models with extra attributes.- Django Model Documentation
- Django Admin Documentation
- Intermediary Models and PyMag – Blog post by Eric Florenzano discussing intermediary models.
- Implemented a secure password reset form
(8162)– It uses a token and prompts user for new password, plus also adds base36 encoding and decoding.
- Removed several deprecated features for 1.0
(8191)– Removes:- “simple” cache backend
- ObjectPaginator
- edit_inline_type argument for ForeignKey fields
- QOperator, QNot, QAnd and QOr
- maxlength argument
Community Catchup (48:10)
- django-command-extensions becomes django-extensions – We’re renaming the project and the import point from
extensionstodjango_extensions. This will happen in one week.
- Admin Image Widget Pete Baumgartner, LincolnLoop, posted this nice snippet that displays an image instead of a file path if the current file is an image. If you read the comments, another user updated the code generating the thumbnails to use the popular django open source project sorl-thumbnail
- How Django is good for SEO Patrick Beeson is a project manager for E.W. Scripps Interactive Newspaper Group in Knoxville, TN. In the past Patrick has published a few good django related posts but this was is of interest because it discussed one of the many “out of the box” application benefits the django toolset provides.
- django-assets – Asset management for Django. Automatically compresses javascript files. Supports the following filters: jsmin, jspacker, csstidy, cssutils, yui_js, yui_css, gzip, cssrewrite.
- Translating Django apps. Good practices – Great rundown by Marc Garcia on how to go about translating your Django applications. Marc is the Django localizer for the Catalan language. Learn more about Marc and localization on This Week in Django 20.
- Threaded Comments For Your Site Eric Florenzano’s article for the relatively new Python Magazine was published this month. Eric talks about his open source google code project django-threadedcomments and how to integrate the simple yet flexible threaded commenting system for Django-based websites.
Tip of the Week (1:00:50)
Use decorator_from_middleware to create a decorator that can be used in your views, which wraps up a middleware class.
from django.utils.decorators import decorator_from_middleware
from django.middleware.middlewaremodule import MiddlewareClass
decoratorfunc = decorator_from_middleware(MiddlewareClass)
This code is not documented but added as part of cache reworking. See this thread for more information:
Thank You! (1:03:19)
- Brian Rosner
- Kevin Fricovsky
- Monty Lounge Industries – Kevin’s web strategy, design, and development company.
- How I Work Daily – Kevin’s blog.
- Michael Trier
This Week in Django 31 - 2008-07-27

This Week in Django is a weekly podcast about all things Django.
This week we discuss Satchmo, the Django open-source E-Commerce application with Chris Moffitt and Bruce Kroeze. We also look at a few source commits and some cool projects from the community.
Apologies for some of the microphone noise.
Please see the Show Notes below for all the pertinent information and links
Downloads
AAC Enhanced Podcast (89.3 MB, 1:52:43, AAC)
MP3 Edition (77.4 MB, 1:52:43, MP3)
OGG Edition (63.3 MB, 1:52:43, Vorbis)
The Enhanced Podcast version contains screenshots and easy access links to all of the items we discuss throughout the podcast.
Feeds Available
iTunes Feeds are available. By subscribing using the iTunes feeds the podcasts will automatically be downloaded for you when we release them.
iTunes Feeds
This Week in Django – AAC Edition
This Week in Django – MP3 Edition
Regular RSS Feeds
This Week in Django – AAC Edition
This Week in Django – MP3 Edition
This Week in Django – OGG Edition
Give Us Feedback
Want to give us some feedback on the show? We’re always looking for ideas or suggestions that will help improve each episode. Please contact us at feedback __at__ thisweekindjango.com.
Show Notes
Big News (0:00)
- PyOhio was amazing. Kudos to Catherine Devlin for doing an awesome job.
- Django 1.0 Alpha – Test it out and provide feedback.
- Django Push to Beta Sprint – August 1 in Washington, DC and on IRC.
- Twiderrific on Twitter
Interview – Satchmo Developers (8:33)
Satchmo is a Django based E-Commerce solution.
- Chris Moffitt – Project Lead
- Bruce Kroeze
- Coder’s Eye Blog
- Solid Site Solutions
- GoSatchmo – Commercial support site for Satchmo
- Mentioned Items
- OSCommerce – Popular PHP based E-Commerce solution.
- Pinax – reusable apps reference application.
- Free Software Foundation
- Ooh-Ga-Boo-Ga – Huge installation of Satchmo
Tracking Trunk (1:02:46)
- Changed/fixed the way Django handles
SCRIPT_NAMEandPATH_INFO(8015)– Basically, URL resolving will only use thePATH_INFOand theSCRIPT_NAMEwill be prepended byreverse()automatically. Allows for more portable development and installation. Also exposes SCRIPT_NAME in the HttpRequest instance.
- To ensure that a model BooleanField? has an explicit value set
(8050): – Since it’s not required, by default, set the default properly in the constructor.
- Handle sitemaps with more than 50,000 URLs in them
(8088)– Implemented by using pagination.- sitemaps spec limit of 50,000.
Community Catchup (1:08:41)
- Callcast – Discussion with Nathan Borror – Another great discussion by Kevin Fricovsky, this time with Nathan Borror.
- Semantic Django – David Larlet’s website where he archives a collection of open source semantic reusable django apps including such technologies as OpenID, OAuth, Microformats, RDF, FOAF, REST, Atom, Snippets and Patchs.
- Top ten things that suck about Django, revisited – Jeff Croft does a follow up article on a post he did two years ago updating the status of the items needing improvement.
- Automating tests in Django – Great post by Eric Holscher that goes through how to create integration tests for your Django applications in an automated way through the use of a Middleware that logs the test creation output to a file.
- Automating Test Creation – Empty’s feedback on it.
- Testmaker .002 – Eric updates us with new additions to his open source test project including adding a management command, making it simple to add TestMaker to your project just but adding a reference to INSTALLED_APPS.
- Building a Community Site with Django in 40 Hours or Less – Excellent writeup on the Lincoln Loop blog that shows how they quickly built out a Biking Trail application in Django on top of the Pinax platform.
- Django Subdomains – Every have the requirement to implement customized subdomains in your django app, mapping to a model key? It makes for clean, personal, simple to remember url (ex. username.yourappname.com). If you’ve ever used the popular Basecamp web application you’re familiar with their URL structure – [companyname].projectpath.com. This tutorials details how you can do the same as well as references other posts who attempted the same thing, and issues they all ran into along the way.
- Creator/updater fields for admin – Peter Baumgartner, LincolnLoop, recently got his hands dirty customizing a newforms-admin implementation and created a a customized ModelAdmin class that sets fields for models saved in admin corresponding to the user that created the object and the user that last updated the object. Seems trivial for the currently edited model but the catalyst for this was making sure inlines received the same auditing synchronization. He also leverage JQuery to provide additional client side logic.
- Replacing Django’s ORM with SQLAlchemy – Will Larson steps through how to use SQLAlchemy within Django but replacing the ORM.
- Replacing Django’s ORM with SQLAlchemy – Empty’s feedback on it.
- Tranquil – another way to use SQLAlchemy with Django.
- FLOSS Weekly interviews Jacob Kaplan-Moss – Randal Schwartz interviews Jacob Kaplan-Moss at OSCON about Django.
Thank You! (1:46:38)
- NERD_Tree – Excellent VIM plugin that gives a project drawer like behavior.
- Brian Rosner
- Kevin Fricovsky
- Monty Lounge Industries – Kevin’s web strategy, design, and development company.
- How I Work Daily – Kevin’s blog
- Michael Trier
Django Gets Intermediate Models
With Changeset 8136 Django gains the ability to specify intermediate models in a declarative way. This makes it possible to have extra attributes on your many-to-many join table. Check out the docs for more information.
I’ve been watching this one for almost a very long time and I’m glad to see it get in. Special thanks go to Eric Florenzano and Russell Keith-Magee
Automating Test Creation
Eric Holscher just posted a very nice article titled Automating tests in Django. The post goes through how to create integration tests for your Django applications in an automated way through the use of a Middleware that logs the test creation output to a file. It’s a creative approach and certainly very interesting. One additional benefit is that Eric created a screencast to go along with the post that is excellently done.
There is one thing about this approach to testing that doesn’t quite sit right with me and that’s that it seems like the testing process is backwards. If you’re creating tests based on what you have how are you possibly going to cover what’s specified but not implemented properly? It’s the same reason I’m not a fan of doctests. I think they encourage the wrong behavior, especially when often the output your matching to is so complex that the tendency is to just copy and paste from live results. I recognize that a lot of people don’t feel the same way, and perhaps I just need to give the idea more time to sink in.
I really appreciate all of the screencasts that are starting to show up within the Django community. I think it’s a vehicle that a lot of people enjoy and learn well from. I know that I’m certainly looking foward to more screencasts from Eric.
Replacing Django's ORM with SQLAlchemy
Will Larson just created a post titled Replacing Django’s ORM with SQLAlchemy that covers using SQLAlchemy with a Django project. It’s a great write-up, and generally what Django folks are referring to when they say, “of course you can use SQLAlchemy with Django.” I think Will does a good job of stepping you through the important bits.
One thing I appreciate is that the post hints at some of the negatives of doing something like this. You lose things like generic views, all contrib apps including the admin, most of the management commands, and some smaller pieces that are embedded in various parts of the framework. Tread this way cautiously.
Another item in the post that got my attention was when Will mentioned the following in reference to the possibility of doing a full drop in replacement for the Django ORM, essentially allowing you to use fully the Django bits alongside of the SQLAlchemy pieces:
This tutorial won’t build that Frankenstein, since it’s only interested in exploring the loose coupling aspect, but it wouldn’t be prohibitively difficult to do so. Although, it would be awkward in some regards.
Well I, and others, have been building “that Frankenstein” for some time now with a project we call Django-SQLAlchemy. There’s also a somewhat defunct project called Tranquil that is a hybrid between what Will demonstrates and what we’re trying to do with django-sqlalchemy.
I’m not sure whether or not these projects are “awkward” or “Frankensteins,” but I can assure you thus far they have been prohibitively difficult, as we see no full implementation for a drop-in replacement still today. Getting the initial stuff in place is pretty darn easy, but as you get into it there are lots of little edge cases that complicate things significantly.
I want to thank Will for the great post. I think he does a great job of talking about the strengths of SQLAlchemy, and hopefully people will be inclined to experiment with the idea of using SQLAlchemy in addition to, or instead of, Django’s ORM.
TWiD Community Evangelist
As we mentioned on This Week in Django 30 Kevin Fricovsky will be joining the podcast as a Community Evangelist. If you’re wondering what that’s all about and how Kevin fits into the show, check out his detailed post on the subject. Both Brian Rosner and I are extremely pleased to have Kevin’s help and support.
This Week in Django 30 - 2008-07-20

This Week in Django is a weekly podcast about all things Django.
This week we discuss the NewForms-Admin merge into Trunk, DjangoCon, a few source commits, some cool projects from the community, and the Tip of the Week.
Please see the Show Notes below for all the pertinent information and links
Downloads
AAC Enhanced Podcast (41.8 MB, 49:31, AAC)
MP3 Edition (34.1 MB, 49:31, MP3)
OGG Edition (27.9 MB, 49:31, Vorbis)
The Enhanced Podcast version contains screenshots and easy access links to all of the items we discuss throughout the podcast.
Feeds Available
iTunes Feeds are available. By subscribing using the iTunes feeds the podcasts will automatically be downloaded for you when we release them.
iTunes Feeds
This Week in Django – AAC Edition
This Week in Django – MP3 Edition
Regular RSS Feeds
This Week in Django – AAC Edition
This Week in Django – MP3 Edition
This Week in Django – OGG Edition
Give Us Feedback
Want to give us some feedback on the show? We’re always looking for ideas or suggestions that will help improve each episode. Please contact us at feedback __at__ thisweekindjango.com.
Show Notes
Big News (0:47)
- NewForms-Admin Branch Merges to Trunk – A huge step towards Version 1.0.
- Version 1.0 Sprint Schedule
- NewForms Admin Documentation
- Updated NewForms Documentation
- newforms-admin Migration and Screencast – Great way to get started and make the migration to NewForms-Admin.
- Pre-NFA Merge Tag
- DjangoCon Web Site and DjangoCon Schedule Released – It’s quite a lineup. We hope to see everyone there.
Tracking Trunk (15:04)
- Removed the mysql_old backend
(7949)– According to Malcolm Tredinnick, it smells bad and has no friends.
- newforms -> forms switch
(7971)** django.newforms is now django.forms. Updated your code.
- Performance Improvements for urlize and urlizetrunc filters
(7985)– This one has bit us on the Django Logger.
Community Catchup (26:16)
- Kevin Fricovsky – joins the This Week in Django team as Community Evangelist. Kevin will be working to produce the show, contacting guests, gathering news items, coming up with ideas. Kevin has been doing this work regularly anyway so it’s great of him to team up with us to help out the program:
- Monty Lounge Industries – Kevin’s web strategy, design, and development company.
- How I Work Daily – Kevin’s blog. You should have this one in your feedreader.
- PyWorks conference – to be held in Atlanta, GA on November 12-14, 2008.
- PyOhio – Reminder that this free one day conference is in Columbus, OH on July 26, 2008.
- Twitter Search – via Kevin Fricovsky using the new Twitter Search capability to track all tweets about django.
- Jinja2 Final aka Jinjavitus Released – Armin Ronacher and the rest of the Pocoo team announced the release of this wicked-fast Django inspired template engine.
- OSCON Python BoF – Tuesday, July 22nd 7pm – 10pm from Jax Bar and Restaurant. Via Jason Kirtland’s excellent blog discorporate.
Tip of the Week (38:32)
This tip comes to us via Ben Jao Ming in his post Django auto-translation of field values.
If you need to translate content in a field then gettext is not going to help you out. Since you can create your own custom fields it’s easy to wrap a CharField with the translation behavior:
from django.db import models
from django.utils.translation import gettext_lazy as _
class AutoTranslateField(models.CharField):
__metaclass__ = models.SubfieldBase
def to_python(self, value):
return str(_(value))
Just add whatever translations you know of to the locale file and run compilemessages.
Thank You! (42:45)
- 7 Habits For Effective Text Editing 2.0 – Awesome video by Bram Moolenaar
- Brian Rosner
Django 1.0-Alpha
In the ongoing march to Version 1.0, the Django project just tagged and bagged the 1.0 Alpha version with Changeset 8037. I encourage everyone to grab the tarball or svn up and start banging on the latest and greatest code.
update: Django 1.0 alpha release notes
update: Django 1.0 alpha released! blog post


