$(myscript).js

On Tue, Jan 12, 2010 at 7:05 PM, Angelo Gladding <ang...@gladding.name>wrote:

> Look, a $string.
>> Hark, an ${arbitrary + expression}.
>> Gawk, a $dictionary[key].function('argument').
>> Cool, a $(limit)ing.
>>
>
> http://webpy.org/docs/0.3/templetor
>
> On Tue, Jan 12, 2010 at 6:49 PM, jlist9 <jli...@gmail.com> wrote:
>
>> Hi,
>>
>> I'd like to print a string "myscript.js" in HTML output. The "myscript"
>> part
>> of the output is passed in as a variable. However, the "." seems to be
>> causing
>> the templator to interpret the "." as Python code and I get an error:
>>
>> AttributeError: 'str' object has no attribute 'js'
>>
>> Here's the template:
>>
>> $def with(myscript)
>> $myscript.js
>>
>> Similarly, if I want to concatenate a static string with a variable in
>> a template,
>> is there a way to do that? In other words, I can use $$ to escape $, is
>> there
>> a way to escape "." and "" (empty string to separate the variable and the
>> static text)?
>>
>> Thanks,
>> Jack
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "web.py" group.
>> To post to this group, send email to we...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> webpy+unsubscr...@googlegroups.com <webpy%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/webpy?hl=en.
>>
>>
>>
>>
>
>
> --
> Angelo Gladding
> ang...@gladding.name
>



-- 
Angelo Gladding
ang...@gladding.name
--
You received this message because you are subscribed to the Google Groups "web.py" group.
To post to this group, send email to we...@googlegroups.com.
To unsubscribe from this group, send email to webpy+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webpy?hl=en.

Reply via email to