Skip to content

Correspondence Technologies

Sections
Personal tools
You are here: Home » Software » SfIndex Demo » collective - PloneOMatic

Package: collective - PloneOMatic

a test of SfIndex product

Sourceforge Info

Project Name: collective
Package Name: PloneOMatic
Files Page:
Browse CVS: http://cvs.sourceforge.net/viewcvs.py/collective/PloneOMatic/  

Package README (CVS ver. 1.5)

PloneOMatic automatically generates the python files and page
templates for a Plone Product.  You create a description of your
product and its classes, then invoke a make() method to generate code
for the product.

Setup
-----

** You cannot run PloneOMatic while Zope is running unless you have
ZEO installed.  If you are running Zope without ZEO, shut down your
Zope instance before running PloneOMatic.  (PloneOMatic imports
ZPublisher in order to use DTML, and this import results in an attempt
to access the ZODB.  Unless ZEO is running, you cannot have more than
one ZODB client, so Zope and PloneOMatic will have a conflict.)

** You will need to have the lib/python directory for your instance of
Zope 2.5.1 in your python path.  To check your path, import sys and
look at sys.path.  If you do not see the lib/python directory, set the
environment variable PYTHONPATH to include the directory and then run
python.

Setting PYTHONPATH:

* in csh: setenv PYTHONPATH YOUR_PATH_HERE
* in bash: export PYTHONPATH=YOUR_PATH_HERE
* in Windows: go to Control Panel, select System, click the Advanced
    tab, click the Environment Variables button, create a new variable
    called PYTHONPATH and set the value to your path.  If you already
    have a PYTHONPATH variable, modify its value to include your Zope
    lib/python directory

Generating the Example Code
---------------------------
testProduct.py provides an example product.  Run testProduct.py to
generate code for a new product in the directory
c:\program files\zope 2.5.1\lib\python\Products\PloneEmployment
You can change the default output directory by modifying the
outputPath variable in testProduct.py.

Installing the Example Code
---------------------------
To use the resulting code, move the generated code to your Products
directory and restart Zope.  Check the Control Panel to make sure the
PloneEmployment product has installed correctly.  Now in your Plone
site add an external method.  Use the following:

Id: install_ploneEmployment
Title: Install PloneEmployment
Module Name: PloneEmployment.Install
Function Name: install

Once you have saved the changes, click the "Test" tab to run the
external method.  The PloneEmployment product will now be installed.

Using the Example Code
----------------------
Log into Plone as a manager.  Choose a folder and click the Folder
Contents tab.  Select "Job Posting" from the pulldown menu on the
right and click "add new item".  Edit your Job Posting.

Customizing the Example Code
----------------------------
PloneOMatic generates code in the output directory you specify.  You
can modify any of the generated code as you see fit.  PloneOMatic adds
an MD5 signature to each piece of code it generates.  Each time it is
run, it checks the signatures for any pre-existing files.  If the
signature for the file's content does not match the signature at the
end of the file, PloneOMatic knows that the file has been hand
modified and will prompt you before overwriting the file.

PloneOMatic generates code using a set of DTML templates.  You can
customize the templates to make PloneOMatic generate code the way you
like it.  Templates are located in the templates subdirectory.

Maintainer: Geoff Davis, geoff AT geoffdavis DOT net
 

Powered by Plone

This site conforms to the following standards: