Pagination: it's not pretty, but it works

Posted by: barbara | Date: Jul 30, 2008 | Category: django | Comments: 0
I wanted a simpler solution than django-pagination. Django-pagination looks easy to implement, particularly thanks to Eric Florenzano's stellar screencast, but the actual installation process isn't very well-documented. Besides, I wanted something that didn't require installing a lot of outside code, and I sure don't want to have ...

Read More

That's right, the women are smarter

Posted by: barbara | Date: Jul 28, 2008 | Category: girl geeks | Comments: 0
Girls Close the "Math Gap" [Alternet] Gender Similarities Characterize Math Performance [Science Magazine] Girls Bridge Gender Divide in Math [ABC News]

Read More

Oh Django, how do I love thee? Let me count the joins ...

Posted by: barbara | Date: Jul 25, 2008 | Category: django | Comments: 0
Let's say I have three simple models - news articles, their categories, and the table that defines which articles are in which categories:
 class Article(models.Model): title = models.CharField(max_length=40, unique=True) body = models.TextField() class Category(models.Model): name = models.CharField(max_length=40, unique=True) class ArticleCategory(models.Model): article = models.ForeignKey(Article) category = models.ForeignKey(Category) 
To get ...

Read More

Dynamic choices on a ForeignKey field

Posted by: barbara | Date: Jul 23, 2008 | Category: django | Comments: 4

One proviso before I get started - this example works with the old (as of a few days ago) version of admin, prior to the newforms-admin merge, where the models still use inner admin classes. I haven't started changing my current project to work with the merge, but as I ...

Read More

Newforms-admin

Posted by: barbara | Date: Jul 23, 2008 | Category: django | Comments: 0
I wish I could say I were more excited about yesterday's merge of the newforms-admin branch into the Django trunk. Of course, I think it's great - all those inner Admin classes in my models never really made sense as a way to hook models into the admin site. But ...

Read More