posted: 2008-06-25 15:41:21 perma-link, RSS comments feed
>>> from django.core.template import * >>> c = Context( { 'ctnt': 'this is a test' } ) >>> t = Template( """ {{ ctnt|slice:"::-1" }} """ ) >>> t.render( c ) ' tset a si siht ' >>>
badum-dum-chh.
Glenn Franxman commented, on June 25, 2008 at 6:14 p.m.:
I was being a smartass. Someone was bugging me for 'reversed publishing' support. I felt that the world needed more smartass. I was in a position to oblige. I do what I can. It's the little things, ya know?
Clark commented, on July 5, 2008 at 7:50 p.m.:
You type 157 characters that only display 11 characters... just to be a smart ass?
The subtlety and humor of the coder is once again lost on us normal folks...
Thomas Hibbard commented, on July 31, 2008 at 12:08 p.m.:
As someone who also gets bugged for 'reversed publishing' I found it funny. I guess I'm not one of the normal folks.
|
Based upon your reading habits, might I recommend: Or, you might like: Our search engine suggests Google App Engine for django. |
hosting: slicehost.com.
powered by: django.
written in: python.
controlled by: bzr.
monsters by: monsterID.
You've been exposed to: {'Life': 3.6188736789661218, 'Business': 0.25928330130215277, 'Science & Technology': 0.85264078340104676, 'The Net': 2.2322137574109178, 'Programming': 1.5842750393032259, 'Piss & Moan': 0.045438804747810362, 'Obsession': 1.2946996589045874, 'Cool': 0.039357896020978243}
Joel Bernstein commented, on June 25, 2008 at 4:14 p.m.:
It occurs to me that you could use this to render lists (or really anything sliceable) in reverse order as well.
Neat!