Hello everyone, This is my first post to this mailing-list, and I wish to say that I find Zope incredibly usefull ... it makes me do my very first website. Any way, I've got a python module which parse a file containing recipes, I asume I'll write an ExternalMethod that will take an argument and return a structire (a dictionnary) with all the relevant informations. I did a small page template that show all these informations. What I want to do is to show the recipe by calling this url : GetRecipe/My Recipe/show_recipe.zpt (I suppose I'll have to encode the space too). is this possible ?? I tried with a python script (returning a dictionnary) but it did not work ... BTW : I suppose I can do something like <span tal:define="recipe python:here.GetRecipe('My Recipe')"> <p tal:content="recipe/yield>yield</p> ... </span> But I find it not elegant ... and it wouldn't generate easyly the list of all the recipe ... Happy pythoning, happy zoping ... -- (°> Nicolas Évrard / ) Liège - Belgique ^^
=?iso-8859-1?Q?Nicolas_=C9vrard?= writes:
This is my first post to this mailing-list, and I wish to say that I find Zope incredibly usefull ... it makes me do my very first website.
Any way, I've got a python module which parse a file containing recipes, I asume I'll write an ExternalMethod that will take an argument and return a structire (a dictionnary) with all the relevant informations. I expect, your ExternalMethod is "GetRecipe" ?
I did a small page template that show all these informations.
What I want to do is to show the recipe by calling this url :
GetRecipe/My Recipe/show_recipe.zpt (I suppose I'll have to encode the space too).
is this possible ?? If you answer my question above with "yes", my answer will be "no", it is not possible.
"GetRecipe" must be a "traversable" object for "GetRecipe/My_Recipe" to work. It might be done with a Python Script and its "traversal_subpath" feature. Read about it in (e.g.) the Zope Book. It is not very easy, maybe not the best starting task. Dieter
* Dieter Maurer [23:20 31/07/02]:
=?iso-8859-1?Q?Nicolas_=C9vrard?= writes:
This is my first post to this mailing-list, and I wish to say that I find Zope incredibly usefull ... it makes me do my very first website.
Any way, I've got a python module which parse a file containing recipes, I asume I'll write an ExternalMethod that will take an argument and return a structire (a dictionnary) with all the relevant informations. I expect, your ExternalMethod is "GetRecipe" ?
Right, that's my first choice. A product seems too much in this case.
I did a small page template that show all these informations.
What I want to do is to show the recipe by calling this url :
GetRecipe/My Recipe/show_recipe.zpt (I suppose I'll have to encode the space too).
is this possible ?? If you answer my question above with "yes", my answer will be "no", it is not possible.
Maybe with a product
"GetRecipe" must be a "traversable" object for "GetRecipe/My_Recipe" to work. It might be done with a Python Script and its "traversal_subpath" feature. Read about it in (e.g.) the Zope Book.
Or I can use an ExternalMethod which get the information and a script to ease the interface with the zpt. Not elegant tough ... (Is it good english ??)
It is not very easy, maybe not the best starting task.
Yep, I know but I've already done some stuff and that's the next one on my agenda. I could maybe pass to another task to get XP but interfacing with my python Module seemed fairly easy. The problem is : I want elegance, I'll struggle to have it. Maybe a product will help ... -- (°> Nicolas Évrard / ) Liège - Belgique ^^
participants (2)
-
Dieter Maurer -
Nicolas Évrard