validate the css validate the xhtml

Ceci n'est pas une blog
by Glenn Franxman, Django Developer / Stunt Programmer.

Holy Paginator, Batman!

I got this pic from - a site that sells handmade ukranian crafts in the US.

Django has a really great pagination framework built in, but it does encourage you to write code like:

entries = MtEntry.objects.filter( entry_status__exact = 2).order_by( '-entry_created_on' )
paginator = ObjectPaginator(entries, 5)
page = int( request.GET.get('page', 1) )
object_list = paginator.get_page(page - 1)
c = RequestContext(request, {
'%s_list' % template_object_name: object_list,
'is_paginated': paginator.pages > 1,
'results_per_page': paginate_by,
'has_next': paginator.has_next_page(page - 1),
'has_previous': paginator.has_previous_page(page - 1),
'page': page,
'next': page + 1,
'previous': page - 1,
'last_on_page': paginator.last_on_page(page - 1),
'first_on_page': paginator.first_on_page(page - 1),
'pages': paginator.pages,
'hits' : paginator.hits,

That's ...

posted: 2007-03-28 03:08:08 80 comments Read More

MintCache for Django

MintCache is a caching engine for django that allows you to get by with stale data while you freshen your breath, so to speak.

The purpose of this caching scheme is to avoid the dog-pile effect. Dog-piling is what normally happens when your data for the cache takes more time to generate than your server is answering requests per second. In other words if your data takes 5 seconds to generate and you are serving 10 requests per second, then when the data expires the normal cache schemes will spawn ...

posted: 2007-03-17 02:21:39 451 comments Read More

The power of Zero

So I've been on this minimalism kick for a couple weeks. Basically applying a "less is more" philospophy to software. This time I'm building a site that has no content of its own, no network configuration of its own, no database, etc. I'm trying to build it completely out of reusable components that themselves use sensible defaults allowing for zero-configuration deployments with the flexibility to allow them to be controlled in cases requiring advanced control.

You can see it at In fact you can ...

posted: 2007-02-14 22:43:24 146 comments Read More


Every day that I spend messing with python and django, I learn something new or find simpler ways of doing things than I've done them in the past.

Tonight I've been experimenting with Django's templating language. I've been building my tag libraries to augment the django's general purpose templating language and data filters for a while now, but today I started really poking around its eqivalent of ObjectGraphNotationLanguage. The stuff I'm doing is really going to change the way we build stuff at work ...

posted: 2006-03-18 03:49:54 20 comments Read More


SO I'm playing with Django's data modeling tonight. Django is a python framework similar to RubyOnRails. It manages the model in the code and all that jazz.

But its default behavior is to follow the relationships between entities in the wrong direction. For example, given the canonical Poll data model, you have polls, and the polls have choices. The natural outcome is that the choices have a reference to their parent poll. The admin interface lets you defines polls, but then go into a choices interface where you ...

posted: 2005-09-03 04:01:39 13 comments Read More

There are 10 entries like these. Previous

Copyright © 2003,2004,2005,2006,2007,2008 GFranxman. All Rights Reserved

hosting: powered by: django. written in: python. controlled by: bzr. monsters by: monsterID.