[Zope-dev] Parse.

2000-09-13 Thread Juan Javier Carrera Obrero

Hi !

We are using Zope 2.1.6 for Windows NT Server, and Oracle 8i as RDBMS.

When the ZSQL methods are runned, the values of the parameters of the SQL
query are remplaced by Zope before sending the query to the Oracle database
jet (it does not the "parse").

Thus, if two users runs the same query but with different parameters, it is
considered as two different queries because the values of the parameters of
the ZSQL method are remplaced firstly. When it is realized by more users
with diferent parameters, the Oracle's cache is fulling quickly and it is
overing.

Do exists any way for sending the query of the ZSQL method and theirs
parameters, trying that the values of the parameters was remplaced in the
database jet, and no previously.

Perhaps, it was a ODBC problem, or the Zope code does not allow it. I do not
know it.

Any body can help me ?

Thanks.

JUAN JAVIER CARRERA OBRERO
e-mail: [EMAIL PROTECTED]



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Parse.

2000-09-13 Thread Juan Javier Carrera Obrero

Hi !

We are using Zope 2.1.6 for Windows NT Server, and Oracle 8i as RDBMS.

When the ZSQL methods are runned, the values of the parameters of the SQL
query are remplaced by Zope before sending the query to the Oracle database
jet (it does not the "parse").

Thus, if two users runs the same query but with different parameters, it is
considered as two different queries because the values of the parameters of
the ZSQL method are remplaced firstly. When it is realized by more users
with diferent parameters, the Oracle's cache is fulling quickly and it is
overing.

Do exists any way for sending the query of the ZSQL method and theirs
parameters, trying that the values of the parameters was remplaced in the
database jet, and no previously.

Perhaps, it was a ODBC problem, or the Zope code does not allow it. I do not
know it.

Any body can help me ?

Thanks.

JUAN JAVIER CARRERA OBRERO
e-mail: [EMAIL PROTECTED]



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] ignore

2000-09-13 Thread Matthew Burleigh

me
-- 
- Matthew Burleigh
- Systems Administrator, Digital Creations - publishers of Zope.
- (888)344-4332 -- http://www.digicool.com - http://www.zope.org

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] mailhost problems.. 2.2?

2000-09-13 Thread Chris Withers

James Johnson wrote:
 I can't send mail using Zdebug and PTK latest versions.  Here is the
 error.
 exceptions.TypeError
 Error value: len() of unsized object

Are you sure this isn't a result fo upgrading to Zope 2.2 recently?

we found we had to delete oru existing mailhost objects and create new
ones since the way they were implemented has changed in Zope 2.2...

HTH,

Chris

ZDebug does have it's problems though, which makes a lot of the PTK
break and some other stuff, but I'll try and post more on that later...

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Convert from HTML to DOC or from PDF to DOC.

2000-09-13 Thread Juan Javier Carrera Obrero



Hi,

We are trying to generate a document from Zope with 
a format no HTML. We have used the library "reportlab" (http://www.reportlab.com) to generate it in 
PDF format (with python). It is very useful, however we want now to generate it 
in DOC format (for Microsoft Word).


I know that Microsoft Wordopens a HTML 
document directly, but when I open a HTML document with Microsoft Word (v. 97), 
the document aspect is erased.

Anybody to know any Zope product what allows to 
convert from HTML to Microsoft Word, or from PDF to Microsoft Word, or well, any 
similar way ?

Thanks.

JUAN JAVIER CARRERA OBRERO
e-mail: [EMAIL PROTECTED]



[Zope-dev] INSTANCE_HOME, SOFTWARE_HOME and package_home

2000-09-13 Thread Chris Withers

Evan Simpson wrote:
  f=open('%s/Products/%s.dtml' % (SOFTWARE_HOME,file))
  E:\Zope\2.2.0\lib\python/Products/Squishdot/validArticle.dtml

 f=open('%s/Products/%s.dtml' % (INSTANCE_HOME,file))
  'E:\\Zope\\2.2.0/Products/Squishdot/validArticle.dtml'
 
 This looks correct to me.  

Not to me! :-(

Okay, I can understand (but not approve of) having a mixture of \ and /
in a string (I guess python's open takes care of that) but what's with
the \\ in the INSTANCE_HOME case?! Also be my comment on the /lib/python
bit below ;-)

 If no explicit INSTANCE_HOME is set, it defaults
 to SOFTWARE_HOME minus '/lib/python'.

Can you explain why that makes sense please ;-)
Surely it'd be more useful to default to SOFTWARE_HOME including
'/lib/python' so that old code wasn't broken?

 On the other hand, I wonder why you're constructing '%s/Products/' paths
 explicitly like this.  

It was done by Butch ages ago. He probably did it 'cos it worked and the
'correct' way wasn't documented anywhere :P

 If this code is inside the Product to which you would
 like the path, the proper way to get the path is:
 
 from Globals import package_home
 path = package_home(globals())
 # path now probably equals
 'E:\\Zope\\2.2.0\\lib\\python\\Products\\Squishdot' in your example.

And that'll work in INSTANCE_HOME (in either the base or instance parts)
Zope installs as well as non-instance home ones?

 I have no idea if or where this is documented, sadly.  

no comment ;-)

 I'll definitely put
 it in my 'writing INSTANCE_HOME-friendly Products' howto, as soon as I get
 around to writing such a thing :-/ 

Soon, I hope, 'cos it sounds like a great idea

 Or perhaps you could? ;-)

The biggest thing I think is needed is a clear definition of what all of
these _should_ be and what they _are_. This needs to be done by someone
who understands them all and that's clearly not me ;-)

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Convert from HTML to DOC or from PDF to DOC.

2000-09-13 Thread Phil Harris

You could try converting to RTF.

There are a few HTML-rtf converters around.

- Original Message -
From: Juan Javier Carrera Obrero
To: [EMAIL PROTECTED]
Sent: Wednesday, September 13, 2000 11:53 AM
Subject: [Zope-dev] Convert from HTML to DOC or from PDF to DOC.


Hi,

We are trying to generate a document from Zope with a format no HTML. We
have used the library "reportlab" (http://www.reportlab.com) to generate it
in PDF format (with python). It is very useful, however we want now to
generate it in DOC format (for Microsoft Word).

I know that Microsoft Word opens a HTML document directly, but when I open a
HTML document with Microsoft Word (v. 97), the document aspect is erased.

Anybody to know any Zope product what allows to convert from HTML to
Microsoft Word, or from PDF to Microsoft Word, or well, any similar way ?

Thanks.

JUAN JAVIER CARRERA OBRERO
e-mail: [EMAIL PROTECTED]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Custom dtml tag

2000-09-13 Thread Brett Carter

Andy - looking up 'this' in a dtml method or document won't work
unless you expose it in your python product/tag definition.  I'm
talking about getting 'this' inside a dtml tag that I have defined
myself (i.e. dtml-foobar/dtml-foobar).  If you want 'this'
available in dtml, write an external method and just return 'self'
def this(self): return self
-Brett

 "Andy" == Andy McKay [EMAIL PROTECTED] writes:

Andy Really? Ive looked up this and get nothing (an attribute error actually) and
Andy its not in globals. If that would work that would be great - but a it
Andy certainly doesnt seem to on a standard DTMLDocument / Method.

Andy - Original Message -
Andy From: "Brett Carter" [EMAIL PROTECTED]
Andy To: "Andy McKay" [EMAIL PROTECTED]
Andy Cc: [EMAIL PROTECTED]
Andy Sent: Tuesday, September 12, 2000 4:17 PM
Andy Subject: Re: [Zope-dev] Custom dtml tag


 Andy: here's what I've gleaned - in a dtml tag's render() method, you
 get passed in self and a template dict, in my example let's call it
 'md'.  md is essentially a stack/dictionaryish object of the *current*
 namespace - and one of the handy things that's always around in the
 namespace is the 'this' function, which returns the object on the top
 of the stack.
 
 Just lookup 'this', run it, and there you have a reference to the
 calling object!  Ex:
 
 def render(self, md)
 this = md.getitem('this')
 callingObj = this()
 return "Calling object was %s" % (callingObj.id())
 
 Note I haven't tested this code.  Good luck!
 -Brett
 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] ZPatterns guestbook example

2000-09-13 Thread James Johnson

Hello,
 I ran across a previous post regarding a simple ZPatterns based 
example you  were working on.  Did you ever get it working?  How 
about any other basic working example.  I understand the concept I'm 
not sure on the implementation. What would help me the most is a 
simple step by step guide like this.  Create product folder. Place a 
ZClass derived from dataskin. Go to the default rack and select the 
ZClass as storage.  I understand I have choices where to put the 
methods depending on what I'm trying to achieve. I just want 
to "make" ZPatterns store a single property in the dataskin zclass. 
I've tried putting methods everywhere.  I thought you placed them in 
the specialist and then called 
specialist.propertysheets.Mysheet.manage_whatever().
Now I'm thinking the specialist goes into the dataskin. I think I 
should be able to get a simple working example using a 
specialist,ZClass, and a factory to add the product to the add list.

Get your Free E-mail at http://tacoma.zzn.com

Get your own Web-Based E-mail Service at http://www.zzn.com

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Will the SkinScript How-to help me put together something that works?

2000-09-13 Thread James Johnson

I can't seem to make ZPatterns do anything. Can somebody help me 
out.  I don't need code help just a basic how-to structure a working 
example using real objects, like dtml methods, sql methods or 
whatever.  I really want to use and support the Zope and ZPatterns 
system.  Until then I'm going to keep trying. Thanks
Jim bo

Get your Free E-mail at http://tacoma.zzn.com

Get your own Web-Based E-mail Service at http://www.zzn.com

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Re: ZPatterns guestbook example

2000-09-13 Thread Peter Toneby

On Wed, Sep 13, 2000 at 12:23:52PM -0700, James Johnson wrote:
 Hello,
  I ran across a previous post regarding a simple ZPatterns based 
 example you  were working on.  Did you ever get it working? 

unfourtunatly no, since there are no simple examples that I have seen,
and I haven't had time to try more, and I didn't get a single answer ;(.
So if anyone has a simple exaple of a pure ZPatterns example with no,
or very little use of external methods it would be greatly appreciated
if you could post it.

/Peter
-- 
Alpha Test Version:  Too buggy to be released to the paying public. 
Beta Test Version:  Still too buggy to be released. 
Release Version:  Alternate pronunciation of "Beta Test Version". 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] HiperDOM xmlc

2000-09-13 Thread Lalo Martins

We (I and Hiperlogica, a company I consult with) have been
developing a template renderer with similar intent to xmlc
(be based on XML/DOM, allow the template to be previewed and
edited using tools not aware of the format, such as xHTML
editors, and enforce presentation/logic separation).

As the project is somewhat on hold while we have more pressing
issues, I decided to share the current (rather kludgy)
prototype with the community. It is at
http://www.zope.org/Members/lalo/HiperDOM/

On Mon, Sep 11, 2000 at 02:06:08PM +, Jason Spisak wrote:
 Zope Devers,
 
 THis is going to seem strange coming from someone who hasn't been on the
 list in a long time, but I was at the Linux Expo in San Jose, and sat in on
 a Web app talk.  Lutris was in charge of the panel, and they talked about
 xmlc.  I went to their booth and asked about it. I think it could be the
 best way to get hard-core python people to jump on zope's band-wagon, and
 stop the dtml frowning.
 
 If you who are in the know about zope have time, please read a quick bit on
 what it is.
 
 http://xmlc.enhydra.org
 
 Especially the tutorial:
 
 http://staff.plugged.net.au/dwood/xmlc/index.html
 
 Is there any obvious reason why Zope wouldn't benefit tremendously from
 this design and programming separation and pure python boost?

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Porting EMarket to ZPatterns...possible good example

2000-09-13 Thread James Johnson

I overlooked this posting somehow. I've now actually stored 
something in a ZClass. This seems to be a good working example. 
Thanks so much. I will play with the rest and see what I come up 
with.
I had to post it again just in case others missed it like I did.




Thanks Phillip!

OK. that helped a lot. The problem is that when things don't work
as I expect.. I guess (usually with a high degree of success)
that I am off base. Now I've just been experimenting with
this in a simpler 'dtml-only' way just to clarify how it's 
supposed to work.

I created a simple ZClass with no ZClass based propertysheets.
(The ZClass is called MyTestSkin, subclass of DataSkin)

I created a specialists that manages instances of this ZClass.
(The specialist is called myTest)

I set up the default rack of myTest with a PlugIn SheetProvider
with SheetNames set to ShopperData.

Based on your last email the addShopper method in 'myTest' looks like 
this:

dtml-var standard_html_header
h2dtml-var title_or_id dtml-var document_title/h2
dtml-let newObj=newItem(REQUEST['id'])
dtml-if newObj.propertysheets.manage_addPropertySheet
(id='ShopperData',ns='')
dtml-let newPPS=newObj.propertysheets.get('ShopperData')
dtml-call newPPS.manage_addProperty
(id='email',type='string',value='')
dtml-call newPPS.manage_addProperty
(id='passwd',type='string',value='')
dtml-call newPPS.manage_addProperty
(id='address',type='string',value='')
dtml-call newPPS.manage_changeProperties(REQUEST)
New Shopper Added!
form action=dtml-var myTest.absolute_url()
input type=submit value=OK!
/form

/dtml-let
dtml-else
Cannot add property sheet.
/dtml-if
/dtml-let
dtml-var standard_html_footer

It seems to work OK. Now.. the index_html for my ZClass wants to look 
like this:

dtml-var standard_html_header
h2dtml-var title_or_id dtml-var document_title/h2
p
email: dtml-var emailbr
address: dtml-var addressbr
/p
/dtml-let
dtml-var standard_html_footer

But I get 'KeyError on any attribute. I guess I thought that 
the SheetProvider would kick in when a request was made for 'email'
and automagically search the instances propertysheets for an
attribute that matched. The following did work however:

dtml-var standard_html_header
h2dtml-var title_or_id dtml-var document_title/h2
dtml-let myPPS=propertysheets.get('ShopperData')
p
email: dtml-var myPPS.getProperty('email')
address: dtml-var myPPS.getProperty('address')
/p
/dtml-let
dtml-var standard_html_footer


This doesn't seem quite right to me... when I use a 
GenericAttributeProvider
that talks to a database... I can just say dtml-var foo and it 
works.
I'm sure I'm still not getting something... but I don't know what. I 
can look
at:

/myTest/a/propertysheets/ShopperData/manage

and it allows me to edit the instance's property sheet through
the web.. I was hoping (and maybe this is really really just
wrong...) that there was some 'central' propertsheet that could
be modified and thereby give all instances new properties.. sorta
like ZClass property sheets... 

Anyway.. I'm now off to try SkinScripts with these test cases...

thanks!
-steve


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



 End Original Message 


Get your Free E-mail at http://tacoma.zzn.comGet your own Web-Based E-mail Service at http://www.zzn.com

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )