My duh moment – Django and it’s lack of strip filter

Had a total ‘duh’ moment today at work. I wanted to perform the equivalent of [Python’s string.strip method](http://www.python.org/doc/2.3/lib/module-string.html#l2h-819) on some [Django template output](http://www.djangoproject.com/documentation/templates/).

I looked on the [Django documentation site](http://www.djangoproject.com/documentation/templates/) but I couldn’t find a strip filter.

It took me a few minutes of consternation to figure why the developers wouldn’t include such an oft-needed filter.

And then, the aforementioned duh moment, I realized that I could just call {% myvar.strip %} {{ myvar.strip }} — because my output is a string and you can use Django’s dot syntax to call methods, dictionary keys, etc.

Duh, I’m a moron.

So this post is written for Google in the hopes that someone else similarly consternated will find this tidbit and be un-consternated.

Posted in Django, Python | 11 Comments

What A Comment Stream Would Look Like In A Meeting

What A Comment Stream Would Look Like In A Meeting

Absolutely friggin’ hilarious. NSFW if you don’t have headphones in…

Posted in Blogmarks | Comments Off on What A Comment Stream Would Look Like In A Meeting

Talking Django at Atlanta Linux Enthusiasts

A quick heads-up to any Atlanta area Pythonistas and Djangoistas, I’ll be giving a brief talk at the the September [Atlanta Linux Enthusiasts meeting](http://www.ale.org/new/index.php). As of this morning their Web site didn’t list the meeting, but it’s Sept. 13 at the Emory Law School.

In other AJC/Django news, [Maura Chace](http://www.notmyself.com/), one of our fantastic Django developers at [the AJC](http://www.ale.org/new/index.php) has a great writeup on [integrating Mint with Django](http://www.notmyself.com/posts/2007/aug/20/minty-django/).

Props to Maura for getting listed in the [Django Weekly Roundup](http://www.djangoproject.com/weblog/2007/aug/26/djangoroundup/)!

Posted in Django, Python | Comments Off on Talking Django at Atlanta Linux Enthusiasts

Still failing, still learning

Still failing, still learning

Lots of good lessons about software project management, project management software, and management in general.

Posted in Blogmarks | Comments Off on Still failing, still learning

The Pmarca Guide to Personal Productivity

The Pmarca Guide to Personal Productivity

I wish I could live a life w/out a schedule, but the rest of the list is something I can maybe do!

Posted in Blogmarks | Comments Off on The Pmarca Guide to Personal Productivity