Joaquim Rocha: This Week In Django
Django Community - Saturday, October 04, 2008 @ 04:02 PMJohn DeRosa: Django -> Plone: Portlets, Viewlets, Zcatalog, Aspects
Django Community - Saturday, October 04, 2008 @ 03:02 PMThis Week in Django: Django From the Ground Up: Episode 10
Django Community - Saturday, October 04, 2008 @ 06:00 AMIn this episode we use Django's generic views to create a list of all the new users, write a performance-oriented inclusion tag, and write some code that lets users follow their friends from that page as well. All of the code that we go over this week is the latest code from GitHub.
Generic Views
One thing that we really haven't used up until this point is generic views. One reason for that is because they never really fit the use case until now, but another reason was simply to demonstrate how to do things the "hard way" first. My favorite generic view is definitely the django.views.generic.list_detail.object_list view, which is the one that we use here. For more information on generic views and how you can use them, visit the documentation on the subject (which is really good).
Pagination
Pagination is handled by a custom application called django-pagination. Thankfully for me, I was the one who wrote django-pagination in the first place, but that doesn't really help you all out. That's why I've recorded a whole screencast talking about just how to set up django-pagination and use it with your projects. You can find that screencast on my blog entry about the subject.
friends_for_user and dict_entry_for_item
Why go through all this hassle? Well, as we learned in episode 7, there can be a pretty big performance tradeoff when writing templatetags that operate on just one model instance. When we do things this way--querying for a batch of items by friends_for_user, and picking out individual items with dict_entry_for_item--we bypass that performance tradeoff, without sacrificing a lot of convenience (in my opinion, of course).
Ivan Sagalaev: Vooid
Django Community - Saturday, October 04, 2008 @ 02:00 AMNova Scotia
Project.ioni.st - Saturday, October 04, 2008 @ 01:46 AMIn terms of academic browni...
Project.ioni.st - Saturday, October 04, 2008 @ 01:46 AM“ In terms of academic brownie points, you don’t get many unfortunately. ”
Simon Peyton-Jones