Author: claytron Date: Sun Oct 31 20:37:36 2010 New Revision: 225804 Modified: collective.developermanual/trunk/source/components/genericsetup.txt collective.developermanual/trunk/source/content/listing.txt collective.developermanual/trunk/source/introduction/developermanual.txt collective.developermanual/trunk/source/misc/paster_templates.txt collective.developermanual/trunk/source/performance/tips.txt collective.developermanual/trunk/source/security/permissions.txt collective.developermanual/trunk/source/templates_css_and_javascripts/xdv.txt collective.developermanual/trunk/source/testing_and_debugging/functional_testing.txt collective.developermanual/trunk/source/testing_and_debugging/unit_testing.txt collective.developermanual/trunk/source/tutorials/buildout/buildoutcfg.txt collective.developermanual/trunk/source/tutorials/buildout/creatingpackage.txt collective.developermanual/trunk/source/tutorials/buildout/deployment.txt collective.developermanual/trunk/source/tutorials/buildout/introduction.txt collective.developermanual/trunk/source/tutorials/buildout/prerequisites.txt collective.developermanual/trunk/source/tutorials/buildout/thirdparty.txt collective.developermanual/trunk/source/tutorials/paste.txt collective.developermanual/trunk/source/tutorials/python.txt collective.developermanual/trunk/source/views/layers.txt Log: fix up sphinx warnings and errors Modified: collective.developermanual/trunk/source/components/genericsetup.txt ============================================================================== --- collective.developermanual/trunk/source/components/genericsetup.txt (original) +++ collective.developermanual/trunk/source/components/genericsetup.txt Sun Oct 31 20:37:36 2010 @@ -260,8 +260,8 @@ ``setuphandlers.py`` example:: -__docformat__ = "epytext" - + __docformat__ = "epytext" + def runCustomCode(site): """ Run custom add-on product installation code to modify Plone site object and others @@ -402,4 +402,4 @@ .. note :: - This example if for Extensions/install.py, old Plone 2 way of writing installers \ No newline at end of file + This example if for Extensions/install.py, old Plone 2 way of writing installers Modified: collective.developermanual/trunk/source/content/listing.txt ============================================================================== --- collective.developermanual/trunk/source/content/listing.txt (original) +++ collective.developermanual/trunk/source/content/listing.txt Sun Oct 31 20:37:36 2010 @@ -32,7 +32,7 @@ The method contentItems is defined in CMFCore/PortalFolder.py. From Plone 4 onwards, you can also use folder.items() instead (this applies to the whole section below). -See source code for details, e.g. filtering and other forms of listing:: +See source code for details, e.g. filtering and other forms of listing Querying folder through catalog ------------------------------- Modified: collective.developermanual/trunk/source/introduction/developermanual.txt ============================================================================== --- collective.developermanual/trunk/source/introduction/developermanual.txt (original) +++ collective.developermanual/trunk/source/introduction/developermanual.txt Sun Oct 31 20:37:36 2010 @@ -139,7 +139,7 @@ make clean html bin/toplone http://admin:admin@localhost:5011/foobar/knowledge-base/test/ - + Upload script will * Is generated when you run buildout (see buildout.cfg) @@ -161,10 +161,10 @@ Upload script does not currently purge the existing uploaded documentation. If pages have been renamed or moved, you need to delete the documentation - on the target site before performing the upload. Just go to + on the target site before performing the upload. Just go to Reference Manual Contents tab, select all and hit delete. -Setting up CSS +Setting up CSS ============== Example ``sphinx.css`` is provided with collective.developermanual @@ -177,11 +177,6 @@ ``sphinx.css`` assumes a special Sphinx *page.html* template is used. This template is modified to wrap everything Sphinx outputs to *sphinx-content* -CSS class, so we can nicely separate them from standard Plone styles. - -``page.html`` can be found from ``sources/_templates/page.html``. - - - +CSS class, so we can nicely separate them from standard Plone styles. - +``page.html`` can be found from ``sources/_templates/page.html``. Modified: collective.developermanual/trunk/source/misc/paster_templates.txt ============================================================================== --- collective.developermanual/trunk/source/misc/paster_templates.txt (original) +++ collective.developermanual/trunk/source/misc/paster_templates.txt Sun Oct 31 20:37:36 2010 @@ -86,7 +86,7 @@ ============== Paster template is defined with a class referred from the entry point. -Here is an example how we extend the existing Plone template class:: +Here is an example how we extend the existing Plone template class Variables and asking for the user input ======================================= @@ -100,8 +100,8 @@ .. note :: - ZopeSkel input definitions should work both on command line and on the web based generator. - + ZopeSkel input definitions should work both on command line and on the web based generator. + Pre- and postcondition triggers =============================== @@ -121,23 +121,23 @@ Filenames and folder names can contain variable substitues as:: - templates/yourtemplatename/+namespace_package+/ - + templates/yourtemplatename/+namespace_package+/ + will be mapped to:: - yourcompany.package/yourcompany/ - + yourcompany.package/yourcompany/ + Template files ============== Files having special ``_tmpl`` extension will have string substitution performed on then. Paster supports `Cheetah templates <http://packages.python.org/Cheetah/users_guide/index.html>`_ - (default) and +(default) and `Python string templates <http://docs.python.org/release/2.5.2/lib/node40.html>`_ Example: -* http://svn.plone.org/svn/collective/collective.dexteritypaste/trunk/collective/dexteritypaste/templates/dexterity/setup.py_tmpl +* http://svn.plone.org/svn/collective/collective.dexteritypaste/trunk/collective/dexteritypaste/templates/dexterity/setup.py_tmpl The best way to get the initial template files and folders for your add-on template is to checkout some existing ZopeSkel package, like *collective.dexteritypaste* and export its @@ -210,7 +210,7 @@ Escaping strings ++++++++++++++++ -If you have any page template (*.pt) files you need to templatetize you will +If you have any page template (``*.pt``) files you need to templatetize you will encounter problem that both Cheetah and Zope Page Templates use the similiar string expansion syntax causing a conflict. @@ -330,13 +330,13 @@ ============================= This checks that your template generates viable code. -We use package called ``gomobiletheme.yourcompany``in this examples. +We use package called ``gomobiletheme.yourcompany`` in this examples. Steps Generate a product skeleton using ``paster`` in non-interactive mode -.. highlight:: console +.. code-block:: console rm -rf src/gomobiletheme.yourcompany ; bin/paster create --no-interactive -v -f -o src -t gomobile_theme gomobiletheme.yourcompany @@ -356,17 +356,17 @@ Run buildout -.. highlight:: console +.. code-block:: console bin/buildout Run :doc:`testrunner </testing_and_debugging/unit_testing>` for the created add-on -.. highlight:: console +.. code-block:: console bin/test -s gomobiletheme.yourcompany See ``bin/paste create --help`` for other useful debug switches. - \ No newline at end of file + Modified: collective.developermanual/trunk/source/performance/tips.txt ============================================================================== --- collective.developermanual/trunk/source/performance/tips.txt (original) +++ collective.developermanual/trunk/source/performance/tips.txt Sun Oct 31 20:37:36 2010 @@ -4,9 +4,9 @@ .. contents :: :local: -.. admonitions:: Description +.. admonition:: Description - Tips for Plone performance tuning and making your add-on product and customizations faster. + Tips for Plone performance tuning and making your add-on product and customizations faster. Debugging slow threads in production ------------------------------------ Modified: collective.developermanual/trunk/source/security/permissions.txt ============================================================================== --- collective.developermanual/trunk/source/security/permissions.txt (original) +++ collective.developermanual/trunk/source/security/permissions.txt Sun Oct 31 20:37:36 2010 @@ -4,7 +4,7 @@ .. admonition:: Description - How to deal with permissions making your code permission aware in Plone + How to deal with permissions making your code permission aware in Plone .. contents :: :local: Modified: collective.developermanual/trunk/source/templates_css_and_javascripts/xdv.txt ============================================================================== --- collective.developermanual/trunk/source/templates_css_and_javascripts/xdv.txt (original) +++ collective.developermanual/trunk/source/templates_css_and_javascripts/xdv.txt Sun Oct 31 20:37:36 2010 @@ -125,10 +125,10 @@ a Plone site, but still want to keep the authoring CSS and any special CSS files that come from add-ons -Example: +Example:: - <drop content="/html/head[style *= - 'portal_css/Plone%20Default/base-cachekey']/style" /> + <drop content="/html/head[style *= + 'portal_css/Plone%20Default/base-cachekey']/style" /> More info Modified: collective.developermanual/trunk/source/testing_and_debugging/functional_testing.txt ============================================================================== --- collective.developermanual/trunk/source/testing_and_debugging/functional_testing.txt (original) +++ collective.developermanual/trunk/source/testing_and_debugging/functional_testing.txt Sun Oct 31 20:37:36 2010 @@ -2,7 +2,7 @@ Functional testing =================== -.. admonition :: +.. admonition:: Description Functional testing tool allows you to use scripted browser to load pages from your site and fill in Modified: collective.developermanual/trunk/source/testing_and_debugging/unit_testing.txt ============================================================================== --- collective.developermanual/trunk/source/testing_and_debugging/unit_testing.txt (original) +++ collective.developermanual/trunk/source/testing_and_debugging/unit_testing.txt Sun Oct 31 20:37:36 2010 @@ -17,18 +17,20 @@ ------------------- Since Plone 4, ``zc.testrunner`` is recommended to use to run the test suites. -You need to add it to your ``buildout.cfg`` to generate ``test`` command:: +You need to add it to your ``buildout.cfg`` to generate ``test`` command. + +.. code-block:: cfg + + parts = + ... + test + + [test] + recipe = zc.recipe.testrunner + defaults = ['--auto-color', '--auto-progress'] + eggs = + ${instance:eggs} - parts = - ... - test - - [test] - recipe = zc.recipe.testrunner - defaults = ['--auto-color', '--auto-progress'] - eggs = - ${instance:eggs} - .. note :: On Plone 3 you can run tests with "bin/instance test" @@ -37,47 +39,47 @@ Running tests for one package -.. highlight:: console +.. code-block:: console bin/test -s package.subpackage Running tests for one test case -.. highlight:: console +.. code-block:: console bin/test -s package.subpackage -t TestCaseClassName - + Running tests for two test cases -.. highlight:: console +.. code-block:: console bin/test -s package.subpackage -t TestClass1|TestClass2 To drop in pdb debugger after each test failure -.. highlight:: console +.. code-block:: console bin/test -s package.subpackage -D - + To exclude tests -.. highlight:: console +.. code-block:: console bin/test -s package.subpackage -t !test_name To list tests that will be run -.. highlight:: console +.. code-block:: console bin/test -s package.subpackage --list-tests - + The following will run tests for *all* Plone and -ons - useful to check whether you have a good component set -.. highlight:: console +.. code-block:: console bin/test - + .. warning:: Test runner does not give an error if you supply invalid package and test case name. @@ -123,8 +125,7 @@ Example (self = unit test):: - self._refreshSkinData() - + self._refreshSkinData() Running add-on installers and extensions profiles for unit tests ----------------------------------------------------------------- @@ -149,10 +150,12 @@ Installing gomobiletheme.basic ... NOT FOUND -You might be missing this from your configure.zcml:: +You might be missing this from your configure.zcml + +.. code-block:: xml + + <five:registerPackage package="." initialize=".initialize" /> - <five:registerPackage package="." initialize=".initialize" /> - ... or you have spelling error in your test setup code. Setting log level in unit tests @@ -177,8 +180,8 @@ You can access it:: - self.portal.REQUEST # Faux HTTPRequest object - + self.portal.REQUEST # Faux HTTPRequest object + Grabbing emails --------------- @@ -190,63 +193,60 @@ Example:: - from zope.component import getUtility, getMultiAdapter, getSiteManager - from zope.component import getUtility, getMultiAdapter, getSiteManager + from zope.component import getUtility, getMultiAdapter, getSiteManager + from Products.MailHost.interfaces import IMailHost + from Products.SecureMailHost.SecureMailHost import SecureMailHost + from Products.CMFCore.utils import getToolByName - from Products.MailHost.interfaces import IMailHost - from Products.SecureMailHost.SecureMailHost import SecureMailHost - from Products.CMFCore.utils import getToolByName - - class DummySecureMailHost(SecureMailHost): - """ Grab outgoing emails """ - - meta_type = 'Dummy secure Mail Host' - def __init__(self, id): - self.id = id - - # Use these two instance attributes to check what email has been sent - self.sent = [] - self.mto = None + + class DummySecureMailHost(SecureMailHost): + """Grab outgoing emails""" - def _send(self, mfrom, mto, messageText, debug=False): - self.sent.append(messageText) - self.mto = mto - - - - ... - - def afterSetUp(self): - - self.loginAsPortalOwner() - sm = getSiteManager(self.portal) - sm.unregisterUtility(provided=IMailHost) - self.dummyMailHost = DummySecureMailHost('dMailhost') - sm.manage_changeProperties({'email_from_address': 'mo...@is...'}) - sm.registerUtility(self.dummyMailHost, IMailHost) - - # Set mail host for tools which use getToolByName() look up - self.MailHost = self.dummyMailHost - - # Make sure that registration tool uses mail host mock - rtool = getToolByName(self.portal, 'portal_registration') - rtool.MailHost = self.dummyMailHost - - .... - - def test_xxx(self): - - # Reset outgoing emails - self.dummyMailHost.sent = [] - - # Do a workflow state change which should trigger content rule - # sending out email - self.workflow.doActionFor(member, "approve_by_sits") - review_state = self.workflow.getInfoFor(member, 'review_state') - self.assertEqual(review_state, "approved_by_sits") - - # Check that email has been sent - self.assertEqual(len(self.dummyMailHost.sent), 1) + meta_type = 'Dummy secure Mail Host' + + def __init__(self, id): + self.id = id + + # Use these two instance attributes to check what email has been sent + self.sent = [] + self.mto = None + + def _send(self, mfrom, mto, messageText, debug=False): + self.sent.append(messageText) + self.mto = mto + + + ... + + def afterSetUp(self): + self.loginAsPortalOwner() + sm = getSiteManager(self.portal) + sm.unregisterUtility(provided=IMailHost) + self.dummyMailHost = DummySecureMailHost('dMailhost') + sm.manage_changeProperties({'email_from_address': 'mo...@is...'}) + sm.registerUtility(self.dummyMailHost, IMailHost) + + # Set mail host for tools which use getToolByName() look up + self.MailHost = self.dummyMailHost + + # Make sure that registration tool uses mail host mock + rtool = getToolByName(self.portal, 'portal_registration') + rtool.MailHost = self.dummyMailHost + + .... + + def test_xxx(self): + # Reset outgoing emails + self.dummyMailHost.sent = [] + + # Do a workflow state change which should trigger content rule + # sending out email + self.workflow.doActionFor(member, "approve_by_sits") + review_state = self.workflow.getInfoFor(member, 'review_state') + self.assertEqual(review_state, "approved_by_sits") + + # Check that email has been sent + self.assertEqual(len(self.dummyMailHost.sent), 1) Unit testing and Zope component architecture -------------------------------------------- @@ -264,71 +264,67 @@ .. code-block:: python - import unittest - + import unittest from base import PaymentProcessorTestCase - - from Products.Five import zcml from zope.configuration.exceptions import ConfigurationError - - from getpaid.paymentprocessors.registry import paymentProcessorRegistry + configure_zcml = ''' <configure xmlns="http://namespaces.zope.org/zope" xmlns:five="http://namespaces.zope.org/five" xmlns:paymentprocessors="http://namespaces.plonegetpaid.com/paymentprocessors" i18n_domain="foo"> - - + + <paymentprocessors:registerProcessor name="dummy" processor="getpaid.paymentprocessors.tests.dummies.DummyProcessor" selection_view="getpaid.paymentprocessors.tests.dummies.DummyButton" thank_you_view="getpaid.paymentprocessors.tests.dummies.DummyThankYou" /> - + </configure>''' - - + + bad_processor_zcml = ''' <configure xmlns="http://namespaces.zope.org/zope" xmlns:five="http://namespaces.zope.org/five" xmlns:paymentprocessors="http://namespaces.plonegetpaid.com/paymentprocessors" i18n_domain="foo"> - - + + <paymentprocessors:registerProcessor name="dummy" selection_view="getpaid.paymentprocessors.tests.dummies.DummyButton" thank_you_view="getpaid.paymentprocessors.tests.dummies.DummyThankYou" /> - - + + </configure>''' - - - - + + + + class TestZCML(PaymentProcessorTestCase): """ Test ZCML directives """ - - + + def test_register(self): """ Check that ZCML entry gets added to our processor registry """ zcml.load_string(configure_zcml) - - + + # See that our processor got registered self.assertEqual(len(papaymentProcessorRegistryistry.items()), 1) - - + + def test_bad_processor(self): """ Check that ZCML entry which has bad processor declaration is caught """ - - + + try: zcml.load_string(bad_processor_zcml) raise AssertionError("Should not be never reached") Modified: collective.developermanual/trunk/source/tutorials/buildout/buildoutcfg.txt ============================================================================== --- collective.developermanual/trunk/source/tutorials/buildout/buildoutcfg.txt (original) +++ collective.developermanual/trunk/source/tutorials/buildout/buildoutcfg.txt Sun Oct 31 20:37:36 2010 @@ -7,14 +7,14 @@ How to manage the main buildout configuration file -**Important note:****This document applies to Plone 3.2 onwards. In +**Important note:** This document applies to Plone 3.2 onwards. In Plone versions prior to 3.2 the vanilla buildout.cfg file was significatively different because Plone wasn't fully eggified. *buildout.cfg* is the most important file in your new buildout environment. Here is how it looks: -:: +.. code-block:: cfg [buildout] parts = @@ -104,7 +104,7 @@ Our global settings are as follows: -:: +.. code-block:: cfg [buildout] parts = @@ -135,7 +135,7 @@ install for us. This may include version specifications. For example, if you want sqlalchemy 0.3, but not 0.4, you could list; -:: +.. code-block:: cfg eggs = sqlalchemy>=0.3,<0.4dev @@ -147,21 +147,20 @@ common problems) version from the "thirdparty" Plone repository in your buildout adding its name to the eggs list: -:: +.. code-block:: cfg - eggs = - PILwoTk + eggs = PILwoTk And the full path to the package in the find-links, e.g.: -:: +.. code-block:: cfg find-links = http://dist.plone.org/thirdparty/PILwoTk-1.1.6.4.tar.gz Finally, we can list development eggs, by specifying a directory where the egg is extracted in source format. For example: -:: +.. code-block:: cfg eggs = my.package @@ -183,7 +182,7 @@ that remote file to see yourself how these dependencies are specified. -:: +.. code-block:: cfg # Change the number here, and in find-links below, to change the version of # Plone being used @@ -194,7 +193,7 @@ to work offline, download it to your buildout directory and reference it like this: -:: +.. code-block:: cfg extends = versions.cfg @@ -206,7 +205,7 @@ If you specified an existing Zope installation, you will not have this part. Otherwise, it looks like this: -:: +.. code-block:: cfg [zope2] recipe = plone.recipe.zope2install @@ -224,12 +223,12 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This uses the -`plone.recipe.distros <http://cheeseshop.python.org/pypi/plone.recipe.distros>`_recipe, +`plone.recipe.distros <http://cheeseshop.python.org/pypi/plone.recipe.distros>`_ recipe, which is able to download distributions (archives) of Zope 2 style products and make them available to Zope. It is empty to begin with: -:: +.. code-block:: cfg [productdistros] recipe = plone.recipe.distros @@ -280,7 +279,7 @@ Here is what the part would look like if we try to install the three distributions above: -:: +.. code-block:: cfg [productdistros] recipe = plone.recipe.distros @@ -300,10 +299,10 @@ The instance section pulls it all together: It configures a Zope instance using the -`plone.recipe.zope2instance <http://cheeseshop.python.org/pypi/plone.recipe.zope2instance>`_script. +`plone.recipe.zope2instance <http://cheeseshop.python.org/pypi/plone.recipe.zope2instance>`_ script. Here is how it looks: -:: +.. code-block:: cfg [instance] recipe = plone.recipe.zope2instance @@ -346,9 +345,9 @@ or packages that lack *z3c.autoinclude* support and are not in the *Products* namespace. To load ZCML files for a regular package, we can make buildout create a ZCML slug by listing the package under -the *zcml*option: +the *zcml* option: -:: +.. code-block:: cfg zcml = my.package @@ -377,7 +376,7 @@ eggs and packages (but not Zope 2 style products) that Zope would have during startup. This can be useful for testing purposes. -:: +.. code-block:: cfg [zopepy] recipe = zc.recipe.egg @@ -391,5 +390,3 @@ When the recipe is run, the script will be created in *./bin/zopepy*. - - Modified: collective.developermanual/trunk/source/tutorials/buildout/creatingpackage.txt ============================================================================== --- collective.developermanual/trunk/source/tutorials/buildout/creatingpackage.txt (original) +++ collective.developermanual/trunk/source/tutorials/buildout/creatingpackage.txt Sun Oct 31 20:37:36 2010 @@ -37,8 +37,8 @@ You will be asked a series of questions. Make sure that the namespace package and package name correspond to the name of the -egg. In this case, the namespace package is *myorg*and the package -name is *mypackage*. In general, answer *False*to the question on +egg. In this case, the namespace package is *myorg* and the package +name is *mypackage*. In general, answer *False* to the question on whether your package if "zip safe". Enter other metadata as requested. Modified: collective.developermanual/trunk/source/tutorials/buildout/deployment.txt ============================================================================== --- collective.developermanual/trunk/source/tutorials/buildout/deployment.txt (original) +++ collective.developermanual/trunk/source/tutorials/buildout/deployment.txt Sun Oct 31 20:37:36 2010 @@ -62,7 +62,7 @@ - Referencing the main *buildout.cfg* file, extending and overriding it with configuration more appropriate for deployment. - Setting up a ZEO server with two client instances, instance**and - *debug-instance* (see `plone.recipe.zope2zeoserver`_and + *debug-instance* (see `plone.recipe.zope2zeoserver`_ and `plone.recipe.zope2instance`_ for more details) - Compiling the Varnish cache server (see `plone.recipe.varnish`_ for more details). @@ -106,7 +106,7 @@ create new recipes, and you can combine existing recipes in powerful ways. Search the `Cheese Shop for "buildout"`_ to find more recipes, or take a look at the -`source code for some of Plone's own recipe`_s to understand how +`source code for some of Plone's own recipes`_ to understand how recipes are created. Modified: collective.developermanual/trunk/source/tutorials/buildout/introduction.txt ============================================================================== --- collective.developermanual/trunk/source/tutorials/buildout/introduction.txt (original) +++ collective.developermanual/trunk/source/tutorials/buildout/introduction.txt Sun Oct 31 20:37:36 2010 @@ -18,7 +18,7 @@ Prior to Plone 3.0, most developers and users who did not use a GUI installer, would set up a Zope instance, drop in a few products -into the *Products*folder, and be done with it. Unfortunately, this +into the *Products* folder, and be done with it. Unfortunately, this approach has a few problems: Modified: collective.developermanual/trunk/source/tutorials/buildout/prerequisites.txt ============================================================================== --- collective.developermanual/trunk/source/tutorials/buildout/prerequisites.txt (original) +++ collective.developermanual/trunk/source/tutorials/buildout/prerequisites.txt Sun Oct 31 20:37:36 2010 @@ -19,7 +19,7 @@ not have one already: -- Install `Python 2.4`_for your platform, and add it to your +- Install `Python 2.4`_ for your platform, and add it to your system *PATH*. It is easiest if Python 2.4 is what you get when you type *python -V* on a command line. Make sure you're using Python 2.4 and not 2.5, since Plone 3.x doesn't support Python 2.5 or Modified: collective.developermanual/trunk/source/tutorials/buildout/thirdparty.txt ============================================================================== --- collective.developermanual/trunk/source/tutorials/buildout/thirdparty.txt (original) +++ collective.developermanual/trunk/source/tutorials/buildout/thirdparty.txt Sun Oct 31 20:37:36 2010 @@ -17,7 +17,7 @@ `PyPi <http://pypi.python.org/pypi>`_ or elsewhere, buildout can download and install it, including any explicitly specified dependencies. Simply list the egg, and optionally a version -(otherwise, you get the latest available), in the *eggs*option. +(otherwise, you get the latest available), in the *eggs* option. :: Modified: collective.developermanual/trunk/source/tutorials/paste.txt ============================================================================== --- collective.developermanual/trunk/source/tutorials/paste.txt (original) +++ collective.developermanual/trunk/source/tutorials/paste.txt Sun Oct 31 20:37:36 2010 @@ -52,8 +52,8 @@ .. warning :: - It is strongly advised to use or install paster in system-wide Python. - Always run paster command run the buildout itself. This way paster is aware of your deployment configuration and local commands + It is strongly advised to use or install paster in system-wide Python. + Always run paster command run the buildout itself. This way paster is aware of your deployment configuration and local commands won't explode on your face. Creating an add-on product skeleton @@ -62,10 +62,10 @@ After you have followed the steps above to add *paster* to your buildout, you can create your first add-on. -.. highlight:: console +.. code-block:: console - cd src # Create src folder if it does not exist yet - ../bin/paster create -t plone yourcompany.productname # will create src/yourcompany.productname folder + cd src # Create src folder if it does not exist yet + ../bin/paster create -t plone yourcompany.productname # will create src/yourcompany.productname folder Some questions are asked to fill in version information, etc. When ``plone`` template asks for *GenericSetup profile* answer ***yes**. @@ -232,4 +232,4 @@ The internet is full of tutorial saying *easy_install ZopeSkel*. If you ever encounter this kind of tutorial, it's wrong. - \ No newline at end of file + Modified: collective.developermanual/trunk/source/tutorials/python.txt ============================================================================== --- collective.developermanual/trunk/source/tutorials/python.txt (original) +++ collective.developermanual/trunk/source/tutorials/python.txt Sun Oct 31 20:37:36 2010 @@ -2,9 +2,9 @@ Python, Plone and Zope ============================ -.. admonition:: +.. admonition:: Description - Python programming language basics and performing Python interpreter installations. + Python programming language basics and performing Python interpreter installations. .. contents :: :local: @@ -14,6 +14,7 @@ ------------- Python is the programming language used by Plone and Zope. + Tutorial and language learning ------------------------------- @@ -63,4 +64,4 @@ .. note:: - TODO: Finish - point to mFabrik log with collective.python.buildout info \ No newline at end of file + TODO: Finish - point to mFabrik log with collective.python.buildout info Modified: collective.developermanual/trunk/source/views/layers.txt ============================================================================== --- collective.developermanual/trunk/source/views/layers.txt (original) +++ collective.developermanual/trunk/source/views/layers.txt Sun Oct 31 20:37:36 2010 @@ -138,12 +138,9 @@ Add-on layer is a marker interface which is applied on :doc:`HTTP request object </serving/http_request_and_response>` by Plone core logic. -First create an an :doc:`interface </components/interfaces>`_ for your layer in ``your.product.interfaces.py`:: +First create an an :doc:`interface </components/interfaces>`_ for your layer in ``your.product.interfaces.py``:: - """ - - Define interfaces for your add-on. - + """Define interfaces for your add-on. """ import zope.interface |