Posts from July 2007

django-localdates is a django app that brings local date presentation to django, by providing custom date filters that can use local-flavored format strings.

July 17, 2007, 2:18 p.m. More (870 words) 6 comments Feed

I spend much time on other people's computers - I'd like to be able to hack for 30 minutes on an idea, but unfortunately, it isn't easy. I have to download and install numerous software packages, like python, django, subversion, an SSH client etc. So I decided to put all that in a flash drive and take it around with me.

July 4, 2007, 9:56 p.m. More (138 words) 6 comments Feed

There is a neat piece of functionality in Django that will allow you to traverse your object graph by date:

Get next or previous by FOO, where FOO is a Date or DateTime field:

For every DateField and DateTimeField that does not have null=True, the object will have get_next_by_FOO() and get_previous_by_FOO() methods, where FOO is the name of the field. This returns the next and previous object with respect to the date field, raising the appropriate DoesNotExist exception when appropriate...

However, these methods use the default manager, that may be not what one wants.

July 3, 2007, 3:34 p.m. More (399 words) 0 comments Feed