7170----- Original Message ---- From: Jonathan <dev101@magma.ca> Here is the page that I need to quote, and this is why I need triple quotes: print """ <html> <body> <tal:block metal:define-macro="main"> <tal:content metal:use-macro="here/templates/protect/macros/strong"></tal:content> <div tal:condition="here/Quotes | nothing" tal:content="structure here/s/getRandomQuote" /> <table width="100%" border="0" cellspacing="0" cellpadding="0" background="images/header_bg.jpg" class=header> <tr> <td width="76"><img src="images/header_left.jpg" alt="" width="76" height="37"></td> <td align="right"><tal:block metal:define-slot="headline"><span tal:replace="template/title_or_id" /></tal:block></td> <td width="76"><img src="images/header_right.jpg" alt="" width="76" height="37"></td> </tr> </table> <table width="95%" border="0" cellspacing="0" cellpadding="0" class=main align="center"> <tr> <td><br> <!-- START TEXT SLOT --> <tal:block metal:define-slot="text"></tal:block> <!-- END TEXT SLOT --> </td> </tr> <tr> <td> <br /> <br/> <!-- START FOOTER SLOT --> <tal:block metal:define-slot="footer"> <span metal:use-macro="here/templates/frame_footer/macros/main"></span> </tal:block> <!-- END FOOTER SLOT --> </td> </tr> </table> </tal:block> </body> </html> """ return printed ____________________________________________________________________________________ Want to start your own business? Learn how on Yahoo! Small Business. http://smallbusiness.yahoo.com/r-index
+-------[ Nancy Donnelly ]---------------------- | 7170 | ----- Original Message ---- | From: Jonathan <dev101@magma.ca> | | Here is the page that I need to quote, and this is why I need triple quotes: | | print """ | <html> | <body> | | <tal:block metal:define-macro="main"> | <tal:content metal:use-macro="here/templates/protect/macros/strong"></ | tal:content> | <div | tal:condition="here/Quotes | nothing" | tal:content="structure here/s/getRandomQuote" /> | <table width="100%" border="0" cellspacing="0" cellpadding="0" background= | "images/header_bg.jpg" class=header> | <tr> | <td width="76"><img src="images/header_left.jpg" alt="" width="76" height= | "37"></td> | <td align="right"><tal:block metal:define-slot="headline"><span tal:replace= | "template/title_or_id" /></tal:block></td> | <td width="76"><img src="images/header_right.jpg" alt="" width="76" height= | "37"></td> | </tr> | </table> | <table width="95%" border="0" cellspacing="0" cellpadding="0" class=main align= | "center"> | <tr> | <td><br> | | <!-- START TEXT SLOT --> | <tal:block metal:define-slot="text"></tal:block> | <!-- END TEXT SLOT --> | | </td> | </tr> | <tr> | <td> | | <br /> <br/> | | <!-- START FOOTER SLOT --> | <tal:block metal:define-slot="footer"> | <span metal:use-macro="here/templates/frame_footer/macros/main"></span> | </tal:block> | <!-- END FOOTER SLOT --> | | | </td> | </tr> | </table> | | </tal:block> | | </body> | </html> | """ | return printed It's not going to process the TAL or METAL. Triple quotes are no different to single quotes when it comes to strings. -- Andrew Milton akm@theinternet.com.au
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - --On 7. Dezember 2006 12:31:32 -0800 Nancy Donnelly <nancydonnelly2006@yahoo.com> wrote:
7170----- Original Message ---- From: Jonathan <dev101@magma.ca>
Here is the page that I need to quote, and this is why I need triple quotes:
The question is why Rachel did not read the Python tutorial: <http://docs.python.org/tut/node5.html> - -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFeHweCJIWIbr9KYwRApGMAKCxjf36pnmMGG92QO8AxHPw45nF8ACg1YPS 371x764b6JJQmOV4qgGdBz0= =/NPv -----END PGP SIGNATURE-----
+-------[ Andreas Jung ]---------------------- | -----BEGIN PGP SIGNED MESSAGE----- | Hash: SHA1 | | | | - --On 7. Dezember 2006 12:31:32 -0800 Nancy Donnelly | <nancydonnelly2006@yahoo.com> wrote: | | > 7170----- Original Message ---- | > From: Jonathan <dev101@magma.ca> | > | > Here is the page that I need to quote, and this is why I need triple | > quotes: | | The question is why Rachel did not read the Python tutorial: | | <http://docs.python.org/tut/node5.html> Who is Rachel? d8) -- Andrew Milton akm@theinternet.com.au
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 7 Dec 2006, at 21:41, Andrew Milton wrote:
| The question is why Rachel did not read the Python tutorial: | | <http://docs.python.org/tut/node5.html>
Who is Rachel? d8)
Rachel is Nancy is countless other names. Someone who apparently has a good reason to hide his or her true identity. No, I'm not kidding. I got it from the horse's mount (Nancy/Rachel/etc). jens -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFeIZxRAx5nvEhZLIRAhiEAKCj42pEPC5SwQTCeVr8gOtLD6NcUwCeNo32 EJKp4M8D0jSRaAKZTHilKWU= =viJ6 -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - --On 7. Dezember 2006 22:24:01 +0100 Jens Vagelpohl <jens@dataflake.org> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 7 Dec 2006, at 21:41, Andrew Milton wrote:
| The question is why Rachel did not read the Python tutorial: | | <http://docs.python.org/tut/node5.html>
Who is Rachel? d8)
Rachel is Nancy is countless other names. Someone who apparently has a good reason to hide his or her true identity.
No, I'm not kidding. I got it from the horse's mount (Nancy/Rachel/etc).
I can second that. Nancy posted some days ago as Nancy on the plone-users list and signed her mail as Rachel....anything more to say? Trying to fool us with multiple faked identities considers the predicate "numptard". Let's ignore him/her forever on any Zope list. - -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFePyxCJIWIbr9KYwRAgs3AJ9I7HDLRb4cIkNW7BXZYGY+pAVtnACfT4eg BUXFqvmw+8DGctsUElI1Hw4= =SC8D -----END PGP SIGNATURE-----
Here is the page that I need to quote, and this is why I need triple quotes: Wrong.
1. Log into ZMI. 2. Create PageTemplate object named 'mypage' 3. Edit 'mypage' that it contains your html code (this what you gave into triple quotes before): <html> (...) </html> 4. create Script (Python) called 'myscript' 5. Edit script that it contains only one line: return context.mypage() # mypage is name of PageTemplate from point 2. -- Maciej Wisniowski
participants (5)
-
Andreas Jung -
Andrew Milton -
Jens Vagelpohl -
Maciej Wisniowski -
Nancy Donnelly