Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Is it possible to reassign to a new variable name in a Mako template?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tom Stratton  
View profile  
 More options Oct 23 2012, 6:49 pm
From: Tom Stratton <t...@tomstratton.net>
Date: Tue, 23 Oct 2012 15:49:01 -0700 (PDT)
Local: Tues, Oct 23 2012 6:49 pm
Subject: Is it possible to reassign to a new variable name in a Mako template?

Hi -

Very new and struggling a little. The Mako community could benefit greatly
from more examples on the website - if I every "get it" I'll try to
contribute.

I'm trying to use Mako NOT for html page output but to create a relative
simple way for a client to format output from another script. What I was
hoping to do was pass a dictionary into the render  and then reassign the
different pieces of the dict to variable names in the template.

Seems that if I ever have a ${} on the right hand side of any assignment
then I get an error...

<%
foo= 'some values'
%>
${foo}

works but if I try

<%
foo= ${somevariable}
%>
${foo}

it always generates an error.

Am I simply not going to be able to do this?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.