[Zope-dev] Creating a new product, adding methods

Thomas Weholt thomas@cintra.no
Thu, 11 May 2000 18:47:11 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_000D_01BFBB79.514B75C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I`ve made a product based on 'Boring Product' and would like to use my =
own python-objects and methods. I got objects and methods in a seperate =
file, let`s call it 'my_stuff.py'. ( very impressive, I know :-> )

How can I use my methods in dtml-docs without using them as external =
methods? I do have a working product, so I guess I could import them or =
init. them there, but how?

Say my module has a function 'testMe' that takes a couple of arguments =
and returns a string. How can I call this method from dtml??

Is there are doc on this subject, creating a product, adding features =
etc. where most of the stuff are done in old-fashioned python-code? I =
want to add stuff like methods, objects and functions using Python, not =
the Zope-interface.

And, finally, is it normal procedure to return the results from methods =
and functions as formatted html, or should the formatting be done in the =
dtml-document itself??

Thanks.

Thomas

------=_NextPart_000_000D_01BFBB79.514B75C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I`ve made a product based on 'Boring =
Product' and=20
would like to use my own python-objects and methods. I got objects and =
methods=20
in a seperate file, let`s call it 'my_stuff.py'. ( very impressive, I =
know=20
:-&gt; )</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>How can I use my methods in dtml-docs =
without using=20
them as external methods? I do have a working product, so I guess I =
could import=20
them or init. them there, but how?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Say my module has a function 'testMe' =
that takes a=20
couple of arguments and returns a string. How can I call this method =
from=20
dtml??</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there are doc on this subject, =
creating a=20
product, adding features etc. where most of the stuff are done in =
old-fashioned=20
python-code? I want to add stuff like methods, objects and functions =
using=20
Python, not the Zope-interface.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>And, finally, is it normal procedure to =
return the=20
results from methods and functions as formatted html, or should the =
formatting=20
be done in the dtml-document itself??</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thomas</FONT></DIV></BODY></HTML>

------=_NextPart_000_000D_01BFBB79.514B75C0--