Posted on December 12, 2008 at 4:59 am
I use base36 for all most object ids in tagz. I previously used to manually convert all base36 values into integers before doing the lookups. Yesterday it dawned to me that I could subclass QuerySets and remove a lot of boilerplate code. The idea here is that I can do something like Model.objects.get(pk_base36=’2kk’) instead of something like [...]
Posted on November 4, 2008 at 12:00 pm
Due to various reasons beyond the scope of this blog, I’ve had to quit my current job as a Programming Specialist at Position2. So, if you’re looking for a python / django hacker in Bangalore (although telecommuting certainly is an option I’d consider), drop me a line.
Posted on October 1, 2008 at 8:20 pm
This one’s pretty basic (from the docs) , but I end up using it all the times. Being able to “AND” and “OR” django querysets can really simplify a lot of code. Here’s an instance (a simplification of the setup I have in tagz). Lets start by defining 2 models. Now, lets say I want [...]
Posted on August 29, 2008 at 4:44 pm
In one of my django projects, I use a lot of recursive template tags, which seem to cause quite a bit of slowdown while rendering them. I looked at the code in django.template.loaders.filesystem Looks like the template is reloaded from the filesystem every time the a template is loaded. This gets really bad with custom [...]