ERRATA: To be clear you can do things like
{{ for i in range(3): for j in range(3): for k in range(3): }} hello {{=i+j+k}} {{ pass pass pass }} Indentation is never relevant in views. On Jan 13, 7:59 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > To be clear you can do things like > > {{ > for i in range(3): > for j in range(3): > for j in range(3):}} > > hello {{=i+i+j}} > {{ > pass > pass > pass > > }} > > Indentation is never relevant in views. > > On Jan 13, 7:51 am, Timothy Farrell <tfarr...@swgen.com> wrote: > > > What situation are you in such that your app depends on neatly indented > > HTML? > > > -tim > > > On 1/12/2010 11:52 PM, Iceberg wrote: > > > > I knew this, but I still avoid writing such long paragraph of code in > > > view file. Because I am nervous that maybe someday some developer > > > (other than me) modifies this my_view.html and unintentionally mess up > > > all the indention, as we all know indention is not supposed to be > > > important in a pure html file. Should that happen, my app will be > > > broken. > > > > So I suggest to put your python code into controller whenever you can. > > > When you have to write some python code in view.html, write less, and > > > write them in a many-lines-of-{{blah}} style. > > > > Just my 0.02$ > >
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.