If we want to use built-in portlet manager, template should contain at least proper kss file and content provider:

  >>> from zope.pagetemplate.pagetemplate import PageTemplate
  >>> template = PageTemplate()
  >>> template.write("""
  ... <html xmlns="http://www.w3.org/1999/xhtml"
  ... xmlns:i18n="http://xml.zope.org/namespaces/i18n"
  ... xmlns:tal="http://xml.zope.org/namespaces/tal"
  ... xmlns:metal="http://xml.zope.org/namespaces/metal"
  ... xml:lang="en" lang="en"
  ... i18n:domain="plone"
  ... metal:use-macro="here/main_template/macros/master">
  ...   <head>
  ...     <metal:css_slot fill-slot="css_slot">
  ...       <link type="text/css" rel="kinetic-stylesheet"
  ...         tal:attributes="href string:${context/@@plone_context_state/object_url}/++resource++manage-portlets.kss"/>
  ...     </metal:css_slot>
  ...   </head>
  ...   <body>
  ...     <div metal:fill-slot="main">
  ...       <span tal:replace="structure provider:ContentPortlets" />
  ...     </div>  
  ...   </body>
  ...   </html>""")
  
  >>> template(context=doc)
