Dan Ward Follow me on Twitter View my LinkedIn profile Subscribe to my news feed   

A self-confessed geek and web developer

 

Blog entries for February 2010

From time-to-time, I'll have a brainwave while trying to figure out something tech-oriented; well, either that or I just want to get something off my chest. Anyhow, if I get round to typing it up, it'll wind up here in the blog.

Blog categories

 

Archive

  • A custom MongoDb/GridFS file wrapper for the Django HttpResponse object

    Created by dan on Monday 22nd February, 2010 at 4:28 PM

    Until today, I had been using Django's FileWrapper class to iterate over an open GridFS and yeild chunks to an HttpResponse object, however I noticed that files over 8 KB were being reiterated in the output. As far as I could fathom, the reason why this had been occurring is ...

  • Setting a toggler's link text to 'show' or 'hide' depending on the result of a toggle in jQuery

    Created by dan on Friday 19th February, 2010 at 11:51 AM

    Not explained very well in the title, but one thing I've found is that there's little supportive documentation on how to alter the text of a link which triggers a slideToggle() or toggle() in jQuery. To make the toggle a little easier for the user to understand what's happening, they ...

  • Loading Django template tags and filters automatically (without the {% load %} tag)

    Created by dan on Thursday 18th February, 2010 at 5:12 PM

    I'm not entirely sure of how well this is documented on Django's part, however using the {% load %} tag on each page template where tags and filters used surely break the DRY principle? Anyway, there is an easier way to load tags and filters for all templates. There's just ...

  • Removing IPython/libedit for the time being...

    Created by dan on Monday 15th February, 2010 at 10:42 AM

    Just a quick one I thought I'd share. At some point a while back I decided to install IPython, at least I assume I done it knowingly! Anyhow, I noticed that when I jumped in to the Django shell, I'd get a message along the lines of "Leopard libedit detected.", ...