Living on the Edge

This Week in Django 17 - 2008-04-06

Posted on April 07, 2008

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

This week we talk about EuroPython 2008, some cool posts and projects from the community, the Tip of the Week, and a question from the IRC.

Plus, we are fortunate to have a special appearance by Mike Axiak to discuss streaming uploads and ticket 2070.

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

Downloads

AAC Enhanced Podcast (45.3 MB, 55:54, AAC)

MP3 Edition (38.4 MB, 55:54, MP3)

OGG Edition (30.5 MB, 55:54, 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 (1:01)

  • EuroPython 2008 – To be held in Vilnius, Lithuania from Monday July 7th – Saturday July 12th. No Django sprint officially announced as of yet.

Tracking Trunk (3:55)

  • Quite a few interesting changes in the GIS branch.
  • Thank you to all the translators
  • We’re working on an i18N show

Community Catchup (7:37)

  • Refactoring the DocumentationJacob Kaplan-Moss posted to the Django-Developers discussion list that he is doing a ton of work to refactor the Django documentation structure, breaking it up based on stakeholders.
    • Sphinx – excellent Python documentation generator
  • Streaming Uploads DiscussionMike Axiak started a great discussion on some work he’s doing to handle streaming uploads. It’s been a very active discussion thread. I know that Mike is spending a ton of time working on this along with Ticket 2070 as he’s hanging out in IRC all hours of the day and night.
  • json_encode – a great JSON encoding module by Wolfram Kriesing which he states is improved and simplified. If you are doing AJAX work you should really check this out.
  • DjangoFriendly – is a community resource for finding the friendliest Django hosting environments. Designed and developed by Ryan Berg.
  • Django Djblets – The Review Board team abstracted a set of useful helpers. Included are Authentication improvements, Flexible datagrids, Decorators, Caching functions, and Unit testing utility classes.
    • Clarification, in the show I said decorators for doing tagging, what I meant was decorator for doing a template tag. See the docs.

Tip of the Week (42:21)

  • Last week’s Tip came from Alex Gaynor. Apologies for not mentioning it.

This week’s tip is for users of the newforms-admin branch. Even if you are not using newforms-admin, this might be something to make you look at newforms-admin or just keep in the back of your mind once it is merged into trunk.

It is very possible to define your own form for both the main form and any inlines. A FormSet class is used to make inlines work which is simply some abstraction to using more than one form around some data.



# your ModelForm (probably in forms.py)
class AdminPostForm(forms.ModelForm):

    class Meta:
        model = Post

    def clean_title(self):
        value = self.cleaned_data.get("title")
        # custom validation with value here
        return value

# your ModelAdmin (probably in admin.py)
class PostAdmin(admin.ModelAdmin):
    form = AdminPostForm
admin.site.register(Post, PostAdmin)

# your model
class Post(models.Model):
    title = models.CharField(max_length=100)
    body = models.TextField()

IRC Ad Nauseam (46:41)

Django IRC FAQ

Backwards Incompatible Changes Information

  • DjangoBot Updates
    • Fixed the Time Zone bug caused by configuring settings manually because it doesn’t set the environment correctly.
    • Corrected caching problems by using file-based caching.
    • Urlize filter is very slow as detected by hotshot
    • Eric Florenzano is working on an optimized version. For more information on Eric listen to our interview with him on This Week in Django 11.

I just created a post for my new blog but the post is not showing up for about an hour. I’m using a date-based generic view. Is there some kind of caching going on?

It is possible that you have not set your time zone information appropriately in your settings file.

Thank You! (54:30)

Comments
  1. PaulApril 07, 2008 @ 09:59 PM

    Hey, thanks for the book plug! I know you know this, but just to be clear for your readers/listeners I’m one of three authors; Jeff Forcier and Wes Chun have also worked hard on the book. We have an official site up—it currently consists of three lines of text, a cover image, and a link to Amazon, but it is powered by Django!

    http://withdjango.com/

    Good show. You seem to have a knack for picking out the things I want to hear more about, e.g. Mike’s work on streaming uploads. Another smart young fellow to keep an eye on.

  2. EmptyApril 07, 2008 @ 10:18 PM

    Ah, yes Paul. Thanks for pointing out that there are other authors. We were remiss in not pointing that out. I think we are so enamored with you we can’t seem to see past that. :) Glad you enjoyed the show.

  3. David, biologeekApril 08, 2008 @ 06:49 AM

    I hadn’t tried newforms-admin yet, but shouldn’t it be form = AdminPostForm in PostAdmin class?

    Anyway, thanks for your awesome work!

  4. kubikuApril 08, 2008 @ 10:46 AM

    Thanks again for great work. “This week in Django” should be featured on djangoproject website!

  5. EmptyApril 10, 2008 @ 07:03 PM

    David: You are correct. Thanks for keeping us honest. Kubiku: Thanks for the kind words. We’re glad you listen.