2.2.
AT product layout
Up one level
Following Zope, Plone and AT's conventions, our InstantMessage product layout will look like this:
- README.txt
- __init__.py
- configure.zcml
- config.py
- permissions.py
- content
- __init__.py
- message.py
- profiles
- default
- skins
- instantmessage
- tests
- __init__.py
- base.py
- test_setup.py
What is the purpose of these files and directories?
- __init__.py: The usual "Python package" initialization module;
- configure.zcml: Using Zope's new Configuration Markup Language (ZCML), this file configures the services or behaviour the Zope server needs to load at startup;
- config.py: Provides configuration variables for the product;
- permissions.py: Provides permission definitions for the content types;
- content: Contains the modules providing the implementation of the content types.
In this case, it contains the message.py file where the
'InstantMessage' class should be defined;
- profiles/default:
Contains a set of XML files that are needed to provide the settings that will be used by Plone's Quick-Installer tool when installing the product within Plone; this is what we call an Extension Profile, an artifact of Zope CMF's GenericSetup technology. Note that this replaces the old way of doing based on the Extensions/Install.py module.
- skins: The container of the subskin directory(ies). Here it contains only one directory where specific UI elements for the InstantMessage (images, templates, scripts) could be added later;
- tests: Contains the unit tests code for the product.
Now we will go through the files one by one and add what we need to produce our Instant Message content type.
product layout appears incomplete
./config.py
./permissions.py
./README.txt
./refresh.txt
./version.txt
./__init__.py
./tests
./tests/base.py
./tests/test_setup.py
./tests/__init__.py
./skins
./skins/instantmessage
./skins/instantmessage/instantmessage_view.pt
./Extensions
./Extensions/Install.py
./content
./content/message.py
./content/__init__.py
This product shows up in my Add/Remove Product page, but the product I created by following the example does not. Is that because my product does not contain the Extensions directory (and Extensions/Install.py)? If so, this page and the installation instructions should be updated.