validate the css validate the xhtml

HackerMoJo.com


Ceci n'est pas une blog
by Glenn Franxman, Stunt Programmer.

Reversed publishing with Django

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.


Comments

1#1

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!

2#2

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?

3#3

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...

4#4

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.

Post a comment


Based upon your reading habits, might I recommend:

Or, you might like:

Copyright © 2003,2004,2005,2006,2007,2008 GFranxman. All Rights Reserved


hosting: slicehost.com. powered by: django. written in: python. controlled by: bzr. monsters by: monsterID.

You've been exposed to: {'Programming': 1}