[Zope] How to pass parameters to dtml methods in making dtml-call

2000-12-15 Thread Dirksen

Hi,

The case is like this: 

dtml-var "some_dtml_method(_.None, _, para='blablabla')"
Works fine.

dtml-call "some_dtml_method(_.None, _, para='blablabla')"
The system complains the para being unknown. How come?

cheers
Dirksen

__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

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




[Zope] Best Zope way to split a textfield on 2000 char increments

2000-12-15 Thread Chris Beaumont

Hi,

I just realized I need to split a potentially pretty long textfield 
input from a web form into 2000 character chunks, for input into a 
database. I see a lot of string functions in DTML, but none that 
looks like it will do this..

I'm hoping to use this as a  workaround for the seeming lack of LONG 
text field support in the Oracle DA. (please correct me if I'm wrong 
on this..but I cant seem to get it to work..) I'm using Oracle 7.3

Thanks..

Chris

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




Re: [Zope] Best Zope way to split a textfield on 2000 char increments

2000-12-15 Thread Chris Withers

Chris Beaumont wrote:
 
 Hi,
 
 I just realized I need to split a potentially pretty long textfield
 input from a web form into 2000 character chunks, for input into a
 database. I see a lot of string functions in DTML, but none that
 looks like it will do this..

Use a Python Script:


paramsyourstring/params
offset = 0
list=[]

while offset + 2000  len(yourstring):
list.append(yourstring[:2000])
offset = offset + 2000

list.append(yourstring[offset:])

return list

then you can do:

dtml-in yourexternalmethod

...with the 2000 char chunks.

Well, hope this helps. I'm sure there's at least one off-by-one bug in
the above. It'd be a lot easier to do if regular expressions were
available in python scripts:

return re.findall('.{0,2000}',yourstring)

...but sadly we're not allowed to use regular expressions in pythno
scripts in case we break something :-((

cheers,

Chris

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




Re: [Zope] IE5 / Medusa bug?

2000-12-15 Thread Martijn Pieters

On Fri, Dec 15, 2000 at 08:48:18AM +0100, Jerome Alet wrote:
 On Thu, 14 Dec 2000, Evan Simpson wrote:
 
  From: seb bacon [EMAIL PROTECTED]
   I imagine the fact that I can make it work by adding index_html is the
   most telling point, but it's not telling me anything ;)
  
  Leaving off index_html causes Zope to add a base href to the head.  That's
 
 WHOW !
 
 base href is exactly 11 bytes long. Couldn't it be that the
 content-length is computed by Zope before you automatically add this tag ? 

This indeed *seems* to be the problem with this server, the content-length
is 14 bytes (not 11) too short. This isn't a general Zope bug however,
only a bug with this particular server.

Zope adds \nbase href="http://test.jamkit.com/"\n, which is 39 bytes
extra (including newlines):

  sneek:~ telnet test.jamkit.com 80
  Trying 213.210.4.254...
  Connected to 213.210.4.254.
  Escape character is '^]'.
  GET / HTTP/1.0
  Host: test.jamkit.com
  
  HTTP/1.0 200 OK
  Server: Zope/Zope 2.2.2 (source release, python 1.5.2, linux2) ZServer/1.1b1
  Date: Fri, 15 Dec 2000 09:53:15 GMT
  Content-Type: text/html
  Content-Length: 4226
  
  !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"
  htmlhead/head
  head
  base href="http://test.jamkit.com/"
  titleWebFactory/title
  
  [SNIP rest of content]

Note the content lenght of 4226. Now compare with /index_html:

  sneek:~ telnet test.jamkit.com 80
  Trying 213.210.4.254...
  Connected to 213.210.4.254.
  Escape character is '^]'.
  GET /index_html HTTP/1.0
  Host: test.jamkit.com
  
  HTTP/1.0 200 OK
  Server: Zope/Zope 2.2.2 (source release, python 1.5.2, linux2) ZServer/1.1b1
  Date: Fri, 15 Dec 2000 09:53:50 GMT
  Content-Type: text/html
  Content-Length: 4201
  
  !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"
  htmlhead/head
  headtitleWebFactory/title
  meta content="text/html; charset=iso-8859-1" http-equiv=content-type
  
  [SNIP rest of content]

Note again the content length, 4201. Now, 4226 - 4201 = 25. It seems we
lost 14 bytes of content!

However, I cannot reproduce this on my 2.2.4 server, or a Zope 2.2.2
source install, or on www.zope.org. All produce the correct number of
bytes sent! Even better, if you don't send the host header to the
test.jamkit.com server, you get www.cemcrem.com, which sends the correct
lengths as well!

All this points to something wrong with the particular server itself.
Either there is a proxy in between that recalculates the content length
(and forgets about \r\n conbos or some such thing), or you modified the
Zope source somewhere, or you are doing something else funny.

-- 
Martijn Pieters
| Software Engineer  mailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
-

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




[Zope] error by adding Poll

2000-12-15 Thread Kaeidinejad, Shahram

Hi 
i install Poll-0.7.1 and try to add it.
but i get an erro like this:

Cannot locate object at:
 
http://192.168.190.238:23456/Test_Folder/manage_addProduct/Poll/manage_addSa
mplePollItem


Traceback (innermost last): File
/dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/Publish.py, line 222, in
publish_module File
/dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/Publish.py, line 187, in
publish File /dgn-devel01/opt/Zope-2.2.4/lib/python/Zope/__init__.py, line
221, in zpublisher_exception_hook File
/dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/Publish.py, line 162, in
publish File
/dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/BaseRequest.py, line 366,
in traverse File
/dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/HTTPResponse.py, line 539,
in debugError NotFound: (see above) 

what do i false?

bye

shahram


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




Re: [Zope] multiple selects are not allowed

2000-12-15 Thread Diny van Gool

Hi,

Thank you for your answer.

At 15:19 13-12-00 +0100, Dario Lopez-Kästen wrote:
- Original Message -
From: "Jose Soares" [EMAIL PROTECTED]
Subject: Re: [Zope] multiple selects are not allowed
 from ZSQL Methods User's Guide, last row on pag. 22:
 "Note that no more than one SQL select statement may be used in a single
 SQL Database Method."

Diny, why do you need to execute multiple selects in one SQL-Method?

Belief me, you don't want to know ;)

I'm building a database application for the drugstore department.
Veterinarians can find medicines by searching on animal, ingredients,
diseases etc. When they've found one medicine all the detailed information
about this particular medicine is being displayed. At this point i thought
i could use the multiple selects.
The medicine has a 1 to many relationship with animals, ingredients,
diseases etc. all stored in different tables. When i use one single select
statement with several where conditions, and one relationship isn't filled,
the query returns nothing at all.

Maybe there is another way of doing it?

I'll split up one complex ZSQL method into several simple methods.

Regards,

Diny

DIVA, Faculty of Veterinary Medicine
Utrecht University,  The Netherlands
http://www.vet.uu.nl 

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




Re: [Zope] multiple selects are not allowed

2000-12-15 Thread Ivan Cornell


 Diny, why do you need to execute multiple selects in one SQL-Method?
 
 Belief me, you don't want to know ;)

 I'm building a database application for the drugstore department.
 Veterinarians can find medicines by searching on animal, ingredients,
 diseases etc. When they've found one medicine all the detailed information
 about this particular medicine is being displayed. At this point i thought
 i could use the multiple selects.
 The medicine has a 1 to many relationship with animals, ingredients,
 diseases etc. all stored in different tables. When i use one single select
 statement with several where conditions, and one relationship isn't filled,
 the query returns nothing at all.

 Maybe there is another way of doing it?
 
 I'll split up one complex ZSQL method into several simple methods.


Without seeing your queries, I would say use sql's UNION command, eg,

SELECT name FROM animals WHERE id =21 UNION SELECT name FROM diseases WHERE id
=21;

regards, Ivan


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




[Zope] Re: [Zope-dev] IE5 / Medusa bug?

2000-12-15 Thread Toby Dickenson

On Thu, 14 Dec 2000 22:10:20 +, seb bacon [EMAIL PROTECTED] wrote:

I'll continue my research by eliminating elements until I've nailed down
exactly the bit that's messing it up.  Right now, though, I have to go
to bed.  Meanwhile, any comments?


Something very strange is going on.

I am accessing the page using 

* IE (5.50.4134.0600) - I do see the "ta"
* Navigator (4.6) - I dont see the "ta" and it is
  a complete /table/html in the page source

However, both browsers are using a Squid proxy cache, so I can check
the size of content transferred by each request Both browsers are
transferring 4561 bytes.

I hope this helps,

Toby Dickenson
[EMAIL PROTECTED]

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




[Zope] Dreamweaver, webdav and Zope

2000-12-15 Thread Max Møller Rasmussen

I have just upgraded to DreamWeaver 4.0. Lo and behold, it has webDav
support.

I can open the site in DreamWeaver and it looks just great. It would be a
really, I mean REALLY, nice management interface for Zope.

Two problems though:

1) I cannot open my dtml methods in Dreamweaver as they have no
extensions. Appart from giving them extensions has anybody had succes with
this in Dreamweaver? I can solve it by dragging them onto an empty page, but
that ain't to neat. It also only gives the code view.

2) The files that DreamWeaver gets over is rendered html files. So it is
not actually dtml, but the html resulting from the dtml method. Anybody has
a clue to why this is?

Regards

Max M

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




[Zope] ZCatalog raises index out of range exception error

2000-12-15 Thread Martin Winkler

Hi listies,

On a client's server I created a ZCatalog, but when using "Find Items to 
ZCatalog" and clicking on "Find" in the form, Zope raises the "list index 
out of range" error shown in detail at the end of this e-mail. Then I took 
the whole Data.fs, put it on one of our servers, where everything worked as 
usual.

Since our client wants to create various ZCatalogs, he has to use this 
functionality :-/

Any ideas where to start looking for the reason of this error?

Our client's server's configuration is the following:
Zope version: Zope 2.2.4 (source release, python 1.5.2, linux2) [ I have 
also tried with 2.2.2 source]
Python version: 1.5.2 (#1, Aug 25 2000, 09:33:37) [GCC 2.96 2731 
(experimental)]
System Platform: linux-i386 [RedHat 7.0]

Any help is greatly appreciated!

Martin
___
Here is the output when I submit the form "Find Items to ZCatalog":

Error Type: IndexError
Error Value: list index out of range

Traceback (innermost last):
   File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 
222, in publish_module
   File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 
187, in publish
   File /usr/local/Zope-2.2.4-src/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
 (Object: Traversable)
   File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 
171, in publish
   File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/mapply.py, line 
160, in mapply
 (Object: manage_catalogFoundItems)
   File /usr/local/Zope-2.2.4-src/lib/python/ZPublisher/Publish.py, line 
112, in call_object
 (Object: manage_catalogFoundItems)
   File /usr/local/Zope-2.2.4-src/lib/python/Products/ZCatalog/ZCatalog.py, 
line 321, in manage_catalogFoundItems
 (Object: Traversable)
IndexError: (see above)


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




[Zope] oops - crash bang sent unfinished zcatalog and reindex

2000-12-15 Thread Jonathan Cheyne

Sorry about that - the message re zcatalog and reindexing just sent
itself - unfinished! then crashed and failed to save in sent. v strange,
but to complete ...

If I edit an instannce of my zclass and change a keyword from say europe
to Europe then the search works correctly but the following code snippet
reveals that both europe AND Europe are now stored despite the fact that
europe will not return any matches.

If I update the catalog then europe disappears. My zclass calls
dtml-call reindex_object after updating the properties. I know this
works because the search does return correctly as I said.

Clues?

dtml-in "Catalog.uniqueValuesFor('keywords')" sort=sequence-item
a href="search?key=dtml-var sequence-item url_quote_plus"dtml-var
sequence-item/abr
/dtml-in

Jonathan


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




[Zope] CoreSessionTracking Release 0.2

2000-12-15 Thread Chris McDonough

I had some reports yesterday of the Core Session Tracking development code
not working against recent Zope 2.2 releases, so I removed dependencies in
the code on the Interface module which were causing the incompatibilities.
CoreSessionTracking 0.1 will work against Zope 2.3a1, but not against Zope
2.2.3, 2.2.4, etc.

A new release of the code which has these dependencies removed, 0.2, is
available from
http://www.zope.org/Members/mcdonc/Products/CoreSessionTracking .  This
release works against all Zope 2.2.X based systems, AFAIK.

Thanks!

- Chris



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




RE: [Zope] Best Zope way to split a textfield on 2000 char increments

2000-12-15 Thread Steve Drees

 I just realized I need to split a potentially pretty long textfield 
 input from a web form into 2000 character chunks, for input into a 
 database. I see a lot of string functions in DTML, but none that 
 looks like it will do this..


string slices.

somestring[:1999] is the first 2000 characters of somestring.


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




RE: [Zope] Best Zope way to split a textfield on 2000 char increments

2000-12-15 Thread Jerome Alet

On Fri, 15 Dec 2000, Steve Drees wrote:

 somestring[:1999] is the first 2000 characters of somestring.

Not to be a poseur but:

somestring[:1999] is the first 1999 characters of somestring, because
in Python indices begin at 0, e.g.:

a="0123"
print a[:3] gives "012" which are the first 3 characters from a.

bye,

Jerome Alet 


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




Re: [Zope] error by adding Poll

2000-12-15 Thread Bill Welch

Manage_addSamplePollItem is a 'legacy' mapped to addItem (see
Poll/__init__.py) and Hotfix_2000-12-8 shuts down the legacy mechanism. I
went into itemAdd.dtml changed it to use addItem directly.

Bill.

On Fri, 15 Dec 2000, Kaeidinejad, Shahram wrote:

 Hi 
 i install Poll-0.7.1 and try to add it.
 but i get an erro like this:
 
 Cannot locate object at:
  
 http://192.168.190.238:23456/Test_Folder/manage_addProduct/Poll/manage_addSa
 mplePollItem
 
 
 Traceback (innermost last): File
 /dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/Publish.py, line 222, in
 publish_module File
 /dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/Publish.py, line 187, in
 publish File /dgn-devel01/opt/Zope-2.2.4/lib/python/Zope/__init__.py, line
 221, in zpublisher_exception_hook File
 /dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/Publish.py, line 162, in
 publish File
 /dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/BaseRequest.py, line 366,
 in traverse File
 /dgn-devel01/opt/Zope-2.2.4/lib/python/ZPublisher/HTTPResponse.py, line 539,
 in debugError NotFound: (see above) 
 
 what do i false?
 
 bye
 
 shahram
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 


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




Re: [Zope] SiteAccess and Roles

2000-12-15 Thread Michael Bernstein

The Doctor What wrote:
 
 * Michael Bernstein ([EMAIL PROTECTED]) [001214 01:06]:
  I read your access rule, and it seems like you've got it set
  up to ignore the gTLD, so that www.gerf.org and www.gerf.com
  etc. get routed to the same object automatically. Is that
  correct?
 
 Yes.  I have several sites that use that feature, and none that
 don't.  It's actually really handy, as it's one line in my
 siteaccess rule vs. several in my apache config. :-)

Ok, then problem may be in your SiteRoot. What are the
settings there?

Michael Bernstein.

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




Re: [Zope] How to pass parameters to dtml methods in making dtml-call

2000-12-15 Thread Daniel Rusch

I tried your code and it works fine both ways for me, are you sure that
para exists in the second scenario.
DR
Dirksen wrote:
 
 Hi,
 
 The case is like this:
 
 dtml-var "some_dtml_method(_.None, _, para='blablabla')"
 Works fine.
 
 dtml-call "some_dtml_method(_.None, _, para='blablabla')"
 The system complains the para being unknown. How come?
 
 cheers
 Dirksen
 
 __
 Do You Yahoo!?
 Yahoo! Shopping - Thousands of Stores. Millions of Products.
 http://shopping.yahoo.com/
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

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




[Zope] Perl Scripting in Zope

2000-12-15 Thread Mike Kelland



I'm running Zope on a Windoze 2k machine (no, I'm 
not happy about the situation ;P ) and I'm a Perl programmer by training. 
Has Perl Scripting support been ported to Win yet and if so could someone 
possibly run me through the procedure of installing it (I'm a bit of a newb to 
installing ports in Win32)? 

Thanks very much! 
Mike Kelland
[EMAIL PROTECTED]



Re: [Zope] LoginManager and SSL client authentication

2000-12-15 Thread Ng Pheng Siong

On Fri, Dec 15, 2000 at 11:42:23AM -, Mayers, Philip J wrote:
 How would I go about making LoginManager authenticate them on the basis of
 the certificate subject?
 
 Apache will validate the certificate for me (by passing a valid CA cert to
 it's configuration) and I'm running over PCGI, so by the time we get into
 Zope, we can "TRUST" the SSL_CLIENT_S_DN and SSL_CLIENT_I_DN values passed
 in. What's the next step?

ZServerSSL did this with Zope in "remote user" mode. 

Upon successful client cert verification, ZServerSSL maps the subject 
DN to a Zope username and sets REMOTE_USER accordingly. Zope's 
REMOTE_USER machinery took care of the rest.

This was on 2.1.x. I've not had time to test ZServerSSL with 2.2.x.

ZServerSSL is here:

http://www.post1.com/home/ngps/zope/zssl


Cheers.
-- 
Ng Pheng Siong [EMAIL PROTECTED] * http://www.post1.com/home/ngps


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




Re: [Zope] Dreamweaver, webdav and Zope

2000-12-15 Thread Martijn Pieters

On Fri, Dec 15, 2000 at 12:47:26PM +0100, Max M?ller Rasmussen wrote:
 I have just upgraded to DreamWeaver 4.0. Lo and behold, it has webDav
 support.
 
 I can open the site in DreamWeaver and it looks just great. It would be a
 really, I mean REALLY, nice management interface for Zope.
 
 Two problems though:
 
 1) I cannot open my dtml methods in Dreamweaver as they have no
 extensions. Appart from giving them extensions has anybody had succes with
 this in Dreamweaver? I can solve it by dragging them onto an empty page, but
 that ain't to neat. It also only gives the code view.

No, Dreamweaver cannot do without file extensions. WebDAV does carry the
content-type, but Dreamweaver (like all windows WebDAV clients) ignores
it.

 2) The files that DreamWeaver gets over is rendered html files. So it is
 not actually dtml, but the html resulting from the dtml method. Anybody has
 a clue to why this is?

WebDAV retrieves files using a normal HTTP GET. So you get the rendered
version everyone sees. WebDAV does know a 'source link' property, which in
Zope correctly points to the unrendered DTML source, but I have yet to see
a client that actually makes use of this.

Zope 2.3a1 let's you start an extra server on a different port that only
serves source, especially for WebDAV clients.

I'd say, file feature requests with Macromedia :)

Note that the Macromedia WebDAV implementation has some serious bugs, see
elsewhere on this list. The good news is that I just received word from
Macromedia that they are testing an update to Dreamweaver that fixes these
issues. It should be available on Macromedia Exchange soon.

-- 
Martijn Pieters
| Software Engineer  mailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
-

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




Re: [Zope] Perl Scripting in Zope

2000-12-15 Thread Michel Pelletier



On Fri, 15 Dec 2000, Mike Kelland wrote:

 I've got about 3/4 of my application built in Zope (entirely in dtml
 I'm afraid to say) but I'm reaching a point where it's difficult to
 continue with only DTML (things like complicated database structures
 and validation of input fields) and since I don't quite know python
 yet (currently teaching myself) and I'm adept at Perl, I'd like to
 incorporate Perl Scripts into my app.  I got the
 pyperl-1.0.beta.tar.gz and zoperl-1.0.beta.tar.gz modules from
 ActiveState but I really have no idea if they're Win32 compatible (or
 only on Linux/Unix etc) and if they are, how to install them.  I'm
 reluctant now to switch to a standalone Perl solution now that I've
 invested so much time into the Zope one.

Perl Scripts are still being developed, but if you want to jump through a
hoop or two they are quite cool (or so I'm told, as I don't know enough
Perl to even write one).  When we documented them for the upcomming book,
I had to download my own python, and my own perl distributions and patch
them both.  Then I had to compile some magical stuff and diddle with my
paths.  Then they worked.  It's all documented fairly well in the readme,
and you might want to skim through the mailing list archives and read
everything by Gisle.

I can't tell you how hard it is on Windows, I did it on Linux.

As a posible interum sollution, you might want to check out Zope 2.3a1.
This release of Zope has Python Scripts.  These little babies are no
harder to use than DTML (many (like me) believe way easier) and end you up
with much better design.  Learning Python is a snap, I suggest running
through the Python tutorial on python.org (it's short and sweet) and
you'll be up and running in no time.

-Michel


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




[Zope] PoPy module finally compiled but there is another prob

2000-12-15 Thread Paolo Quaglia

Hi to all
Finally I compiled the Popy module (the 1.4) and I obtained the
PoPymodule.so file
I copied the module in the [ZopDir]/lib/python directory
I installed the ZPoPyDA.0.7

but When I start Zop this error occour:

Traceback (innermost last):
  File "/usr/local/Zope-2.2.4-linux2-x86/lib/python/OFS/Application.py",
line 397, in import_products
product=__import__(pname, global_dict, global_dict, silly)
  File
"/usr/local/Zope-2.2.4-linux2-x86/lib/python/Products/ZPoPyDA/__init__.py",
line 32, in ?
import sys, os, Globals, DA
  File "/usr/local/Zope-2.2.4-linux2-x86/lib/python/Products/ZPoPyDA/DA.py",
line 35, in ?
from PoPy_db import DB
  File
"/usr/local/Zope-2.2.4-linux2-x86/lib/python/Products/ZPoPyDA/PoPy_db.py",
line 37, in ?
raise "The PoPy module is old: Update your version of PoPy"
The PoPy module is old: Update your version of PoPy

Has someone had the same probs?
How do you think the problem is?

Thanks


Paolo Quaglia




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




Re: [Zope] Dreamweaver and WebDav

2000-12-15 Thread Martijn Pieters

On Fri, Dec 15, 2000 at 12:31:49PM -0500, Brian Lloyd wrote:
 FYI - I spent a good part of yesterday fixing a lot of
 DAV support issues in Zope.

Yes, I have been updating my server and testing out the clients.

  Dreamweaver 4 WebDAV has the following issues (confirmed with their
  Technical Support):
 
  - Dreamweaver searches for a WWW-Authenticate header case-sensitively (not
compliant with HTTP RFC), and therefor misses the one sent by Zope. It
therefor cannot do any operation for which authentication is required.
 
 There is a fix in CVS so that we generate a header that
 they can handle (and that is by-the-numbers of the spec
 spelling)

Hmm, I am not sure that playing along with client bugs is such a good idea
myself.

I have gotten confirmation from Macromedia about the bugs, and they are
testing a hotfix as we speak. They'll distribute it through
exchange.macromedia.com. A pity that all their servers except
www.macromedia.com are unreachable for me just now.

  - Dreamweaver sends a malformed host header; it sends the IP number, not
the DNS name (again, in conflict with the RFC). Also, when using a
non-standard port (ie other than 80), it will send a non-sensical port
number in the header (My 'www' server, port 50080 becomes 'Host:
192.168.0.1:429451840').
 
 Hm - GoLive has problems with the Host header too. They dont
 send the port at all :)

Ah, that explains the fix you checked in :)

Is this the beta version that Todd and I are running? It may be that the
release version has been fixed. Todd is looking into buying copies.

-- 
Martijn Pieters
| Software Engineer  mailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
-

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




[Zope] I SOLVED!!

2000-12-15 Thread Paolo Quaglia

THANKS TO ALL for your help But I solved the Probs with the PoPy DA.

Ciao

Paolo 




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




[Zope] Question about cgi-bin scripts

2000-12-15 Thread Eva Alam

Hello,

I am a new zope user. I have just uploaded an existing web site into my
zope database.
However, I have been using cgi scripts which run perl programs on my
site to search for data  this aspect of the web site does not seem to
be working properly.

I wonder if zope can handle this?

best regards,
Eva Alam.


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




RE: [Zope] I SOLVED!!

2000-12-15 Thread Eric Walstad

Hi Paolo, you should post your solution to the mailing list so that if
others run into your same problem they can find your solution by searching
ht emailing list archives.
Just a thought.
Eric.

//  -Original Message-
//  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Paolo
//  Quaglia
//  Sent: Friday, December 15, 2000 10:26 AM
//  To: [EMAIL PROTECTED]
//  Subject: [Zope] I SOLVED!!
//
//
//  THANKS TO ALL for your help But I solved the Probs with the PoPy DA.
//
//  Ciao
//
//  Paolo
//
//
//
//
//  ___
//  Zope maillist  -  [EMAIL PROTECTED]
//  http://lists.zope.org/mailman/listinfo/zope
//  **   No cross posts or HTML encoding!  **
//  (Related lists -
//   http://lists.zope.org/mailman/listinfo/zope-announce
//   http://lists.zope.org/mailman/listinfo/zope-dev )
//


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




[Zope] ZWiki rocks our world

2000-12-15 Thread Timothy Grant

I want to take a moment to express my sincere gratitude to those who created
ZWiki.

We are embarking on a significantly large development project.
Communications are always problematic in those situations. However, the
ZWiki tools have improved communications and the global knowledge store by
several orders of magnitude.

So to those concerned. A very big thank you!

-- 
Stand Fast,
tjg.

Timothy Grant [EMAIL PROTECTED]
Red Hat Certified Engineerwww.exceptionalminds.com
Avalon Technology Group, Inc.   (503) 246-3630
Linux, because rebooting is *NOT* normal
This machine was last rebooted:  16 days 20:35 hours ago

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




Re: [Zope] How to pass parameters to dtml methods in making dtml-call

2000-12-15 Thread Dieter Maurer

Dirksen writes:
  dtml-call "some_dtml_method(_.None, _, para='blablabla')"
We do this often (Zope 2.1.6) and it works as expected.


Dieter

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




Re: [Zope] default values in forms

2000-12-15 Thread Dieter Maurer

Curtis Maloney writes:
  a href="dtml-var " 'adr_change_frm?f_id=%sf_name=%s' % ( id, name ) " 
  fmt=url_quotec/a
Be careful:

  In general, the part after "?" must be quoted differently
  from the part before.
  After "?", a blank must be coded as '+',
  before "?", is must be unchanged.

Quoting with '+' conversion is done by "url_quote_plus".


Dieter

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




[Zope] Re: [Zope-dev] IE5 / Medusa bug?

2000-12-15 Thread Dieter Maurer

seb bacon writes:
   IE does not get last 11 bytes 
  - it's always the last 11 bytes that are missing, however large the 
page is
  
  - I've sent exact copies of the HTTP headers to the server, using
telnet, and there's no problem there
I made the experience that IE is very strict with
the "Content-Length" header.
If it is there, it must be correct. Otherwise, IE will show
wrong results.


Dieter

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




Re: [Zope] IE5 / Medusa bug?

2000-12-15 Thread Dieter Maurer

seb bacon writes:
  
  the Content-length is consistently reported as 14 bytes too
  short.  This is regardless of the actual length of the document.
  
  Why this should have a knockon effect on a small subset of MS
  browsers, I don't know.  Especially confusingly random is the
  requirement for a certain amount of data to break these browsers.
You can configure IE for use of HTTP 1.0 or HTTP 1.1.

I would expect it to close connections after each request
for HTTP 1.0 mode. Then, a correct Content-Length is of
much less importance. In HTTP 1.1 mode, IE is very
strict with Content-Length.


Dieter

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




[Zope] Pesky DateTime problem

2000-12-15 Thread Timothy Wilson

Hi everyone,

I would *really* appreciate some advice about a problem with a ZClass I
created. This product is a Job Board that our H.R. department can use to
post openings and the public can view. I began by looking at the very nice
"Build a Searchable Job Board" How-To at
http://www.zope.org/Members/mukhsein/job_board_howto and combined that with
the ZClass approach put forward in the Beehive ZClass documentation.

The problem lies in adding an instance of the job board ZClass at which
point Zope reports an "Invalid Date-Time String". At the risk of providing
too much information, I'm going to include some of the relevant methods and
the traceback. I would love it if someone could spot my error. (Why do I
have this feeling that it's something really simple and that I'm an even
larger moron than my friends and acquaintances assume me to be? :-)

Here the traceback:

!--
Traceback (innermost last):
  File /var/lib/zope/2.2.2/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /var/lib/zope/2.2.2/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /var/lib/zope/2.2.2/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
  File /var/lib/zope/2.2.2/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /var/lib/zope/2.2.2/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: entry_addProcessor)
  File /var/lib/zope/2.2.2/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: entry_addProcessor)
  File /var/lib/zope/2.2.2/lib/python/OFS/DTMLMethod.py, line 172, in
__call__
(Object: entry_addProcessor)
  File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_String.py, line
528, in __call__
(Object: entry_addProcessor)
  File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_With.py, line 146,
in render
(Object: manage_addProduct['JobBoard'])
  File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_Util.py, line 337,
in eval
(Object: job_board_entry_add(_.None,_, NoRedir=1))
(Info: _)
  File lt;stringgt;, line 0, in ?
  File /var/lib/zope/2.2.2/lib/python/OFS/DTMLMethod.py, line 168, in
__call__
(Object: job_board_entry_add)
  File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_String.py, line
528, in __call__
(Object: job_board_entry_add)
  File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_With.py, line 146,
in render
(Object: job_board_entry.createInObjectManager(REQUEST['jobID'],
REQUEST))
  File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_Util.py, line 337,
in eval
(Object: propertysheets.entry_info.manage_editProperties(REQUEST))
(Info: REQUEST)
  File lt;stringgt;, line 0, in ?
  File /var/lib/zope/2.2.2/lib/python/OFS/PropertySheets.py, line 459, in
manage_editProperties
(Object: Traversable)
  File /var/lib/zope/2.2.2/lib/python/OFS/PropertySheets.py, line 286, in
_updateProperty
(Object: Traversable)
  File /var/lib/zope/2.2.2/lib/python/ZPublisher/Converters.py, line 173, in
field2date
  File /var/lib/zope/2.2.2/lib/python/DateTime/DateTime.py, line 698, in
__init__
Invalid Date-Time String: (see above)

--

Here's the job_board_entry_add method that lives in
Control_Panel/Products/JobBoard/:

HTML
HEADTITLEAdd job_board_entry/TITLE/HEAD
BODY BGCOLOR="#FF" LINK="#99" VLINK="#55"

dtml-with "job_board_entry.createInObjectManager(REQUEST['jobID'],
REQUEST)"
dtml-call "propertysheets.entry_info.manage_editProperties(REQUEST)"
/dtml-with

dtml-if NoRedir
dtml-else
dtml-if DestinationURL

dtml-call "RESPONSE.redirect(DestinationURL+'/manage_workspace')"

dtml-else

dtml-call "RESPONSE.redirect(URL2+'/manage_workspace')"
/dtml-if
/dtml-if
/body/html

Here's the "Add a Job Posting" form that the H.R. people use:

dtml-var standard_html_header

h2Add a Job Board Entry/h2
pThis form will create a new job posting for the online job board. You
don't needed to fill in every 
field on the form. Click on the "Add Entry" button at the bottom of the
screen to add the posting to the database./p

form action="entry_addProcessor"
table border="0"

trthJob ID/th
tdinput type="text" name="new_jobID" size="20"/td
/tr
trthOrganization/th
tdinput type="text" name="new_organization" size="60"/td
/tr
trthPosition/th
tdinput type="text" name="new_position" size="60"/td
/tr
trthDescription/th
tdtextarea
name="new_description:text" rows="10" cols="60" wrap="virtual"/textarea/td
/tr
trthPay Offered/th
tdinput type="text" name="new_pay" size="60"/td
/tr
trthLine of Authority/th
tdinput type="text" name="new_loa" size="60"/td
/tr
trthFunction/th
tdtextarea
name="new_function:text" rows="4" cols="60" wrap="virtual"/textarea/td
/tr
trthQualifications/th
tdtextarea
name="new_qualifications:text" rows="8" cols="60" wrap="virtual"/textarea/td
/tr
tr
td colspan=2
pTo create a bullet list of "duties," type each one in the box below and
press the "ENTER" key 
between each item in the list./p
/td
/tr
trthDuties/th
tdtextarea
name="new_duties:text" rows="10" 

Re: [Zope] Pesky DateTime problem

2000-12-15 Thread seb bacon

 The problem lies in adding an instance of the job board ZClass at which
 point Zope reports an "Invalid Date-Time String".

You might have considered this already, but you're not supplying a 
default date in the DateTime field of the form.  This can cause problems, 
because there's a bug in zope that won't allow null values in DateTime 
properties.  

hth

seb



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




Re: [Zope] Pesky DateTime problem

2000-12-15 Thread Timothy Wilson

On Fri, 15 Dec 2000, seb bacon wrote:

  The problem lies in adding an instance of the job board ZClass at which
  point Zope reports an "Invalid Date-Time String".
 
 You might have considered this already, but you're not supplying a 
 default date in the DateTime field of the form.  This can cause problems, 
 because there's a bug in zope that won't allow null values in DateTime 
 properties.  

I thought that was only a problem when defining the list of properties
initially. I didn't think you had to supply a default when creating actual
instances of the class.

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] |   dtml-var pithy_quote | http://linux.com/


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




[Zope] Stupid File Upload Question

2000-12-15 Thread jpenny

This is for Jos:

I ran into the same problem today.  I had previously used this method,
and it works better than LocalFS for my purposes.  Anyway, be absolutly
sure that your form says:

form method=post action=whatever method="multipart/form-data"
...
/form

Then you should be able to access REQUEST.form['attachment'].filename
and REQUEST.form['attachment'].read()  (Well, I hope).

If the method=post is omitted, Netscape (linux at least) will work.
MSIE will not.

Man I ain't got enough hair for these kinds of problems!

Jim Penny

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




[Zope] Generating HTML and SQL from results of Describe Table queries.

2000-12-15 Thread Lloyd Kvam

I would like to generate the necessary DTML Documents and Z SQL Methods to
provide list, add, update, and delete capabilities for each table in a MySQL
database.  I know (in principle) how to parse the results of describe table
queires and create reasonable default files with the proper sql and html
content.

My next step is to move the html and sql into ZOPE.  T. J. Mannos has written
how to apply wrappers to html to turn them into DTML Documents.  I could not
find any equivalent description for Z SQL Methods.

Any pointers would be appriciated.  Has anyone done this already?  Would I be
smarter to try to do this directly in ZOPE rather than trying to build the
pieces outside of ZOPE and then import them?

--
Lloyd Kvam
Venix Corp.
1 Court Street, Suite 378
Lebanon, NH 03766-1358

voice: 603-443-6155
fax: 801-459-9582



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




Re: [Zope] Best Zope way to split a textfield on 2000 char increments

2000-12-15 Thread Bill Anderson

Jerome Alet wrote:
 
 On Fri, 15 Dec 2000, Steve Drees wrote:
 
  somestring[:1999] is the first 2000 characters of somestring.
 
 Not to be a poseur but:

me either ;^)=

 
 somestring[:1999] is the first 1999 characters of somestring, because
 in Python indices begin at 0, e.g.:

Actually, it is because the number 1999 refers to the the spot
*inbetween* 1998 and 1999. Basically, in a list of '0,1,2,3', [0] is the
first 'comma', and [1] the second, and so on. Counting that way shows
that you never include the 1999 (or the three in your example. It isn't
that indices start at zero, it is due to the counting being done on the
seperator, not the item in the list.

 a="0123"
 print a[:3] gives "012" which are the first 3 characters from a.

Right, because 'a' is being treated as [0,1,2,3], and you are saying
"give me everything up to the third comma". :)

yes-I-am-nitpicking-ly y'rs Bill Anderson


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




[Zope] One-To-One, Story Server, Teamsite, ... Zope?

2000-12-15 Thread Ausum

The three first are the most recognized brands for content management

software, at least among industry journalists. For anyone previously

involved with content management of a large scale site, Interwoven's,

Broadvision's and Vignette's high-end suites, respectively, are

probably the default chooses for web and e-business management, no

questions asked.



I'm reflecting this because I would like to have the big picture of what

each product is able to do, without exagerations. I've never seen

running any of those products, and since I must advice the company I

work for about the software it will need for its news portal, in adition

to what nice pdfs and catalogs can show off, I am truly interested about

what Zope can do and what it can't, COMPARED to those first.



Is Zope stable enough working connected to large databases? How does it

behave with high traffic sites? Does it support clustering? What is the

largest site running it? Have anyone put their hands on any of the

mentioned tools and make comparisons?



Although it sounds silly, I need reasons to convince someone else that

saving money is for good. That none of those

super-coded-worth-a-third-million solutions is much better that a

genuine GNU initiative, meaning Zope in this particular case. 



And, by the way, when are we going to see the first large ASP (meaning

NASDAQ registered) with support for Zope?  

 

Thanks in advance,





Ausum


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




Re: [Zope-dev] ZPatterns, ZClasses, Specialists: Assigning responsibilities

2000-12-15 Thread Steve Alexander

Itai Tavor wrote:

 I have the following ZClasses, with matching Specialists: 
 Product, Graphic, Order, OrderLineItem. When a customer adds a product 
 to their order, they have to provide a graphic file which will be 
 printed on the product (imagine buying a lunch box with your cat's photo 
 on it). The Graphics Specialist can provide a addGraphicSnippet form. 
 But who's responsible for asking for this graphic when adding the 
 product to the order? Is it still the Product object? But a Product 
 turns into a Product-with-Graphic only when it's a part of an order, so 
 is it correct for the Product to even know about Graphics? the 
 alternative is to move the addToOrder methods to either Order or 
 OrderLineItems, but this doesn't make any more sense because these would 
 then have to know a lot more about a Product than is good for them. Any 
 ideas?

Sounds to me like you have a new type of Product.

You have your basic products (of which there are many kinds), and you 
have ProductWithGraphic products. A ProductWithGraphic is a "calculated 
product": it is composed of a basic product and a graphic. Its cost, 
delivery time, packing charge, and so forth, are calculated based on the 
combination of the basic product and the graphic.

To the rest of the application, a ProductWithGraphic is just another 
kind of product.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
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] more on keyword indexes

2000-12-15 Thread Steve Alexander

Hi Josh,

I use KeywordIndexes a lot.

Just for kicks, I implemented what you describe below in Zope2.3 grabbed 
fresh from CVS just now.

I used DTML Documents for the objects to catalog, and I added a lines 
property called KW to each one.

I queried the catalog using syntax like
   dtml-in "Catalog(KW=['one', 'two'])"
or
   dtml-in "Catalog(KW='purple')"


Josh Zeidner wrote:

 Hello,
 
   I did a little more investigiation into the problem, and couldnt really
 find any documentation anywhere on what the actual semantics are of keywords
 and how they are queried.  For instance:
 
   I have three classes and each has an keyword index named KW:
 
   ObjectOne:KW = ['one','blue','furry']
   ObjectTwo:KW = ['two','flying','purple']
   ObjectThree:  KW = ['three','one-eyed','purple']
 
   If I were to query the ZCatalog with the following set of words:
 ['purple'] I would expect to get:
 
 ObjectTwo
 ObjectThree

Yes, that's what you get.

   Right?  If I query the database with ['one','two'] ( if this type of thing
 is at all possible ), I get :
 
 ObjectOne
 ObjectTwo

Yes, that's what you get.

   This seems like the obvious result: BUT: it depends if you want a AND/OR
 type search.  

It is an OR search.

 I could also expect to get nothing( if its an AND type search
 because no records match 'one' and 'two' ).  Here is better example, what if
 I queried: ['purple','one-eyed'].  Would I be expecting only ObjectThree or
 [ ObjectThree, ObjectTwo ] ( because they both match the keyword purple( a
 logical set-intersection ) ).

You get ObjectTwo and ObjectThree.


   Also I found the keyword indexes to have some more obvious bugs.  If I
 only used one keyword for the matching critiria,  for instance if I used
 'purple' , I would only get ObjectTwo.

I get ObjectTwo and ObjectThree, as I'd expect.


 Is anyone else using keyword
 indexes?  In what way are you using them?

All sorts of things. One useful use is to limit a query on a SiteIndex 
type of catalog to just a sub-tree of your site.

See my message to zope-dev on October:

   http://lists.zope.org/pipermail/zope-dev/2000-October/007535.html


--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
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] keyword indexes

2000-12-15 Thread Steve Alexander

Josh Zeidner wrote:

 Hi,
 
   Currently I am wrestling with "keyword" indexes in ZCatalogs.  How do I
 query the ZCatalog for all records of objects indexed on a particular
 keyword.  For instance if my index is named MediaKeyword ive tried:
 
  dtml-in "Catalog.searchResults( MediaKeywords = ['ouch'] )"

That should work.

this has completely unpredictable results.
 
  dtml-in "Catalog.searchResults( MediaKeywords in ['ouch'] )"
 
this returns all indexed objects!

That won't work. The python

   MediaKeywords in ['ouch']

will be evaluated first, and will give a calue of 0 or 1. If 
MediaKeywords is a list, then it will always give 0, because there is 
only one item in ['ouch'], and that is the string 'ouch'.

   What am I doing wrong?  Is there a special ZCatalog function for querying
 keyword indexes?  I need some insight into this problem.

Are you sure that the keywords are being indexed in your catalog? A good 
trick is to index the keyword attribute, and also store it as metadata. 
That way, you can look through your search results at the keywords the 
Catalog thinks you have.

Also, check that you declared MediaKeywords as a keyword index, and that 
the MediaKeywords attribute in your objects is (or returns) a sequence 
type such as a tuple or a list.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
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] CoreSessionTracking Release 0.2

2000-12-15 Thread Chris McDonough

I had some reports yesterday of the Core Session Tracking development code
not working against recent Zope 2.2 releases, so I removed dependencies in
the code on the Interface module which were causing the incompatibilities.
CoreSessionTracking 0.1 will work against Zope 2.3a1, but not against Zope
2.2.3, 2.2.4, etc.

A new release of the code which has these dependencies removed, 0.2, is
available from
http://www.zope.org/Members/mcdonc/Products/CoreSessionTracking .  This
release works against all Zope 2.2.X based systems, AFAIK.

Thanks!

- 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] urllib not available in Python Scripts?

2000-12-15 Thread Evan Simpson

From: Itai Tavor [EMAIL PROTECTED]
 In Python Methods I could do urllib.quote(...). This doesn't work in
 Python Scripts. Is quote considered a security risk?

No, but only the modules available to DTML are importable by default.   You
would need to provide security declarations in order to import anything from
urllib.

Cheers,

Evan @ digicool  4-am


___
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] Search Interface [was 'case insensitive sorts']

2000-12-15 Thread Casey Duncan

Chris Withers wrote:
 
 Rik Hoekstra wrote:
 
  Hm, reading this... just a loose comment.
  In light of the awkward search interface of ZCatalogs, would it be a good
  idea to make a search interface for ZCatalog ZPatterns based? T
 
 I'm starting to feel like a stuck record on this, but lots of people
 seem to be asking for it in their own way... ;-)
 
 If the ZSearch Interface was properly documented and fully featured (ie
 defined how you search an object that supports the interface, and how
 you would index objects using that interface) then we wouldn't be stuck
 with the ZCatalog. It would enable people to write SQLIndexers,
 ZPatterns-based Catalogs and anything else they want, all of which would
 be freely interchangeable with the ZCatalog.
 
 Comments?
 
 Chris
 

I would love to see this happen. Sounds like a fishbowl project to me!

-- 
| Casey Duncan
| Kaivo, Inc.
| [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] Catalog class--does it support boolean queries?

2000-12-15 Thread Casey Duncan

Chris Withers wrote:
 
 Marc Conley wrote:
 
  boolean queries seem not to work. Should boolean queries work using Catalog
  or is it
  necessary to use ZCatalog instead to get that functionality?
 
 I'm not sure boolean queries work in either. If they do, anyone know
 where their syntax is documented?
 
 cheers,
 
 Chris

From digging around in the code, here is the general text index query
syntax (if you can call it that):

"one two three" and "one or two or three" are equivilant, multiple words
are "orified" by default. Hits are scored according to the number of
words matched, so by default, objects matching all words will be first
in the results. 

"one and two and three" and ['one','two','three'] will return only
objects containing all three words.

"one and not two" ('andnot' also works) works as advertised.

Wildcard characters "*" and "?" can be used to match multiple word
forms. e.g. a query for "great*" would match "great", "greats",
"greatest", "greatly", etc.

There is also a mentioned support for "near" searching in the code using
a '...' operator, although in practice this does not work 8^(. It seems
as though all non-aphanumerics are stripped from the query somewhere.
IMHO this should probably just use the word "near" as an operator
anyway.

For those interested, the indexing/searching code lives in {Zope
Dir}/lib/python/SearchIndex.

In doing some more digging in UnTextIndex.py there I do see support for
parens and quoted phases, although in practice they do not work. If I
find time I will delve into this further.
-- 
| Casey Duncan
| Kaivo, Inc.
| [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] Catalog class--does it support boolean queries?

2000-12-15 Thread Casey Duncan

Chris Withers wrote:
 
 Casey Duncan wrote:
 
  In doing some more digging in UnTextIndex.py there I do see support for
  parens and quoted phases, although in practice they do not work. If I
  find time I will delve into this further.
 
 Cool, if you document it anywhere, please let us know...
 
 Chris

2.3.0a1 seems to be a bit more friendly toward near, and parens and
quoted phrase searches. I will be looking into this further. Perhaps a
howto is in order?
-- 
| Casey Duncan
| Kaivo, Inc.
| [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] keyword indexes

2000-12-15 Thread Dieter Maurer

Josh Zeidner writes:
   dtml-in "Catalog.searchResults( MediaKeywords = ['ouch'] )"
This should work.
Alternatively: "MediaKeywords = 'ouch'".

   dtml-in "Catalog.searchResults( MediaKeywords in ['ouch'] )"
This calls the catalog without any keyword arguments
and with a single positional parameter 0.
The catalog interprets this as "no search criteria" and returns
all objects.


Dieter

___
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] more on keyword indexes

2000-12-15 Thread Dieter Maurer

Josh Zeidner writes:
  
This seems like the obvious result: BUT: it depends if you want a AND/OR
  type search.
ZCatalog combines several search terms for a single index with
"OR" and search expressions for different indexes with
an "AND".


Dieter

___
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] urllib not available in Python Scripts?

2000-12-15 Thread Dieter Maurer

Itai Tavor writes:
  In Python Methods I could do urllib.quote(...). This doesn't work in 
  Python Scripts. Is quote considered a security risk?
"quote" not, but maybe "urllib".


Dieter

___
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: [Zope] IE5 / Medusa bug?

2000-12-15 Thread Dieter Maurer

seb bacon writes:
  
  the Content-length is consistently reported as 14 bytes too
  short.  This is regardless of the actual length of the document.
  
  Why this should have a knockon effect on a small subset of MS
  browsers, I don't know.  Especially confusingly random is the
  requirement for a certain amount of data to break these browsers.
You can configure IE for use of HTTP 1.0 or HTTP 1.1.

I would expect it to close connections after each request
for HTTP 1.0 mode. Then, a correct Content-Length is of
much less importance. In HTTP 1.1 mode, IE is very
strict with Content-Length.


Dieter

___
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] A couple of possible Python Scripts bugs

2000-12-15 Thread Itai Tavor

Evan Simpson wrote:

From: Itai Tavor [EMAIL PROTECTED]
  First, when trying to add a Python Script, I sometimes get:

  Error Type: AttributeError
  Error Value: tx

Thanks! Fixed in CVS.

  return container.domains

  returns AttributeError.

  This does not occur if I try to read a property on the first
  propertysheet in the ZClass. Also, getProperty('domains') works in
  the Python Script. And this Python Script:

Sorry, I can't replicate this on Zope 2.3 alpha 1.

I'm the one who should be sorry. I forgot to mention I was using 
2.2.4. And I know Python Scripts are not certified to work with 
2.2.4, so this is pretty much irrelevant. I'm glad the first item 
turned out to be a real bug!
-- 
Itai Tavor"Je sautille, donc je suis."
C3Works[EMAIL PROTECTED]  - Kermit the Frog

"If you haven't got your health, you haven't got anything"


___
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 )