heisel.org > Blog > 2007 > 08
Blogmarks
I’d like to nominate this for inclusion in the Python stdlib. I use this so often…
My duh moment - Django and it’s lack of strip filter
Thursday | August 30, 2007 | 5:35 pm
Had a total ‘duh’ moment today at work. I wanted to perform the equivalent of Python’s string.strip method on some Django template output.
I looked on the Django documentation site 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 %} — 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.
Permalink | Comments (0) | Categories: Django, Python
Blogmarks
What A Comment Stream Would Look Like In A Meeting
Absolutely friggin’ hilarious. NSFW if you don’t have headphones in…
Talking Django at Atlanta Linux Enthusiasts
Monday | August 27, 2007 | 9:16 am
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. 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, one of our fantastic Django developers at the AJC has a great writeup on integrating Mint with Django.
Props to Maura for getting listed in the Django Weekly Roundup!
Permalink | Comments (0) | Categories: Django, Python
Disclaimer: I work at The Atlanta Journal-Constitution. The opinions expressed here are my own, and do not reflect those of the AJC, Cox Newspapers, Cox Enterprises nor any other party.