Re: [web2py] Template var doesn't appear with leading zero

2011-10-20 Thread Vinicius Assef
I cannot believe I made this mistake! :-O Sure it worked, Richard. Sorry, guys. On Thu, Oct 20, 2011 at 5:23 PM, Richard Vézina wrote: > Sorry, > '%03d'%n > 00n > '%02d'%n > 0n > http://stackoverflow.com/questions/134934/display-number-with-leading-zeros > > Richard > On Thu, Oct 20, 2011 at 3:

Re: [web2py] Template var doesn't appear with leading zero

2011-10-20 Thread Richard Vézina
Sorry, '%03d'%n 00n '%02d'%n 0n http://stackoverflow.com/questions/134934/display-number-with-leading-zeros Richard On Thu, Oct 20, 2011 at 3:17 PM, Richard Vézina wrote: > > Try > '%002d'%n > > Richard > > > On Thu, Oct 20, 2011 at 2:43 PM, Vinicius Assef wrote: > >> Hi guys, >> I'm facin

Re: [web2py] Template var doesn't appear with leading zero

2011-10-20 Thread Richard Vézina
Try '%002d'%n Richard On Thu, Oct 20, 2011 at 2:43 PM, Vinicius Assef wrote: > Hi guys, > I'm facing a little problem here. > > In my view I have: > {{n=3}} > {{='%2d' % n}} > > This shows the number " 3" (a space before the number 3). I expected > it shows "03" (a leading zero). > > Is it the w

[web2py] Template var doesn't appear with leading zero

2011-10-20 Thread Vinicius Assef
Hi guys, I'm facing a little problem here. In my view I have: {{n=3}} {{='%2d' % n}} This shows the number " 3" (a space before the number 3). I expected it shows "03" (a leading zero). Is it the way it should work? I think variable interpolation should mantain its contents when printed to the u