[Checkins] SVN: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/ more fields for extended demo

Andreas Jung andreas at andreas-jung.com
Sun Oct 26 09:01:56 EDT 2008


Log message for revision 92584:
  more fields for extended demo
  

Changed:
  U   zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/demo_app.py
  U   zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card_template.pt

-=-
Modified: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/demo_app.py
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/demo_app.py	2008-10-26 12:10:31 UTC (rev 92583)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/demo_app.py	2008-10-26 13:01:56 UTC (rev 92584)
@@ -24,7 +24,7 @@
 # register resources directory for demo purposes 
 from zopyx.smartprintng.core import resources
 
-def demo_convert(fullname, orientation='horizontal', debug=False):
+def demo_convert(fullname, orientation='horizontal', phone='', position='', debug=False):
     from zope.app.testing import ztapi
 
     class ITestContent(Interface):
@@ -52,7 +52,7 @@
                      styles=styles,
                      resource_name='demo',
                      converter='pdf-prince',
-                     template_options=dict(fullname=fullname),
+                     template_options=dict(fullname=fullname, phone=phone, position=position),
                      destination_filename=os.path.join(os.getcwd(), 
                                                        '%s%s%s.pdf' % (fullname, orientation_ext, ext)),
                     )

Modified: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card_template.pt
===================================================================
--- zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card_template.pt	2008-10-26 12:10:31 UTC (rev 92583)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card_template.pt	2008-10-26 13:01:56 UTC (rev 92584)
@@ -27,13 +27,15 @@
         </div>
             
         <div class="block" id="address">
-            <span tal:replace="options/fullname | nothing">Andreas Jung</span>
+            <span tal:replace="options/fullname | nothing">Fullname</span>
             <br/>
+            <span tal:replace="options/position| nothing">Position</span>
+            <br/>
             Charlottenstr. 37/1
             <br/>
             D-72070 T&uuml;bingen
             <br/>
-            Tel. +49-(0)7071-793257
+            <span tal:replace="options/phone| nothing">Phone number</span>
             <br/>
             Fax. +49-(0)7071-7936840
             <br/>



More information about the Checkins mailing list