[Checkins] SVN: grok/branches/philikon-eggs2/doc/ Start updating the tutorial.

Philipp von Weitershausen philikon at philikon.de
Thu Jul 12 09:40:39 EDT 2007


Log message for revision 77735:
  Start updating the tutorial.
  

Changed:
  U   grok/branches/philikon-eggs2/doc/groktut/INSTALL.txt
  U   grok/branches/philikon-eggs2/doc/groktut/a_second_view/buildout.cfg
  U   grok/branches/philikon-eggs2/doc/groktut/a_second_view/setup.py
  U   grok/branches/philikon-eggs2/doc/groktut/a_second_view/src/sample/configure.zcml
  U   grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/buildout.cfg
  U   grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/setup.py
  U   grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/src/sample/configure.zcml
  U   grok/branches/philikon-eggs2/doc/groktut/buildout_tut.cfg
  D   grok/branches/philikon-eggs2/doc/groktut/empty/
  U   grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/buildout.cfg
  U   grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/setup.py
  U   grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/src/sample/configure.zcml
  U   grok/branches/philikon-eggs2/doc/tutorial.txt

-=-
Modified: grok/branches/philikon-eggs2/doc/groktut/INSTALL.txt
===================================================================
--- grok/branches/philikon-eggs2/doc/groktut/INSTALL.txt	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/groktut/INSTALL.txt	2007-07-12 13:40:38 UTC (rev 77735)
@@ -9,43 +9,18 @@
 
 This will download and install buildout. It will create various
 directories, only one of which, ``eggs``, is important. This directory
-contains all Python eggs shared by the tutorial samples.
+contains all Python eggs shared by the tutorial samples.  If you
+already have a directory for sharing eggs with other buildouts, you
+can edit ``buildout_tut.cfg`` and change the ``eggs-directory`` option
+to point to this directory, e.g.::
 
-Then, we need to install Zope 3 and point the tutorial samples to it.
-First, download Zope 3. We will be showing some Unix style
-instructions here - Windows users should download and run the Zope 3
-installer instead. Go to your preferred installation directory (or
-stay in ``groktut``)::
+  [buildout]
+  eggs-directory = /home/me/shared-eggs
 
-  $ wget http://www.zope.org/Products/Zope3/3.3.1/Zope-3.3.1.tgz
-  $ tar xvzf Zope-3.3.1.tgz
-  $ cd Zope-3.3.1
+Now go to the tutorial sample you'd like to look at and launch
+buildout::
 
-We need to tell Zope 3 in which directory it should install itself
-(using ``--prefix``)::
-
-  $ ./configure --prefix=/path/to/zope331
-
-We now make and install it::
-
-  $ make
-  $ make install
-
-Make a note of the Zope 3 installation directory (you too, Windows
-user).
-
-Go back to the ``groktut`` directory and edit the ``buildout_tut.cfg``
-file. Change the ``location`` line to point to your Zope 3
-installation::
-
-  [zope3]
-  # change this to the path to an installed Zope 3 installation
-  location = /path/to/zope331
-
-Now go to the tutorial sample you'd like to look at::
-
   $ cd an_empty_grok_project
-
   $ ../buildout -N
 
 The -N option tells the buildout_ system not to look for newer files
@@ -59,7 +34,7 @@
 tutorial directory you run the buildout script. From the specific
 tutorial directory, you can start up Zope like this::
 
-  $ parts/instance/bin/zopectl fg
+  $ bin/instance fg
 
 Zope should then be running on port 8080 (http://localhost:8080).
 

Modified: grok/branches/philikon-eggs2/doc/groktut/a_second_view/buildout.cfg
===================================================================
--- grok/branches/philikon-eggs2/doc/groktut/a_second_view/buildout.cfg	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/groktut/a_second_view/buildout.cfg	2007-07-12 13:40:38 UTC (rev 77735)
@@ -1,3 +1,3 @@
 [buildout]
-develop = .
+develop = . ../../..
 extends = ../buildout_tut.cfg
\ No newline at end of file

Modified: grok/branches/philikon-eggs2/doc/groktut/a_second_view/setup.py
===================================================================
--- grok/branches/philikon-eggs2/doc/groktut/a_second_view/setup.py	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/groktut/a_second_view/setup.py	2007-07-12 13:40:38 UTC (rev 77735)
@@ -20,9 +20,9 @@
       zip_safe=False,
       install_requires=['setuptools',
                         'grok',
-                        # -*- Extra requirements: -*-
+                        # Add extra requirements here
                         ],
       entry_points="""
-      # -*- Entry points: -*-
+      # Add entry points here
       """,
       )

Modified: grok/branches/philikon-eggs2/doc/groktut/a_second_view/src/sample/configure.zcml
===================================================================
--- grok/branches/philikon-eggs2/doc/groktut/a_second_view/src/sample/configure.zcml	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/groktut/a_second_view/src/sample/configure.zcml	2007-07-12 13:40:38 UTC (rev 77735)
@@ -1 +1,5 @@
-<grok package="." xmlns="http://namespaces.zope.org/grok" />
+<configure xmlns="http://namespaces.zope.org/zope"
+           xmlns:grok="http://namespaces.zope.org/grok">
+  <include package="grok" />
+  <grok:grok package="." />
+</configure>

Modified: grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/buildout.cfg
===================================================================
--- grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/buildout.cfg	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/buildout.cfg	2007-07-12 13:40:38 UTC (rev 77735)
@@ -1,3 +1,3 @@
 [buildout]
-develop = .
+develop = . ../../..
 extends = ../buildout_tut.cfg
\ No newline at end of file

Modified: grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/setup.py
===================================================================
--- grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/setup.py	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/setup.py	2007-07-12 13:40:38 UTC (rev 77735)
@@ -20,9 +20,9 @@
       zip_safe=False,
       install_requires=['setuptools',
                         'grok',
-                        # -*- Extra requirements: -*-
+                        # Add extra requirements here
                         ],
       entry_points="""
-      # -*- Entry points: -*-
+      # Add entry points here
       """,
       )

Modified: grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/src/sample/configure.zcml
===================================================================
--- grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/src/sample/configure.zcml	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/groktut/an_empty_grok_project/src/sample/configure.zcml	2007-07-12 13:40:38 UTC (rev 77735)
@@ -1 +1,5 @@
-<grok package="." xmlns="http://namespaces.zope.org/grok" />
+<configure xmlns="http://namespaces.zope.org/zope"
+           xmlns:grok="http://namespaces.zope.org/grok">
+  <include package="grok" />
+  <grok:grok package="." />
+</configure>

Modified: grok/branches/philikon-eggs2/doc/groktut/buildout_tut.cfg
===================================================================
--- grok/branches/philikon-eggs2/doc/groktut/buildout_tut.cfg	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/groktut/buildout_tut.cfg	2007-07-12 13:40:38 UTC (rev 77735)
@@ -1,50 +1,58 @@
 [buildout]
-parts = data instance test
+parts = data app instance test
 eggs-directory = ../eggs
+find-links = http://download.zope.org/distribution/
 
 [zope3]
-# change this to the path to an installed Zope 3 installation
-location = /path/to/zope331
+# this dead chicken is needed by some other recipe(s)
+location =
 
 [data]
 recipe = zc.recipe.filestorage
 
+[app]
+recipe = zc.zope3recipes:app
+eggs = sample
+site.zcml = <include package="sample" />
+            <include package="zope.app.twisted" />
+
+            <securityPolicy 
+                component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+            <unauthenticatedPrincipal id="zope.anybody"
+                                      title="Unauthenticated User" />
+            <unauthenticatedGroup id="zope.Anybody"
+                                  title="Unauthenticated Users" />
+            <authenticatedGroup id="zope.Authenticated"
+                                title="Authenticated Users" />
+            <everybodyGroup id="zope.Everybody"
+                            title="All Users" />
+            <principal id="zope.manager"
+                       title="Manager"
+                       login="grok"
+                       password_manager="Plain Text"
+                       password="grok"
+                       />
+
+            <!-- Replace the following directive if you don't want
+                 public access -->
+            <grant permission="zope.View"
+                   principal="zope.Anybody" />
+            <grant permission="zope.app.dublincore.view"
+                   principal="zope.Anybody" />
+
+            <role id="zope.Manager" title="Site Manager" />
+            <role id="zope.Member" title="Site Member" />
+            <grantAll role="zope.Manager" />
+            <grant role="zope.Manager"
+                   principal="zope.manager" />
+
 [instance]
-recipe = zc.recipe.zope3instance
-database = data
-user = grok:grok
-eggs = setuptools
-       grok
-       sample
+recipe = zc.zope3recipes:instance
+application = app
+zope.conf = ${data:zconfig}
 
-zcml = zope.annotation
-       zope.copypastemove
-       zope.formlib
-       zope.i18n-meta
-       zope.i18n.locales
-       zope.publisher
-       zope.security-meta
-       zope.size
-       zope.traversing
-       zope.traversing.browser
-       zope.app    
-       zope.app-meta
-       zope.app.securitypolicy
-       zope.app.securitypolicy-meta
-       zope.app.authentication
-       zope.app.catalog
-       zope.app.intid
-       zope.app.keyreference
-       zope.app.twisted
-       grok
-       grok-meta
-       sample
-
 [test]
 recipe = zc.recipe.testrunner
 eggs = sample
-extra-paths = parts/zope3/src
-working-directory = parts/instance
-defaults = ['--tests-pattern', '^f?tests$',
-            '-v'
-           ]
+defaults = ['--tests-pattern', '^f?tests$', '-v']

Modified: grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/buildout.cfg
===================================================================
--- grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/buildout.cfg	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/buildout.cfg	2007-07-12 13:40:38 UTC (rev 77735)
@@ -1,3 +1,3 @@
 [buildout]
-develop = .
+develop = . ../../..
 extends = ../buildout_tut.cfg
\ No newline at end of file

Modified: grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/setup.py
===================================================================
--- grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/setup.py	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/setup.py	2007-07-12 13:40:38 UTC (rev 77735)
@@ -20,9 +20,9 @@
       zip_safe=False,
       install_requires=['setuptools',
                         'grok',
-                        # -*- Extra requirements: -*-
+                        # Add extra requirements here
                         ],
       entry_points="""
-      # -*- Entry points: -*-
+      # Add entry points here
       """,
       )

Modified: grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/src/sample/configure.zcml
===================================================================
--- grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/src/sample/configure.zcml	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/groktut/publishing_a_simple_web_page/src/sample/configure.zcml	2007-07-12 13:40:38 UTC (rev 77735)
@@ -1 +1,5 @@
-<grok package="." xmlns="http://namespaces.zope.org/grok" />
+<configure xmlns="http://namespaces.zope.org/zope"
+           xmlns:grok="http://namespaces.zope.org/grok">
+  <include package="grok" />
+  <grok:grok package="." />
+</configure>

Modified: grok/branches/philikon-eggs2/doc/tutorial.txt
===================================================================
--- grok/branches/philikon-eggs2/doc/tutorial.txt	2007-07-12 13:13:33 UTC (rev 77734)
+++ grok/branches/philikon-eggs2/doc/tutorial.txt	2007-07-12 13:40:38 UTC (rev 77735)
@@ -118,11 +118,10 @@
 
 This tells grokproject to create a new subdirectory called ``Sample``
 and set up the project in there. grokproject will automatically
-download and install Zope 3 and Grok into the project area.  If you
-already have Zope 3.3.x installed, you can save some time and tell
-grokproject to reuse that installation:
+download and install Zope 3 and Grok into the project area.
 
-  $ grokproject --with-zope3=/usr/local/Zope-3.3.1 Sample
+.. XXX when grokproject gains a switch for pointing to a shared egg
+       directory, mention this here.
 
 grokproject will tell you what it will be creating::
 
@@ -166,8 +165,9 @@
   Enter user (Name of an initial administrator user): grok
   Enter passwd (Password for the initial administrator user): grok
 
-Now you have to wait a while as grokproject downloads Grok and
-possibly Zope 3 and sets up the project environment for you.
+Now you have to wait a while as grokproject downloads `zc.buildout`_
+(the system that's used to build the project area), Grok and the Zope
+3 libraries.
 
 After all that, Grok, along with a Zope 3 instance, is ready to go. 
 
@@ -182,7 +182,7 @@
 directory. You can start it (into the foreground) by typing the
 following::
 
-  $ parts/instance/bin/zopectl fg
+  $ bin/instance fg
 
 This will make Zope 3 available on port 8080, and you can log in with
 username ``grok`` and password ``grok``. Assuming you've started up
@@ -219,7 +219,7 @@
 
 Practice restarting Zope now, as you'll end up doing it a lot during
 this tutorial. It's just stopping Zope and starting it again:
-`CTRL-c`` and then ``parts/instance/bin/zopectl fg`` from your Sample
+`CTRL-c`` and then ``bin/instance fg`` from your Sample
 project directory.
 
 An empty Grok project
@@ -247,10 +247,8 @@
 more detail later in this tutorial. (XXX)
 
 We have already seen the ``parts`` directory. This directory contains
-all software installed by grokproject that is not a simple Python
-library. The only part interesting to us right now is the ``instance``
-directory, which contains the ``zopectl`` script to start up Zope which
-we used before.
+configuration and data created by ``buildout``, such as the Zope
+object database (ZODB) instance.
 
 The actual code of the project will all be inside the ``src``
 directory. In it is a Python package directory called ``sample`` with
@@ -276,9 +274,10 @@
 This is the template for your project's welcome page.
 
 What's left is a ``configure.zcml`` file. Unlike in typical Zope 3
-applications, this will only ever contain a single line that registers
-this application with Zope 3. This means we can typically completely
-ignore it, but we'll show it here once for good measure:
+applications, this will only ever contain a few lines that load Grok
+and then register this application with Grok. This means we can
+typically completely ignore it, but we'll show it here once for good
+measure:
 
 .. include:: groktut/an_empty_grok_project/src/sample/configure.zcml
    :literal:



More information about the Checkins mailing list