validate the css validate the xhtml

HackerMoJo.com


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

Reversed publishing with Django


>>> from django.core.template import *
>>> c = Context( { 'ctnt': 'this is a test' } )
>>> t = Template( """ {{ ctnt|slice:"::-1" }} """ )
>>> t.render( c )
' tset a si siht '
>>>

badum-dum-chh.

posted: 2008-06-25 15:41:21 54 comments Read More

Google App Engine

Wow! Google just announced Google App Engine which will allow users to host their python applications on their server infrastructure similar to Amazon's EC2 services, but in a more straight-forward manner. The timing is perfect, as I am in the middle of evaluating virtualized hosting for our newspaper websites. The fact that they've started with python and django as the core runtime is huge.

That said, all is not perfect. As Eric and I read more into this, there appear to be some serious limitations. The google model ...

posted: 2008-04-08 13:25:12 11 comments Read More

Django Envy

Seriously, can the django and rails camps quit looking over each others' shoulders?

The Liquid Templates project brings django's template language to rails. At least it will make transistioning from rails to django easier once that inevitably becomes fashionable.

posted: 2008-03-06 03:28:03 2159 comments Read More

Special Ops for Django

I do a lot of hacking on django both at work and in my spare time. One of the things I like most about django is the built in admin. It's cheap, fast and reliable. But it doesn't always have the functionality you might want to add, and extending it isn't always the easiest thing to do.

So much of what I do ends up being done in an ad hoc mode. It's only after performing a task a few times that you can really begin ...

posted: 2008-02-29 00:47:20 295 comments Read More

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 32 comments Read More

There are 9 entries like these. 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.