==============
plone template
==============

Use paster::

    >>> paster('create -t plone_basic plone.example --no-interactive')
    paster create -t plone_basic plone.example --no-interactive
    ...

Let's check the content::

    >>> package_dir = os.path.join('plone.example', 'src',
    ...                            'plone', 'example')
    >>> ls(package_dir)
    __init__.py
    configure.zcml
    testing.py
    testing.zcml
    tests

If we state that we want a GS profile, the template should create that for us::

    >>> paster('create -t plone_basic plone.example --no-interactive add_profile=True')
    paster create -t plone_basic plone.example --no-interactive add_profile=True
    ...

Check to ensure that the package structure is correct::

    >>> package_dir = os.path.join('plone.example', 'src',
    ...                             'plone', 'example')
    >>> ls(package_dir)
    __init__.py
    configure.zcml
    profiles
    testing.py
    testing.zcml
    tests
    
The profiles directory should contain a 'default' folder with a metadata.xml 
file inside and a testing profile folder::

    >>> ls(package_dir, 'profiles')
    default
    testing
    >>> ls(package_dir, 'profiles', 'default')
    metadata.xml
    >>> ls(package_dir, 'profiles', 'testing')
    metadata.xml

We need to verify that the metadata.xml file looks correct and that the configure.zcml file now contains a profile registration::

    >>> cat(package_dir, 'profiles', 'default', 'metadata.xml')
    <?xml version="1.0"?>
    <metadata>
      <version>0001</version>
    </metadata>
    <BLANKLINE>
    >>> cat(package_dir, 'configure.zcml')
    <configure
    ...
      <genericsetup:registerProfile
          name="default"
          title="plone.example"
          directory="profiles/default"
          description="Installs the plone.example package"
          provides="Products.GenericSetup.interfaces.EXTENSION"
          />
    ...


