I'm working in a project that creates a Plone 4.3 site that installs plone.app.contenttypes as it's default content types. After site creation I see all default content (the front page and some folders and collections) that are still Archetypes-based content.
I want to avoid the creation of that content and I want to know if there's a better way of getting rid of it that manually erasing it in a post install step.
I need an empty site by default.
You need to setup the Plone Site the following way:
from Products.CMFPlone.factory import addPloneSite
from Products.CMFPlone.factory import _DEFAULT_PROFILE
default_profiles =('plonetheme.classic:default', 'plonetheme.sunburst:default')
return addPloneSite(
app,
site_id,
title=title,
profile_id=_DEFAULT_PROFILE,
extension_ids=default_profiles,
setup_content=False,
default_language='en')
The important part is setup_content=False
.
There's no initial content, no portlet... nothing.
You may check this full working example in ftw.inflator
-> https://github.com/4teamwork/ftw.inflator/blob/00b8b984e7dc1052a7fb94d2e82455a66b271da7/ftw/inflator/bundle.py#L23