[Zope3-french-user] Debutant sous Five :-)
Philippe Bouige
pbouige at pasteur.fr
Lun 19 Fév 14:07:05 CET 2007
Bonjour,
Je me présente je travaille sous Zope + Plone avec le produit
Five. Les versions que j'utilise sont :
(Zope 2.8.8-final, python 2.3.5, win32)
J'essaye de me mettre à Five et ça me pose pas mal de
problème. Je trouve dommage que le site de Five ne donne pas
plus de documentation et surtout d'exemples.... c'est un peu
maigre. Du coup j'essaye de mettre des exemples Zope 3 à la
sauce Five ;-).
exemple http://wwww.treefernwebservices.co.nz/hello.html
1) repertoire FiveHello2
2) fichier __init__.py
3) fichier 'configure.zcml'
<configure
xmlns="http://namespaces.zope.org/zope">
<include package=".browser" />
</configure
4) repertoire 'browser'
5) dans 'browser"
un fichier __init__.py vide
6) un fichier views.py
from zope.app.publisher.browser import BrowserView
class HelloView(BrowserView):
""" Il faut une docstring
"""
def __call__(self):
return """ <html> <head><title>Hello
World</title><head><body> Hello World </body></html> """
7) un fichier 'configure.zcml'
<configure
xmlns="http://namespaces.zope.org/browser">
<page
for="*"
name="hello2"
permission="zope.Public"
class=".views.HelloView"
/>
</configure>
8) je relance zope/plone
9) http://localhost:8080/hello2
et ne fonctionne pas. Dans log j'ai:... (voir ci-dessous)
une idée de l'erreur ? une astuce pour deboguer plus facilement
qu'en regardant le fichier log qui ne donne pas trop de
renseignements ?
Ou trouver une doc détaillée de 'zcml' et de son usage ?
Merci d'avance pour votre aide.
LOG
2007-02-19T14:03:32 INFO ZServer HTTP server started at Mon Feb
19 14:03:32 2007
Hostname: gnome
Port: 80
------
2007-02-19T14:03:32 INFO ZServer HTTP server started at Mon Feb
19 14:03:32 2007
Hostname: gnome
Port: 8080
------
2007-02-19T14:03:41 WARNING Init Class
Products.ATContentTypes.content.base.ATCTFolderMixin has a
security declaration for nonexistent method 'manage_copyObjects'
------
2007-02-19T14:03:44 WARNING OFS.Application Duplicate Product
name
After loading Product 'Five' from 'C:\\Program Files\\Plone
2\\Data\\Products',
I skipped the one in 'C:\\Program Files\\Plone
2\\Zope\\lib\\python\\Products'.
------
2007-02-19T14:03:44 INFO PlacelessTranslationService Applying
patch
*** Patching ZPublisher.Publish with the get_request patch! ***
------
2007-02-19T14:03:47 WARNING Plone Deprecation Warning
CustomizationPolicies are deprecated and will be removed in Plone
3.0. Please use GenericSetup extension profiles instead.
------
2007-02-19T14:03:47 WARNING Plone Deprecation Warning
registerSetupWidget is deprecated and will be removed in Plone
3.0.
------
2007-02-19T14:03:47 WARNING Plone Deprecation Warning
registerSetupWidget is deprecated and will be removed in Plone
3.0.
------
2007-02-19T14:03:47 WARNING Plone Deprecation Warning
CustomizationPolicies are deprecated and will be removed in Plone
3.0. Please use GenericSetup extension profiles instead.
------
2007-02-19T14:03:56 INFO Zope Ready to handle requests
------
2007-02-19T14:05:02 ERROR Zope.SiteErrorLog
http://localhost:8080/hello2
Traceback (most recent call last):
File "C:\Program Files\Plone
2\Zope\lib\python\ZPublisher\Publish.py", line 108, in publish
transactions_manager.recordMetaData(object, request)
File "C:\Program Files\Plone
2\Zope\lib\python\Zope2\App\startup.py", line 266, in
recordMetaData
path = '/'.join(object.getPhysicalPath() + to_append)
TypeError: sequence item 1: expected string, NoneType found
Plus d'informations sur la liste de diffusion zope3-french-user