On Tue, Aug 23, 2011 at 9:27 AM, Leandro Severino
<[email protected]> wrote:
>    Then, how to declare a empty variable in template ?  and how to
> make a SUM operation in this variable ?

I don't believe the templating system supports that. You can express
the sum of two variables that you passed to a template but you can't
create set the sum of two variables inside a template; i.e.

You can do this:

<html>$(x+y)</html>

You can't do this:

$z = x+y
<html>$z</html>

I believe this is because the templating system specifically chooses
not to support the assignment operator (AFAICT). Also, it seems to me
that the convention is to compute the values outside of the template
system and then pass them as arguments to the template system, whose
job should only be to display the values.

-- 
  John

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

  • [web... Leandro Severino
    • ... Greg Milby
      • ... Leandro - ProfessionalIT - Soluções em Tecnologia da Informação .
        • ... Greg Milby
    • ... John Fulton
      • ... Anand Chitipothu
        • ... Leandro - ProfessionalIT - Soluções em Tecnologia da Informação .
        • ... John Fulton

Reply via email to