Tuesday, February 26, 2008

This Week in Django 12

with hosts Michael Trier and Brian Rosner

Bookmark and Share

This Week in Django is a weekly podcast about all things Django.

This week we discuss a few source commits, some great blog posts, the new django-dev IRC Channel and the IRC Channel Logger, the Tip of the Week, and a couple of items from the IRC channel.

Please see the Show Notes below for all the pertinent information and links

Downloads

AAC Enhanced Podcast (38.5 MB, 46:03, AAC)

MP3 Edition (31.7 MB, 46:03, MP3)

OGG Edition (25.1 MB, 46:03, 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 <i>at</i> thisweekindjango.com.

Show Notes

Big News (1:01)

Tracking Trunk (1:46)

Community Catchup (8:25)

  • Python Magazine Looking for Writers – If you’re interested in getting your name in print, contact them. Additionally, the inaugural issue from October 2007 is available for free on their Web site. If you sign up for a free account, the download link will appear in list of issues available for download there.
    • PyMOTW – Python Module of the Week.

Tip of the Week (26:08)

Overriding ModelChoiceField Labels – A solution for modifying how the labels in a select box appear. Read Brian Rosner’s excellent post on the topic.

IRC Ad Nauseam (30:42)

Django IRC FAQ

Backwards Incompatible Changes Information

Django Bot

  • New Django IRC Channel Logger – The old one died, we promised you a new one. Enjoy! We’re doing it in true iterative fashion. If there is functionality you’d like to see let us know. Other channels being logged can be found here

I am creating a custom template tag, how do I get access to my template variables in my new custom template tag?

  • Django Documentation on passing template variables to the tag
  • All arguments to the tag are unpacked as string literals.
  • Resolve the string arguments to their context variable form (such as converting the string element back into a Post instance object) by using the template.Variable class.
  • In the Development version the Variable class is used instead of the resolve_variable function. Changeset 6399 made this change.

I just created a Custom Management Command Extension and it’s not showing up in the list when I type ./manage.py help. What’s the problem?

There is a bug in the Custom Management Commands where it will not find and register commands if the INSTALLED_APPS setting refers to project_name.app_name. So for the time being you need to refer to these apps that have custom management commands in them by just using app_name.

Thank You! (43:51)

Comments - 4 people have already said something. Join the discussion.

  • Eric Florenzano said

    Great podcast, as always!

  • casseen said

    Thanks a lot!

  • hauser said

    Using shorter name in INSTALLED_APPS may cause some unexpected problems if you will import the module somewhere else with full name - the module will be inited twice. Once with shorter name and later with longer. If you for example register on signals in your __init__.py file it can cause serious problems.
    You can also use this hack: sys.path.append("../") in manage.py to overcome problem with custom commands, but it isn't perfect either.

  • Empty said

    hauser: You're correct, that's why I always make my apps portable and put them on the python path directly. Then the shorter name is actually correct and the way it should be represented throughout your application. But I'm glad you pointed that out, because I think we failed to emphasize the importance of the issue.