Living on the Edge

This Week in Django 35 - 2008-08-24

Posted on August 26, 2008

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

Posted on August 18, 2008

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

Posted on August 14, 2008

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

Posted on August 14, 2008

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

Posted on August 12, 2008

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

Posted on August 08, 2008

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

Posted on August 08, 2008

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

Posted on August 05, 2008

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)

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.

Tracking Trunk (39:51)

Community Catchup (48:10)

  • 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.

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)

This Week in Django 31 - 2008-07-27

Posted on July 29, 2008

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)

Interview – Satchmo Developers (8:33)

Satchmo is a Django based E-Commerce solution.

Tracking Trunk (1:02:46)

Community Catchup (1:08:41)

  • 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.
  • 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.
  • 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.

Thank You! (1:46:38)

  • NERD_Tree – Excellent VIM plugin that gives a project drawer like behavior.

Django Gets Intermediate Models

Posted on July 29, 2008

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

Posted on July 24, 2008

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

Posted on July 23, 2008

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

Posted on July 23, 2008

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

Posted on July 21, 2008

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)

Tracking Trunk (15:04)

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:
  • 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.

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)

Django 1.0-Alpha

Posted on July 21, 2008

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