Monday, August 25, 2008

This Week in Django 35

with hosts Brian Rosner and Michael Trier

Bookmark and Share

Big News (0:42)

  • TWiD Updates
    • TWiD Shirts Available – check them out, let us know what you think. We’ll have a supply of them at DjangoCon.
    • We have feeds on the site now and it has been submitted to the Django Community Aggregator.
    • SXSW Podcast Panel – We’re hoping to do a podcast showdown at SXSW. Please vote for our panel to make it all possible. Panel will feature podcasters that will each do a lightning talk revealing how they produce, publicize, and publish their podcasts. We’ll also find out what podcasts they admire and what advice they would pass on to fellow podcasters.
    • Final DjangoCon Slot Filled by TWiD Live – We’re very excited to be able to do the show live at DjangoCon.

Interview – Robert Lofthouse talks about DjangoCon (7:47)

Robert Lofthouse is the Technical Director and co-founder of Siu Design, which is a design/development agency in London. Siu Design uses Python / Django for all of their sites / applications. He’s also the co-founder of DJUGL (Django User Group London) and the Chairman of DjangoCon and EuroDjangoCon, as well as a Django software engineer at GCap.

Tracking Trunk (34:05)

  • GeoDjango Test Runner in Place (8434) – allows users to run tests for GIS apps that require the creation of a spatial database. Modify the TEST_RUNNER setting to point to django.contrib.gis.tests.run_tests.

Community Catchup (45:36)

  • GeoDjango Basic Apps – Simple Django Apps highlighting GeoDjango integration. These projects aim to be a useful starting point for both experienced Django programmers who are new to GIS (Geographical Information Systems), as well as those with some background in mapping but who learn best through tangible examples.
  • django-mailfriend – A very cool reusable app by Jeff Croft that allows you to include an “e-mail this to a friend” link (as seen on many newspaper websites) on any page available via a get_absolute_url.

Tip of the Week (53:48)

Sometimes you need to filter the Change List in the admin based on the user that is logged in. This can be accomplished easily by overriding the queryset method in the ModelAdmin class for your model.


class StoryAdmin(admin.ModelAdmin):
...
    def queryset(self, request):
        qs = super(StoryAdmin, self).queryset(request)
        if not request.user.is_superuser:
            qs = qs.filter(author=request.user)
        return qs

admin.site.register(Story, StoryAdmin)

Note this doesn’t affect the Change View or the Delete View. There is Ticket 7510 that addresses this by causing all the views to use the ModelAdmin queryset.

Thank You! (57:29)

  • Running Time: 1:00:45
  • Download: AAC, MP3, OGG

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

  • Jeff Croft said

    Hey guys...another great show! Thanks again for the mention.

    On the Django Software Foundation piece: I don't know for certain, but I would be willing to bet my life that Frank Wiles, the author of that piece, was talking to Jacob Kaplan-Moss as his reference. Frank (who is a freaking genius Perl programmer, sys admin, writer, and all around cool dude) lives in Lawrence and shares an office with Jacob. Both guys worked for the Lawrence Journal-World back when I did and have since moved on. In fact, Frank led the team that built a very cool Perl web framework called Gantry (http://www.usegantry.org/). It's a little known fact that the Lawrence Journal-World actually is home to not one, but TWO open source web frameworks. :)

    Not bad for a small town newspaper in Kansas, huh?

  • nonno said

    Where are the dowloads?

  • Brian Rosner said

    Apologizes for the missing downloads. They are now back :)

  • Rock Howard said

    The SWSX PanelPicker only lists a GoogleAppEngine talk and nothing else about Django. Very sad! While SWSX selects 100 talks from the panelpicker, thay also set up another 50 themselves to round out the program. Please have your listeners email Hugh Forest at interpanels@sxsw.com and tell about the growing popularity of Django and who you would like to hear speak at SWSX Interactive.

  • Frank Wiles said

    Yeah it mentions it in the article, but I was interviewing Jacob.

    And damn Jeff, I need you to do my PR in the future!

  • Yashh said

    Thanks for the mention guys. You are doing a great job. I really appreciate it.

  • Robert Lofthouse said

    Hi guys!

    Thanks again for the interview! It was an awesome and fun experience :) Keep up the good work.

    Can't wait to see TWID live.

  • Evan Schulz said

    Will TWID live be video recorded at Google and posted along with the other presentations?

    I'd love to see the friendly heckling that I'm assuming will be going on, but won't all be able to fit in the outtakes at the end of the podcast.

  • Robert Lofthouse said

    Yep, TWID live will be recorded at Google along with all the other presentations.

  • DominikKoeh said

    My first post at this great blog!
    I wanna show u my dayly updated blog: <a href= http://giantblg.cn/whole-ass-amateur.html >Whole Ass Amateur</a>
    P.S. if you don't want to see this message please write me to no.ads08@gmail.com with subject "NO ADS" and URL of your forum
    Thank you for cooperation!

  • OSCAR said

    Whole Ass Amateur

  • OREN said

    Large Anal Objects

Leave a comment

Please leave your comments below.