validate the css validate the xhtml

HackerMoJo.com


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

Holy Paginator, Batman!

I got this pic from allthingsukranian.com - 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

Amazon On My Tivo

aotTivo has finally found a partner to distribute content via broadband to their series 2 and 3 boxes -- Amazon.com. So AppleTV has a competitor. Who's going to be first to let me get Ze Frank in my living room? Or build youtube channels?

posted: 2007-03-11 00:35:59 122 comments Read More

One Laptop Per Child

from my mobileI got to play around with one of the first production OLPC machines today. It is incredible. As you can tell from this shot I took during its first boot, it runs linux. But once it is up it has a really cool gui and a fast hibernate-awaken facility that makes full reboots relatively uncommon.

They have been rewriting as much of the software stack as they can in python. Why? Because they want to make it easy for children to edit the software. Their commitment to open source is ...

posted: 2007-02-24 20:27:31 72 comments Read More

Google versus Krugle

Man, Yahoo is firing on all cylinders these day. I've been using Google's codesearch for quite some time, but I just gave Yahoo's Krugle a second look and man it just blows google out of the water.

posted: 2007-02-17 15:26:03 59 comments Read More

There are 286 entries like these. Previous Check 'em out

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


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