=========================
iw_plone_project template
=========================

Check that the directory does not exist::

    >>> rmdir(tempdir, 'my_project')

Go to a directory::
    
    >>> cd(tempdir)

Then use paster::

    >>> paster('create -t iw_plone_project my_project --no-interactive')
    paster create -t iw_plone_project my_project --no-interactive
    Selected and implied templates:
    ...

Let's see what was generated::

    >>> ls(tempdir, 'my_project')
    - README.txt
    - base.cfg
    - dev.cfg
    - prod.cfg

Let's check the content::

    >>> config_file = join(tempdir, 'my_project', 'base.cfg')
    >>> print open(config_file).read()
    [buildout]
    <BLANKLINE>
    parts =
        plone
        zope2
        ploneproducts
        zopepy
        zopeinstance
    <BLANKLINE>
    find-links =
        http://release.ingeniweb.com/third-party-dist
        http://release.ingeniweb.com/dist.plone.org-mirror
        http://dist.plone.org
        http://download.zope.org/distribution/
        http://products.ingeniweb.com/catalog/simple
        http://private-products.ingeniweb.com/catalog/simple
    <BLANKLINE>
    index = http://release.ingeniweb.com/pypi.python.org-mirror
    <BLANKLINE>
    eggs =
        elementtree
        iw.mailhost
        collective.releaser
    <BLANKLINE>
    extensions = lovely.buildouthttp
    versions = versions
    <BLANKLINE>
    [versions]
    # to be completed
    <BLANKLINE>
    [plone]
    # remove the version and fix it in [versions] asap
    recipe = plone.recipe.plone>=3.1.1,<3.2dev
    <BLANKLINE>
    [ploneproducts]
    recipe = plone.recipe.distros
    urls = 
    nested-packages = 
    version-suffix-packages = 
    <BLANKLINE>
    [zope2]
    recipe = plone.recipe.zope2install
    url = ${plone:zope2-url}
    <BLANKLINE>
    [zopepy]
    recipe = zc.recipe.egg
    eggs = ${zopeinstance:eggs}
    interpreter = zopepy
    extra-paths = ${zope2:location}/lib/python
    <BLANKLINE>
    [zopeinstance]
    recipe = plone.recipe.zope2instance
    zope2-location = ${zope2:location}
    user = admin:
    http-address = 8080
    debug-mode = off
    verbose-security = off
    <BLANKLINE>
    eggs =
        ${buildout:eggs}
        ${plone:eggs}
    <BLANKLINE>
    products =
        ${plone:products}
    <BLANKLINE>
    <BLANKLINE>

We want to build it to make sure everything works::

    >>> build(config_file)
    Creating ...
    ...
    Generated interpreter '...zopepy'.
    >>> ls(os.path.dirname(config_file))
    - .installed.cfg
    - README.txt
    - base.cfg
    d bin
    - dev.cfg
    ...
    d parts
    - prod.cfg
    d var

