z3 Project Starter
Visually, the final product is very plain - but this is intentional. I wanted to produce templates and CSS that could quickly and easily be changed. An added benefit of this simplicity, is its usefulness as instruction for new-comers.
This script asks you a few questions, and then generates a fully-functional z3 site. Here is an example run:
What is the name of your project? My New Site Please confirm: Whould you like your project to be named 'My New Site'? [Y/n] y What would you like the top-level package to be named? [mynewsite] What would you like to name the project skin? [MyNewSite] Where would you like to install the project (usually Z3_INSTANCE/lib/python)? [/home/zope/z310/lib/python] Please confirm: Whould you like to install your project in '/home/zope/z310/lib/python'? [Y/n] y Project name: My New Site Package name: mynewsite Skin name: MyNewSite Install dir: /home/zope/z310/lib/python Creating directories and populating with base files... Your new z3 project has been created! Don't forget to copy mynewsite/etc/mynewsite-configure.zcml into your z3 instance etc/package-includes directory. You may now create a 'My New Site Page' for your project in the ZMI using the new entry in the "Add" menu. Afterwards, you may view it at the following URL: http://yourhost:8080/++skin++MyNewSite/page_name
After this script runs, you can copy the config file mentioned in the final output, and then restart zope. You now have a fully-functional site to start shaping to meet your needs. The first two files you will want to begin modifying are:
mynewsite/browser/skin/templates/macros_styles.pt mynewsite/browser/skin/templates/main_template.pt
as these will let you give your site whatever look and feel you want. To make more sophisticated changes, you will want to consult with the two execllent z3 books that have been written, the quick starts available on the internet, as well as the Zope3-Users mail list.
The complete list of files this script creats are listed below:
mynewsite/__init__.py mynewsite/browser/__init__.py mynewsite/browser/configure.zcml mynewsite/browser/menus.zcml mynewsite/browser/pageview.py mynewsite/browser/skin/__init__.py mynewsite/browser/skin/configure.zcml mynewsite/browser/skin/images/1px.gif mynewsite/browser/skin/standardmacros.py mynewsite/browser/skin/styles/z3.css mynewsite/browser/skin/templates/macros_content.pt mynewsite/browser/skin/templates/macros_nav.pt mynewsite/browser/skin/templates/macros_styles.pt mynewsite/browser/skin/templates/main_template.pt mynewsite/browser/skin/templates/pageview.pt mynewsite/ChangeLog mynewsite/configure.zcml mynewsite/etc/mynewsite-configure.zcml mynewsite/INSTALL mynewsite/TODO mynewsite/types/__init__.py mynewsite/types/configure.zcml mynewsite/types/interfaces.py mynewsite/types/page.py mynewsite/vocab.py
Comment
Not working with Zope3.3
Posted by: kevingill2 at 2007-04-11I tried to get this working in Zope3.3.
The MessageID incompatibility was easy to solve.
However, I could not find the replacement for zapi.getView(). I tried the zapi.getMultiAdapter(), but the result (SimpleComponentTraverser) did not have a render method.
I never got this product working.