Tag: python

Slicing A List Into Equal Groups in Python

There are several ways to do this, but I found out today that it’s possible to use itertools’ izip method to achieve the same effect as well, so I thought I would note it down here to reference later.

Read more »

SmartyPants in Django Templates

John Gruber’s SmartyPants script is a great tool for converting a body of text into a more typographically correct and visually appealing version. Chad Miller’s Python port makes it really easy to implement this functionality as a template tag, but I wanted to take it a step further and use SmartyPants as a Markdown pre-processor, just as I did with Pygments.

Read more »

Python 3.0 Released

So Python 3.0 is finally out. I have already gone over the What’s New document, but I’ll need to do a few more readings before I grasp every change. I am curious to see how this will affect the Django release schedules.

Visit the bookmark »

Quick & Easy Twitter Feed

I have been meaning to add a simple Twitter feed for my updates to this blog, this afternoon I finally got some time to do it. I looked at django-syncr first, but it seemed a bit too heavy for my purposes, so I wrote my own synchronizer on top of python-twitter.

Read more »

Debugging Django in Production

This neat trick by Eric Holscher is simply awesome. By adding a little middleware in your Django application, you can have your production server show authenticated superusers the proper error messages while blocking everyone else with the default 500 page. This is going to become another one of those can’t-do-without techniques for me.

Visit the bookmark »