Commit 65bce260 authored by Amos Latteier's avatar Amos Latteier

Added examples to Zope. Finally Zope comes with some simple example...

Added examples to Zope. Finally Zope comes with some simple example applications. The current examples include automatic navigation devices, a guestbook, a file library and a shopping cart. The examples make use of new features including ZPT (including macros) and sessions.

I set things up to automatically create an Examples folder in the root if one doesn't already exist. I don't know if this is the right thing to do or not. Maybe folks should have to add examples from the product add list.

If you would like to contribute example applications just let me know. I'm open to contributions.
parent 924c3693
...@@ -49,6 +49,9 @@ Zope Changes ...@@ -49,6 +49,9 @@ Zope Changes
- temporary folder - temporary folder
- Zope will create default sessioning objects on startup - Zope will create default sessioning objects on startup
- Zope will create an Examples folder on startup. This folder
contains a collection of simple example applications.
Bugs Fixed Bugs Fixed
......
...@@ -52,6 +52,14 @@ begin working with the tutorial. ...@@ -52,6 +52,14 @@ begin working with the tutorial.
</p> </p>
</li> </li>
<li>
<p>
Check out the <b>new</b> <a href="Examples">example Zope
applications</a>. These examples show you simple working Zope
applications that you can copy and modify.
</p>
</li>
<li> <li>
<p> <p>
Go to the main <a href="http://www.zope.org/Documentation/" target="_new"> Go to the main <a href="http://www.zope.org/Documentation/" target="_new">
......
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
__doc__='''Application support __doc__='''Application support
$Id: Application.py,v 1.161 2001/11/13 22:02:47 matt Exp $''' $Id: Application.py,v 1.162 2001/11/17 00:00:20 amos Exp $'''
__version__='$Revision: 1.161 $'[11:-2] __version__='$Revision: 1.162 $'[11:-2]
import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_ import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_
import time, traceback, os, string, Products import time, traceback, os, string, Products
...@@ -473,6 +473,14 @@ def initialize(app): ...@@ -473,6 +473,14 @@ def initialize(app):
get_transaction().commit() get_transaction().commit()
del sdm del sdm
# b/c: Ensure that there's an Examples folder with examples
if not hasattr(app, 'Examples'):
examples=app._p_jar.importFile(
os.path.join(Globals.data_dir, 'Examples.zexp'),
clue='Added Examples folder')
app._setObject('Examples', examples)
del examples
# b/c: Ensure that Owner role exists. # b/c: Ensure that Owner role exists.
if hasattr(app, '__ac_roles__') and not ('Owner' in app.__ac_roles__): if hasattr(app, '__ac_roles__') and not ('Owner' in app.__ac_roles__):
app.__ac_roles__=app.__ac_roles__ + ('Owner',) app.__ac_roles__=app.__ac_roles__ + ('Owner',)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment