[Grok-dev] skin object not find ++skin++plus
DIVINE, PAUL (PAUL)
paul.divine at alcatel-lucent.com
Fri Aug 13 07:30:54 EDT 2010
Hello grokkers,
I am using the great book "Grok 1.0" of Carlos de la Guardia,
at the chapter 11 "Key Concepts Behind Grok". The purpose is to add a skin chooser with second package called todo_plus.
After http://xxxx/++skin++plus/todo/index
NotFound: Object: <zope.site.folder.Folder object at 0x279bb90>, name: u'++skin++plus'
It seems that the second package is not in action.
Thanks in advance for your help.
Paul
The following lines give the context in details.
the todo_plus configure.zcml is given in the following lines
(testgrok)pl6320:~/npo/testgrok/todo/src/todo_plus/todo_plus# cat configure.zcml
<configure xmlns="http://namespaces.zope.org/zope"
xmlns: mail="http://namespaces.zope.org/mail"
xmlns: grok="http://namespaces.zope.org/grok">
<include package="grok" />
<includeDependencies package="." />
<grok:grok package="." />
<mail:smtpMailer
name="todoplus.smtp"
hostname="mail.example.com"
port="25"
username="cguardia"
password="password"
/>
<mail:queuedDelivery
name="mailer"
permission="zope.Public"
mailer="todoplus.smtp"
queuePath="mailqueue"
/>
</configure>
the todo_plus setup.py is given in the following lines
(testgrok)pl6320:~/npo/testgrok/todo/src/todo_plus# cat setup.py
from setuptools import setup, find_packages
import sys, os
version = '0.0'
setup(name='todo_plus',
version=version,
description="",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='',
author_email='',
url='',
license='',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,
install_requires=[
'todo',
'zc.sourcefactory',
'zope.sendmail',
# -*- Extra requirements: -*-
],
entry_points="""
# -*- Entry points: -*-
""",
)
(testgrok)pl6320:~/npo/testgrok/todo/src/todo_plus#
The buildout.cfg is given in the following lines.
(testgrok)pl6320:~/npo/testgrok/todo# cat buildout.cfg
[buildout]
extends = http://grok.zope.org/releaseinfo/1.1.1/versions.cfg
extends-cache = extends-cache
find-links = http://grok.zope.org/releaseinfo/1.1.1/eggs/
develop = .
src/todo_plus
parts =
app
debug_ini
deploy_ini
i18n
mkdirs
site_zcml
test
zope_conf
zpasswd
interactive_debugger
# For backward compatibility, telling buildout not to throw away
# the data and log subdirectories from the parts directory.
data
log
newest = false
versions = versions
# eggs will be installed in the default buildout location
# (see .buildout/default.cfg in your home directory)
# unless you specify an eggs-directory option here.
extensions = buildout.dumppickedversions
find-links = http://download.zope.org/distribution
[versions]
# Override versions here.
zc.resourcelibrary = 1.0.1
[app]
recipe = zc.recipe.egg
eggs = todo
todo_plus
z3c.evalexception>=2.0
Paste
PasteScript
PasteDeploy
site.zcml = <include package="todo_plus" />
interpreter = python-console
[deploy_ini]
recipe = collective.recipe.template
input = etc/deploy.ini.in
output = ${buildout:parts-directory}/etc/deploy.ini
#host = 127.0.0.1
host = xxx.xxx.xxx.xxx
#port = 8080
port = 8880
[debug_ini]
recipe = collective.recipe.template
input = etc/debug.ini.in
output = ${buildout:parts-directory}/etc/debug.ini
#host = 127.0.0.1
host = xxx.xxx.xxx.xxx
#port = 8080
port = 8880
# this section named so that the i18n scripts are called bin/i18n...
[i18n]
recipe = z3c.recipe.i18n:i18n
packages = todo
eggs = todo
domain = todo
output = src/todo/locales
zcml = <include package="todo_plus" />
[mkdirs]
recipe = z3c.recipe.mkdir
paths =
${zope_conf:filestorage}
${zope_conf:logfiles}
${zope_conf:blobstorage}
[site_zcml]
recipe = collective.recipe.template
input = etc/site.zcml.in
output = ${buildout:parts-directory}/etc/site.zcml
[test]
recipe = zc.recipe.testrunner
eggs = todo
defaults = ['--tests-pattern', '^f?tests$', '-v']
[zope_conf]
recipe = collective.recipe.template
input = etc/zope.conf.in
output = ${buildout:parts-directory}/etc/zope.conf
filestorage = ${buildout:directory}/var/filestorage
blobstorage = ${buildout:directory}/var/blobstorage
logfiles = ${buildout:directory}/var/log
extra =
# 'extra' is copied verbatim. Use it for product config sections and so.
# This section is named so that the zpasswd utility is
# called `zpasswd`
[zpasswd]
recipe = z3c.recipe.dev:script
eggs =
todo
zope.password
module = zope.password.zpasswd
method = main
[interactive_debugger]
recipe = z3c.recipe.dev:script
eggs = todo
module = grokcore.startup.startup
method = interactive_debug_prompt
arguments = zope_conf="${zope_conf:output}"
# The [data] and [log] parts are still in here to instruct buildout to not
# unintentionally throw away the parts/data and parts/log subdirectories
# that contain the Data.fs and the log files. These files should be
# copied to the new locations. See the upgrade notes for more information.
[data]
recipe = zc.recipe.filestorage
[log]
recipe = zc.recipe.filestorage
(testgrok)pl6320:~/npo/testgrok/todo#
The app.py file contains the following lines.
(testgrok)pl6320:~/npo/testgrok/todo/src/todo_plus/todo_plus# cat app.py
only extract
class PlusLayer(IDefaultBrowserLayer):
grok.skin('plus')
class HeadPlus(grok.Viewlet):
grok.viewletmanager(HeadSlot)
grok.context(Interface)
grok.name('head')
grok.template('head_plus')
grok.layer(PlusLayer)
Paul
More information about the Grok-dev
mailing list