[Zope] newbie -- creating a Product
Amanda A.
mnstrmr at gmail.com
Mon Nov 6 08:54:46 EST 2006
Thanks, I will try the external method.
However, what I was really hoping for was an explanation of the
Product creation part -- if I can create and get this very simple
Product to work, I can begin to understand this facet of Zope and make
more complex Products.
OK, forget the email attachment detail of my question. I am confused
here: I have tried to create the product both from the ZMI (which
does not allow the creation of __init__.py's) and via command line
(in ~/Products, in lib/Python, everywhere that the sparse and
conflicting information I have been able to gather tells me). Doing
the latter I can certainly create the __init__.py but the Product
doesn't register with zope.
Thanks.
On 11/6/06, Jonathan <dev101 at magma.ca> wrote:
>
>
> ----- Original Message -----
> From: "Aidan" <mnstrmr at gmail.com>
> To: <zope at zope.org>
> Sent: Sunday, November 05, 2006 10:28 PM
> Subject: [Zope] newbie -- creating a Product
>
>
> > I'm a complete Zope novice. Forgive me if my question is inane.
> >
> > I need to be able to send an e-mail (following a form submit) with an
> > attachment
> > (and I prefer not to use DTML). I can send e-mails withOUT attachments,
> > but
> > according to this:
> > http://mail.zope.org/pipermail/zope/2005-May/159291.html
> >
> > I need to create
> >
> >
> > "a simple product like this:
> >
> > EmailTools/__init__.py
> > ------------------- contents ---------------------------------
> > from AccessControl import allow_module, allow_class, allow_type
> > from AccessControl import ModuleSecurityInfo, ClassSecurityInfo
> >
> > from email.MIMEText import MIMEText
> > from email.MIMEMultipart import MIMEMultipart
> > from email.MIMEBase import MIMEBase
> > from email.Header import Header
> > from MailCrypt import signmail
> > from email.Encoders import encode_base64
> >
> > allow_class(BlockFormatter)
> > allow_class(MIMEBase)
> > allow_class(MIMEText)
> > allow_class(MIMEMultipart)
> > allow_class(Header)
> > allow_class(signmail)
> > allow_class(encode_base64)
> > ---------------------------------------------------------------
> > "
> >
> >
> >
> > This then will allow me to send attachments using
> >
> > from Products.EmailTools import
> > MIMEText,MIMEBase,MIMEMultipart,Header,encode_base64
> >
> > in the python script. (Without the EmailTools product Zope tells me I am
> > not
> > allowed to import MIME*)
> >
> >
> > This is where my question comes in. I have tried to create the product
> > both from
> > the ZMI (which does not allow the creation of __init__.py's) and via
> > command
> > line (in ~/Products, in lib/Python, everywhere that the sparse and
> > conflicting
> > information I have been able to gather tells me). Doing the latter I can
> > certainly create the __init__.py but the Product doesn't register with
> > zope.
> >
> >
> > Could someone give a quick walk-through (or point to an up-to-date
> source)
> > on
> > how to create this Product?
> >
> > (I am running Zope 2.8.6-final, python 2.4.3, linux2)
>
> For a single task like you have described it may be easier to create a
> simple external method.
>
>
> Jonathan
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20061106/7815079f/attachment.htm
More information about the Zope
mailing list