Blog categories
- Web development (13)
- Python (9)
- Django (8)
- Javascript (4)
- MongoDB (3)
- HTML (3)
- jQuery (3)
- PHP (2)
- MySQL (2)
- GD (1)
- VLC (1)
- Mac OS (1)
- IPTV (1)
- Ubuntu (1)
- Linux (1)
- GridFS (1)
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.", ...