[Checkins] SVN: zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/ updated

Andreas Jung andreas at andreas-jung.com
Sun Oct 19 05:38:49 EDT 2008


Log message for revision 92375:
  updated
  

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-19 09:35:11 UTC (rev 92374)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/demo_app.py	2008-10-19 09:38:49 UTC (rev 92375)
@@ -7,20 +7,29 @@
 
 
 import os
+from zope.interface import Interface, implements
 
 # initialize/register all HTML transformations
 import zopyx.smartprintng.core.transformation
 from zopyx.smartprintng.core.highlevel import convert
+from zopyx.smartprintng.core.interfaces import IImageFetcher
+from zopyx.smartprintng.core.adapters import ExternalImageFetcher
 
-from zope.interface import Interface, implements
+from zope.app.testing import ztapi
 
+from zopyx.smartprintng.core.renderer import Renderer
+from zopyx.smartprintng.core.interfaces import IImageFetcher
+from zopyx.smartprintng.core.adapters import ExternalImageFetcher
 
+
 class ITestContent(Interface):
     pass
 
 class TestContent(object):
     implements(ITestContent)
 
+ztapi.provideAdapter(ITestContent, IImageFetcher, ExternalImageFetcher)
+
 # register resources directory for demo purposes 
 from zopyx.smartprintng.core import resources
 
@@ -39,7 +48,7 @@
                          resource_name='demo',
                          converter='pdf-prince',
                          template_options=dict(fullname=fullname),
-                         destination_filename='%s.pdf' % fullname,
+                         destination_filename=os.path.join(os.getcwd(), '%s.pdf' % fullname),
                         )
                         
         print 'Generated:', os.path.abspath(result)

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-19 09:35:11 UTC (rev 92374)
+++ zopyx.smartprintng.core/trunk/zopyx/smartprintng/core/demo2/resources/business_card_template.pt	2008-10-19 09:38:49 UTC (rev 92375)
@@ -8,6 +8,8 @@
     </head>
     <body>
         <div id="logo">
+
+            <img src="http://zopyx.com/test_resources/zopyx1.png" />
         </div>
         <div id="desc">
             <ul>
@@ -15,10 +17,10 @@
             Python, Zope &amp; Plone
                 </li>
                 <li>
-            Software-Entwicklung
+            Software Development
                 </li>
                 <li>
-            Beratung
+            Training and Coaching
                 <li>
             E-Publishing, Web-to-Print
             </li>



More information about the Checkins mailing list