Posts Filed in "Django"

17

Apr

Filed in Code, Django with View Comments |

One issue we had come up over at iBegin lately, is the fact that GZipMiddleware tries to encode ALL responses (with a few minor exceptions). In our cases, we sometimes stream actual binary files over the response. Doing this with the standard middleware causes a unicode error as it’s trying to encode all of the [...]

14

Apr

Filed in Code, Django with View Comments |

Most of our projects lately are now using JSON data storage in the database. This makes it very efficient for storing additional data without having to run alters are gigantic data sets. It also allows us to store different data for different kinds of sets within the same table. Doing this in Django we originally [...]

25

Mar

Filed in Django, How-To's with View Comments |

A while back I posted a quick, and very simplistic guide to setting up django-sphinx within your project. Since that time we’ve gained a lot of use of the platform. It came to my attention today that the django-nyc group was going to do a presentation on how to setup sphinx within your Django project. [...]

14

Mar

Filed in Code, Django with View Comments |

One of the many things we do to help optimize our website load times is optimize the frontend by setting far-futures headers. This simply means that media has an Expires tag of sometime in the distant future (maybe a year), and when we make changes, the filename needs to change. The easiest way to do [...]

28

Feb

Filed in Code, Django with View Comments |

So today I went ahead and cleaned up my UUIDField implementation. Originally it was just based off of a snippet. I wanted to swap it over to use a BINARY column in MySQL, after reading on how FriendFeed had been using UUIDs. Due to using Django however, you can’t use binary data or BLOB columns [...]

9

Feb

Filed in Code, Django with View Comments |

One of the repetitive tasks that I always seem to have, is handling large amounts of data in chunks. That is, typically I loop through every row in the database, but the result set is too large, or too slow to take into memory all at once. After reading my code a few too many [...]

29

Dec

Filed in Code, Django, Lifestream, Python with View Comments |

In the Lifestream service I’ve been working on, I presented myself with the need to have some class abstraction, but not in the fashion which is available in Django models. I wanted to achieve a base class, which is stored in the database, and then child classes which simply override some methods. It turned out [...]

2

Dec

Filed in Code, Django, Python with View Comments |

As a sort of challenge to myself, I once again attempted to recreate ticket #17 as a standalone component. After a few hours, and some previous code I had written as a good guide, it seems to be working. So I’d like to announce django-idmapper. The goal of the project is a simple plug-and-play system [...]

1

Dec

Filed in Code, Django, Python with View Comments |

One of the optimizations (if you want to call it that) that can be done for decreased load-time on a web page, is removing excess white space. In many of our pages at iBegin this saved as much as 100kb. While not every site has some of the 300kb pages that we have, it can [...]

7

Nov

Filed in Django, iBegin with View Comments |

As many of you know, I’ve been working on things over at iBegin for the past 6 months. One of the things we did was a complete rewrite of our platform which includes a local business listings directory. While doing this, I had the goal in mind to make it as scalable as possible, and [...]

« Previous PageNext Page »