The manual says:

"You never need to (and never should) call the response.write method
explicitly."

It is more of a style suggestion than a technical suggestion. There is
no reason not to use it except that, in a distant future, in case we
should rewrite the template engine using a parser instead of regex,
and we need to remove response.write, I want to be able to say "I told
you so" and the removal cannot be considered a breaking of backward
compatibility. ;-)

On Jan 13, 9:26 pm, Anand Vaidya <anandvaidya...@gmail.com> wrote:
> @Thaddeus:
>
> I re-read Ch5 (Views) in the Official Manual and it does mention
> "never should use response.write()"  Pg129
>
> regards
> Anand
>
> On Jan 14, 12:48 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
>
> > score 1 for web2py's freaking awesome template system!
>
> > -Thadeus
>
> > On Wed, Jan 13, 2010 at 8:00 AM, mdipierro <mdipie...@cs.depaul.edu> wrote:
> > > 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<web2py%2bunsubscr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/web2py?hl=en.
>
>
-- 
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.


Reply via email to