Living on the Edge

This Week in Django 2 - 2007-12-16

Posted on December 17, 2007

This Week in Django in a weekly podcast about all things Django. This Week in Django 2: PyCon 2008, ModelForms changes, Practical Django Projects book, Sphene Community Tools, Two-Faced Web, authentication decorator on generic views, and a couple questions from IRC.

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

Downloads

AAC Enhanced Podcast (11.3 MB, 22:41, AAC)

MP3 Edition (10.4MB, 22:41, MP3)

The Enhanced Podcast version contains screenshots and easy access links to all of the items I discuss throughout the podcast.

Feeds Now Available

This Week in Django – AAC Edition

This Week in Django – MP3 Edition

Show Notes

Big News

Tracking Trunk

Community Catchup

Tip of the Week

Decorate urls.py for Authorization


from django.views.generic.list_detail import object_list 
from django.contrib.auth.decorators import login_required 

protected_list = login_required(object_list)

urlpatterns = patterns('',
    r'^/?$', protected_list, my_info_dict),
)

IRC Ad Naseum

I just ran a syncdb and now I’m receiving a message ‘No Fixtures Found’. Is there something wrong with my database settings. How can I correct this.

This is normal. It is telling you that there were no fixtures located in your project structure for loading. This has been modified in Changeset 6883. The message will only display now if you have a verbosity level greater than two.

I’m having problems serving static files.

  • Serving Static Files Documentation – Doc page under Solving Specific Problems
  • Django doesn’t server media. That’s the job of your web server or media specific web server. Some people use Apache, others choose to use something like NGINX or Lighttpd. You can also put your media up on S3 and server it directly off of their servers.
  • Follow the warning about enabling only if settings.DEBUG is True
  • Remember the match pattern is whatever you use for your url location. The document_root is the full directory path to the media.
  • I use unipath to make it easy and portable.
Comments
  1. MartinDecember 18, 2007 @ 04:28 AM

    Great show! you might want to consider sticking to jazz jingles – the country one kind of stnads out in a bad way :-)

    A little more info on unipath in the shownotes might be good – maybe an example or link to same.

    /mac

  2. Alex EzellDecember 20, 2007 @ 03:22 PM

    Just noticed that you had a podcast going. Checking it out now!

  3. EmptyDecember 20, 2007 @ 08:47 PM

    Martin: It was actually on purpose since it was the bumper for the IRC segment. Although, you have a point.

    Thanks for the reminder I forgot all about showing the unipath stuff.

  4. EmptyDecember 20, 2007 @ 10:24 PM

    Martin, I just did a separate post on Unipath. Check it out: http://blog.michaeltrier.com/2007/12/21/using-unipath-to-keep-thing-portable

  5. JustinJanuary 12, 2008 @ 01:44 PM

    Michael, Great shows overall. Excellent music selection and great info for the Django beginner (myself) and probably more experienced users as well.

    Thanks!