Hi I have problem I use this code via your server and have error. Help me pls What is reason of this error. Thank you in advance Eeri Rassa SD Toompuiestee 30 Tallinn Estonia Tel: 64 000 40 250 595 44 www.propaganda.ee ---------------------- your server answer -------------------------------------------------- ! System Unavailable This site is currently experiencing technical difficulties. Please contact the site administrator for more information. For additional technical information, please refer to the HTML source for this page. Thank you for your patience. Error type: NameError Error value: bob ---------------------- your server example source cod -------------------------------------------------- <dtml-var standard_html_header> <h2><dtml-var title_or_id></h2> <p> This is the <dtml-var id> Document. </p> <dtml-let name="bob" relation="uncle"> <dtml-var name> is your <dtml-var relation> </dtml-let> <dtml-let x=5 y=7> <dtml-var x><dtml-var y> </dtml-let> <dtml-var standard_html_footer> ----------------------------------------------------------------------
Hi I have problem I use this code via your server and have error. Help me pls What is reason of this error. Thank you in advance ________________________________________ <dtml-var standard_html_header> <h2><dtml-var title_or_id></h2> <p> This is the <dtml-var id> Document. </p> <dtml-let name="bob" relation="uncle"> <dtml-var name> is your <dtml-var relation> </dtml-let> <dtml-let x=5 y=7> <dtml-var x><dtml-var y> </dtml-let> <dtml-var standard_html_footer> _______________________________________ DTML-LET is meant for renaming expressions, like a macro so when you do <dtml-let name="bob" relation="uncle"> <dtml-var name> is your <dtml-var relation> </dtml-let> what actually gets evaluated is <dtml-var "bob"> is your <dtml-var "uncle">, which is nice. the other part <dtml-let x=5 y=7> is rewritten to <dtml-var 5><dtml-var 7> which is not nice at all as there is no variables called 5 and 7. OTOH <dtml-let x="5" y="7"> <dtml-var x><dtml-var y> </dtml-let> should run fine as then x and y are expressions and not variables so <dtml-var x><dtml-var y> is <dtml-var "5"><dtml-var "7"> which runs fine. --------------------- Hannu (BTW, html formaadis maili saatmist listidesse peetakse üldiselt inetuks, eriti loetamatu on see nende jaoks kes saavad oma maili gidest'i kujul)
This is due to a syntax error in the document that I just now fixed. -Michel
<dtml-let name="bob" relation="uncle"> <dtml-var name> is your <dtml-var relation> </dtml-let> <dtml-let x=5 y=7> <dtml-var x><dtml-var y> </dtml-let>
try <dtml-let name='bob' relation='uncle'> When you use the double quotation mark, it processes the content between the double quotes as python code to be executed. Since there is no python code called bob, it fails. Putting single quotes treats the value as a string. --sam
participants (4)
-
Eeri Rassa -
Hannu Krosing -
Michel Pelletier -
Sam Gendler