Re: [Zope-dev] ANN: Extended ManagementTabs Mixin for Python Product Developers

2000-12-10 Thread Michael Bernstein

Johan Carlsson wrote:
 
 Hi,
 I just uploaded my Extended ManagementTabs Mixin Product you can find it at:
 
 http://www.zope.org/Members/johanc/ExtendedManagmentTabs/ExtendedManagmentTabsMixin/
 
http://www.zope.org/Members/johanc/ExtendedManagmentTabs/ExtendedManagmentTabsMixin/
 
 It's should supply any Python Product with multi-level management tabs
 without breaking existing code (peppar peppar). If not please let me know.

Sounds interesting. Can you add a few screenshots to the
product page?

Michael Bernstein.

___
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] ANN: Extended ManagementTabs Mixin for Python Product Developers

2000-12-10 Thread Johan Carlsson

 Michael Bernstein.
 Sounds interesting. Can you add a few screenshots to the
 product page?
 

Ok, 
have a look at this
(Click Edit, MyMenu1 and MyMenu4 to see how they behave.)

http://www.zope.org/Members/johanc/ExtendedManagmentTabs/ExtendedManagmentTabsMixin/screamshots
http://www.zope.org/Members/johanc/ExtendedManagmentTabs/ExtendedManagmentTabsMixin/screamshots

Cheers,
Johan Carlsson



___
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] Re: boolean help

2000-12-10 Thread Martijn Pieters

On Sat, Dec 09, 2000 at 01:29:41PM -0800, [EMAIL PROTECTED] wrote:
 I hope you don't think this email innappropriate, but you were so kind
 in responding to a previous question that I posted on the zope mailing
 list that I thought I would direct this simple question to you alone.  

It flatters me that you think I may be able to answer your qeustions :)
But I would appreciate it if you do keep sending your questions to the
mailinglists instead of directly to me. If only so that other people can
benefit from any answers you get!

I have added the Zope list to recipients of this reply.

 I am new at programming and have been unable to code a boolean button
 into my Zope Portal registgration form that can recall the previous
 selection such that it can be de-selected.  Basically, I want to enable
 a user on my site to sign-up, flip a boolean on, log out, then later log
 back in and unflip that boolean.  It's the "unflip" that catches me.  I
 have been able to make the boolean reflect the fact that it is selected
 when the user logs back on, back I can't make it unselectable.  Here's
 the code I've got now that doesn't allow for de-selecting,

 input type="checkbox" name="current_college_student"
   dtml-if" member.current_college_student" 
 checked
   /dtml-if
value="member.current_college_student"
 bCurrent College Student/b
 
 I guess I need to tell the database that if no value is entered, it
 should delete "member.current_college_student" from its records.  

I am not sure what your problem is here. 

Are you talking about the fact that if the checkbox isn't checked, that
the browser doesn't send *any* information about the field
'current_college_student'?

If so, you can check for it's absense with the DTML construct 'dtml-unless
current_college_student .. /dtml-unless. Or you could add a hidden form
field *before* the checkbox which defines a default, empty value, like so:

  input type="hidden" name="current_college_student:default" value=""

You can of course put any other value in there. The browser will always
pass this back to Zope, and then you can test for the value of
current_college_student.

Hope this helps!

 It seems so simple, I'm almost embarrassed to post my question to the
 general zope mailing list.  

Well, it wasn't so simple that you could figure it out on your own. There
may be other people that struggle with this, and they would benefit from
your questions and the answers you may receive.

-- 
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] HTTP status code 302

2000-12-10 Thread Steve Spicklemire


Hi Hung Jung,

   Did you set a 'Host' header in your request? Is
the request going straight to ZServer, or through
Apache? (Also... do you have a SiteRoot?) These can
all affect how the request is handled by the server...

It woould be interesting to try urllib, rather than
httplib since it handles the Host header for you...

-steve

 "Hung" == Hung Jung Lu [EMAIL PROTECTED] writes:

Hung I can view certain document on a Zope site over the web if I
Hung use a = brower. But for fun I tried to download it by using
Hung Python's httplib, = and for some Zope sites got a status
Hung code 302. This probably means I = need to use another URL
Hung address. The web browser does this automatically = so I
Hung don't need to do anything. But I can't seem to find the
Hung right URL.=20

Hung Reading from http://www.w3.org/Protocols/HTTP/HTRESP.html ,
Hung it says that = when 302 happens, the header line would be

Hung URI: url String CrLf

Hung But I don't see this line in the returned header. And the
Hung returned body = is an HTML telling me the document has been
Hung moved. Funny thing is that = browsers (IE, Netscape) do not
Hung have problems with it.

Hung Is this a limitation of Python's httplib (not showing the
Hung URI in the = response header)? Is there a way to circumvent
Hung it? Or does this have to = do with virtual hosting, or
Hung Apache stuff?

Hung Thanks,

Hung Hung Jung


___
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] Important Fix for Zope 2.0 through 2.1.6

2000-12-10 Thread Evan Simpson

Thanks to Jeff Ragsdale, we've finally been able to kill a
longstanding bug that allows POST requests to interfere with
each other.  Symptoms include corrupted or aborted File and
Image uploads, and stupid-log messages about
"AttributeError: data" killing threads.

The attached HTTPServer.py is valid for all Zope 2.0.x and
2.1.x versions.  I am posting the patched file for Zope
2.2.x separately.

PLEASE BACK UP Zope/ZServer/HTTPServer.py, then replace it
with the attached file.

Cheers,

Evan @ digicool  4-am


##
# 
# Zope Public License (ZPL) Version 1.0
# -
# 
# Copyright (c) Digital Creations.  All rights reserved.
# 
# This license has been certified as Open Source(tm).
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 
# 1. Redistributions in source code must retain the above copyright
#notice, this list of conditions, and the following disclaimer.
# 
# 2. Redistributions in binary form must reproduce the above copyright
#notice, this list of conditions, and the following disclaimer in
#the documentation and/or other materials provided with the
#distribution.
# 
# 3. Digital Creations requests that attribution be given to Zope
#in any manner possible. Zope includes a "Powered by Zope"
#button that is installed by default. While it is not a license
#violation to remove this button, it is requested that the
#attribution remain. A significant investment has been put
#into Zope, and this effort will continue if the Zope community
#continues to grow. This is one way to assure that growth.
# 
# 4. All advertising materials and documentation mentioning
#features derived from or use of this software must display
#the following acknowledgement:
# 
#  "This product includes software developed by Digital Creations
#  for use in the Z Object Publishing Environment
#  (http://www.zope.org/)."
# 
#In the event that the product being advertised includes an
#intact Zope distribution (with copyright and license included)
#then this clause is waived.
# 
# 5. Names associated with Zope or Digital Creations must not be used to
#endorse or promote products derived from this software without
#prior written permission from Digital Creations.
# 
# 6. Modified redistributions of any form whatsoever must retain
#the following acknowledgment:
# 
#  "This product includes software developed by Digital Creations
#  for use in the Z Object Publishing Environment
#  (http://www.zope.org/)."
# 
#Intact (re-)distributions of any official Zope release do not
#require an external acknowledgement.
# 
# 7. Modifications are encouraged but must be packaged separately as
#patches to official Zope releases.  Distributions that do not
#clearly separate the patches from the original work must be clearly
#labeled as unofficial distributions.  Modifications which do not
#carry the name Zope may be packaged in any form, as long as they
#conform to all of the clauses above.
# 
# 
# Disclaimer
# 
#   THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
#   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
#   PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL DIGITAL CREATIONS OR ITS
#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
#   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
#   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
#   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
#   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
#   SUCH DAMAGE.
# 
# 
# This software consists of contributions made by Digital Creations and
# many individuals on behalf of Digital Creations.  Specific
# attributions are listed in the accompanying credits file.
# 
##

"""
Medusa HTTP server for Zope

changes from Medusa's http_server

Request Threads -- Requests are processed by threads from a thread
pool.

Output Handling -- Output is pushed directly into the producer
fifo by the request-handling thread. The HTTP server does not do
any post-processing such as chunking.

Pipelineable -- This is needed for protocols such as HTTP/1.1 in
which mutiple requests come in on the same channel, before
responses are sent back. When requests are pipelined, the client
doesn't wait for the response before sending another request. The
server must ensure that responses are sent back in the same order

[Zope] Important Fix for Zope 2.2.x

2000-12-10 Thread Evan Simpson

Thanks to Jeff Ragsdale, we've finally been able to kill a
longstanding bug that allows POST requests to interfere with
each other.  Symptoms include corrupted or aborted File and
Image uploads, and stupid-log messages about
"AttributeError: data" killing threads.

The attached HTTPServer.py is valid for all Zope 2.2.x
versions.  I am posting the patched file for earlier Zope
versions separately.

PLEASE BACK UP Zope/ZServer/HTTPServer.py, then replace it
with the attached file.

Cheers,

Evan @ digicool  4-am


##
# 
# Zope Public License (ZPL) Version 1.0
# -
# 
# Copyright (c) Digital Creations.  All rights reserved.
# 
# This license has been certified as Open Source(tm).
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 
# 1. Redistributions in source code must retain the above copyright
#notice, this list of conditions, and the following disclaimer.
# 
# 2. Redistributions in binary form must reproduce the above copyright
#notice, this list of conditions, and the following disclaimer in
#the documentation and/or other materials provided with the
#distribution.
# 
# 3. Digital Creations requests that attribution be given to Zope
#in any manner possible. Zope includes a "Powered by Zope"
#button that is installed by default. While it is not a license
#violation to remove this button, it is requested that the
#attribution remain. A significant investment has been put
#into Zope, and this effort will continue if the Zope community
#continues to grow. This is one way to assure that growth.
# 
# 4. All advertising materials and documentation mentioning
#features derived from or use of this software must display
#the following acknowledgement:
# 
#  "This product includes software developed by Digital Creations
#  for use in the Z Object Publishing Environment
#  (http://www.zope.org/)."
# 
#In the event that the product being advertised includes an
#intact Zope distribution (with copyright and license included)
#then this clause is waived.
# 
# 5. Names associated with Zope or Digital Creations must not be used to
#endorse or promote products derived from this software without
#prior written permission from Digital Creations.
# 
# 6. Modified redistributions of any form whatsoever must retain
#the following acknowledgment:
# 
#  "This product includes software developed by Digital Creations
#  for use in the Z Object Publishing Environment
#  (http://www.zope.org/)."
# 
#Intact (re-)distributions of any official Zope release do not
#require an external acknowledgement.
# 
# 7. Modifications are encouraged but must be packaged separately as
#patches to official Zope releases.  Distributions that do not
#clearly separate the patches from the original work must be clearly
#labeled as unofficial distributions.  Modifications which do not
#carry the name Zope may be packaged in any form, as long as they
#conform to all of the clauses above.
# 
# 
# Disclaimer
# 
#   THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND ANY
#   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
#   PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL DIGITAL CREATIONS OR ITS
#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
#   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
#   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
#   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
#   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
#   SUCH DAMAGE.
# 
# 
# This software consists of contributions made by Digital Creations and
# many individuals on behalf of Digital Creations.  Specific
# attributions are listed in the accompanying credits file.
# 
##

"""
Medusa HTTP server for Zope

changes from Medusa's http_server

Request Threads -- Requests are processed by threads from a thread
pool.

Output Handling -- Output is pushed directly into the producer
fifo by the request-handling thread. The HTTP server does not do
any post-processing such as chunking.

Pipelineable -- This is needed for protocols such as HTTP/1.1 in
which mutiple requests come in on the same channel, before
responses are sent back. When requests are pipelined, the client
doesn't wait for the response before sending another request. The
server must ensure that responses are sent back in the same order
   

[Zope] Read-only zope (not zope from a readonly Data.fs)

2000-12-10 Thread Pericles Akritides

Hi,

Is there a way to make zope run read-only(with whatever loss of functionality doing 
that implies)?
I don't mean to prevent it from trying to write to disk (demo storage, -r),
I mean to make it impossible to change persistent objects in the running Zope instance,
something like disabling their __setattr__ (since it is hooked by Persistent, right?)

Is something like this possible (by modifying ZODB source maybe?)

TIA

___
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] HTTP status code 302

2000-12-10 Thread Hung Jung Lu

From: "Steve Spicklemire" [EMAIL PROTECTED]
Did you set a 'Host' header in your request? Is
 the request going straight to ZServer, or through
 Apache? (Also... do you have a SiteRoot?) These can
 all affect how the request is handled by the server...

Ahh... that's it. Thank you very much!! Virtual hosting was the problem.
After supplying the 'Host' header, everything was fine.

The httplib offers more control, I think. It allows me to supply the
'Authorization' header. The urllib probably does not do that, right?

That being said, I am still not 100% familiar with all the HTTP headers (for
both request and response), it's like I learn one at a time. :) Do you know
any pointer where I can get info on all the headers?

regards,

Hung Jung


___
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] Random choice in dtml-in?

2000-12-10 Thread Tino Wildenhain

Hi J,


"J. Atwood" schrieb:

I think 
dtml-with "_.whrandom.choice(folder_name.objectValues())"


/dtml-with

should do what you want.

HTH
Tino Wildenhain
 
 Ok.. so I can get a random item out of a folder with.
 
 dtml-var expr="_.whrandom.choice(folder_name.objectValues())"
 
 And I can iterate through a folder with
 
 dtml-in "folder_name.objectValues()" size="1"
 dtml-var id, dtml-var title, dtml-var other_attribute
 /dtml-in
 
 But I want to include the random statement within the dtml-in so I
 can get more of the object values back.
 
 I know this must be some little ._."_.. or other such mix but I am
 getting frustrated trying.
 
 Thanks,
 J
 
 ___
 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] HTTP status code 302

2000-12-10 Thread Oliver Bleutgen

 Do you
 know
 any pointer where I can get info on all the headers?

This is the specification for http 1.1

http://www.faqs.org/rfcs/rfc2616.html

esp. Section 14 for headers, you'll also find 302 and friends
explained in this document.

and for more pointers

http://www.w3.org/Protocols/




cheers,
oliver







___
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] HTTP status code 302

2000-12-10 Thread Steve Spicklemire


Hi Hung,

   No! Urllib does that too!

import urllib
x = urllib.urlopen('http://user:pass@host:8080/path/to/get')
print x.read()

-steve

 "Hung" == Hung Jung Lu [EMAIL PROTECTED] writes:

Hung From: "Steve Spicklemire" [EMAIL PROTECTED]
 Did you set a 'Host' header in your request? Is the request
 going straight to ZServer, or through Apache? (Also... do you
 have a SiteRoot?) These can all affect how the request is
 handled by the server...

Hung Ahh... that's it. Thank you very much!! Virtual hosting was
Hung the problem.  After supplying the 'Host' header, everything
Hung was fine.

Hung The httplib offers more control, I think. It allows me to
Hung supply the 'Authorization' header. The urllib probably does
Hung not do that, right?

Hung That being said, I am still not 100% familiar with all the
Hung HTTP headers (for both request and response), it's like I
Hung learn one at a time. :) Do you know any pointer where I can
Hung get info on all the headers?

Hung regards,

Hung Hung Jung


Hung ___ Zope
Hung maillist - [EMAIL PROTECTED]
Hung http://lists.zope.org/mailman/listinfo/zope ** No cross
Hung posts or HTML encoding!  ** (Related lists -
Hung http://lists.zope.org/mailman/listinfo/zope-announce
Hung 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] Install problem with fastcgi

2000-12-10 Thread sdouche . ml

Hello all,
I try to install mod_fastcgi but Apache says :
Cannot load /usr/lib/apache/1.3/mod_fastcgi.so
into server: / usr/lib/apache/1.3/mod_fastcgi.so:
undefined symbol: ap_os_is_path_absolute
/usr/sbin/apachectl start: httpd could not be started

I compiled with the options:
apxs -o mod_fastcgi.so -c *.c
apxs -i -a -n fastcgi mod_fastcgi.so

And add in the file http.conf :
LoadModule fastcgi_module /usr/lib/apache/1.3/mod_fastcgi.so

Versions used:
- Apache 1.3.9-13 (Debian Potato)
- Mod_fastcgi 2.2.10

Is you see why ...

___
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] Why I Love Zope

2000-12-10 Thread Curtis Maloney

 (ie going from zero to zen quickly!).


You know, this sounds like a great title for a "Learn Zope Quick" book

"From Zero to Zen in 15 minutes!"


 Regards,

 Ivan



It's early monday, ok?


Have a better one,
Curtis Maloney


___
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] PythonMethod problem

2000-12-10 Thread kosh

I know I am still using PythonMethods however I have not seen Python
Scripts out yet for 2.2.4.

Okay here is the problem. How do I call one PythonMethod from another
PythonMethod?

Example

object foo is a python method and it takes a='',b='',c='',d=''

does stuff
returns a string


foo_spec takes parameters a1='',b1=''
it should return foo(a=a1,b=b1)

However trying to call that foo gives an error.

I get a NameError on foo when it is used in foo_spec. However using foo
directly does work however I want to make easier customized interfaces for
users.

Thanks


___
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] ZClass with images

2000-12-10 Thread Michael Bernstein

Diego Rodrigo Neufert wrote:
 
 Anyone know how to put some images in  ZClass? I have done things like
 putting ZClass with base class OFS:Image but with it I can only assing one
 Image do the object... I need to assign two or tree images do the object.

I've been thinking about something similar myself. I'd like
to create a ZClass/ZPatterns version of the Photo and
ZPhotoAlbum products (or at least a reasonable equivalent).

Specifically, I'd like to incorporate the functionality
that, upon instantiation of the object, creates the
neccesary sized versions and stores them. I'd like to use
ZPatterns to be able to switch the storage between the ZODB,
the file-system, or BLOBs in an RDBMS without altering the
rest of the application.

Any progress that you make would be very helpful to me.

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 )




[Zope] Multiple databases and ZEO

2000-12-10 Thread Bill Anderson

Shane Hathaway wrote:
 
 Bill Anderson wrote:
 
  Shane Hathaway wrote:
  
   On Tue, 5 Dec 2000, Bill Anderson wrote:
So, what would you suggest for the following scenario?
   
o Site distirbuted via ZEO
o Using SiteAccess2 for virtual hosting sites under
  /vhosts/thissite /vhosts/thatsite
o each site is actually it's own full Data.fs
   
Under non-zeo, it's simple, use a mounted filestorage, and it works
quite well. Unfortunately, it doesn't work under zeo, for obvious
reasons. If I had time, I'd do a mountedZEOstorage, but time is too much
a precious commodity for the next few weeks/months. :/
  
   What do you mean it doesn't work under ZEO?  Set it up just like zope.org.
 
  Simple: I have a site running on it's own right now. It is based right
  of of the root of the data.fs, not under a folder (like a wiki is). If I
  try the externalmount you tarred up for us (thank you, btw), it insist
  on having a path inside said data.fs.  If I give it a folder in said
  data.fs it works for that folder, as expected.
 
 MountedFileStorage lets you mount the root of the database through a
 very "iffy" scheme that I don't think could be made reliable.  I'm sure
 there's a right way to do it, but I think for now your best option is to
 create a folder in the database you intend to mount, then move all
 content into that folder.  That's how Wikis.fs is mounted.

OK, I suppose I can live with that for now ... though i do have a
question abou tit.

Packing a database.
in one of the cases I am considering, I am wanting to seperate the
sub-site into a seperate DB because this subsite will likely contain
many objects, and many changes to those objects. At the moment, they are
being developed using ZPatters, so if needs be I can change the storage
in the future ( Zpatterns gd). If I pack from the main site,
does the 'mounted' folder also get packed, or will i need to do that
seperately somehow? 

If seperate, how does one do that?
 
   Either create two storage servers or one that provides access to both
   FileStorages.  Then write an external method for each storage, each of
   which creates a ClientStorage and wraps a DB around it.
 
  How do I do this part? I made one for FileStorage (the example given),
  which works fine. Substituting ClientStorage for FileStorage didn;t
  work. ;)
 
 Here's our external method:
 
 --- 8- -
 
 # Define the Wiki database mounted database
 import ZServer, ZODB, ZEO.ClientStorage
 
 def wikidb():
 Storage=ZEO.ClientStorage.ClientStorage(
 ('10.0.11.1',),
 cache_size=50*1000*1000,
 max_disconnect_poll=40,
 min_disconnect_poll=1,
 storage='Wikis',
 )
 return ZODB.DB(Storage)
 
 --- 8- -


Thanks, I'll get to this in the next day or so. I am currently setting
everything up to use sockets, so I imagine it shouldn't be to hard to
convert, just change the options passed, no? :)

 
  ...mebbe I've just been too deep in scsi code lately to think properly
  ... ugh.
 
 Been hacking kernels lately?  There's no hacking like kernel hacking.
 Bare metal.  Oh yeah. :-)

Yup, in fact I think we fixed a somewhat serious FC bug ... I hope.


___
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] access log analyzer (analog, webalizer etc.)

2000-12-10 Thread Martin Winkler

Hi listies,

since we all use names for urls that are not "standardized" - ending with 
".html", ".gif" etc -  I am wondering how to do a good logfile analyzing 
with standard tools like those in the subject line. I am usually running 
zope behind a http-accelerated squid, so I've configured squid to use 
"emulate_httpd_log on". But how webalizer doesn't recognize whether it's an 
image or html output.

Did someone already write a tool that converts these logfiles like this (or 
similar):

logfileconverter reads the logfile line by line -- checks against the ZODB 
whether the url outputs a "jpg", "gif" or "html" -- converts the line in 
the logfile accordingly (e.g. "/mydir/mymethod" to "/mydir/mymethod.html" 
and "mydir/mypic" to "mydir/mypic.jpg") -- then saves the modified logfile 
to disk or pipes it to webalizer.

Thanks for your input!

Martin


___
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] Transparent Folders

2000-12-10 Thread Brenton Bills

Hi,
v0.2

I attempting to use transparent folders.

Like Andrew Milton's suggestions on using them to unclutter your tree, I 
wanted (want)
to put all SQL methods in a folder in the root of my zope tree. From under this
I wanted to put various tranparent folders grouping likewise functionality, eg,

sqlMethods /
Students / 
  get_all_students
  get_all_students_gpa
Teachers /
  get_all_teachers


I would like to go,

dtml-in get_all_students

/dtml-in

And reverse aquisition will do its stuff and run the get_all_students
in the Students folders.

Sadly its not working though, am I correct in thinking that this functionality
exists? Am I missing a patch or something?

Thanks, 
Brenton Bills.




___
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] Transparent Folders

2000-12-10 Thread Stephan Richter


 Sadly its not working though, am I correct in thinking that this 
 functionality
 exists? Am I missing a patch or something?

No, that should work. I use Transparent Folders all the time. The current 
version has a little acquisition bug, but this should not affect you. I 
think the Transparent Folder Patch is not applied.

When you start Zope, does it say:

Applying TransparentFolders patch version 0.2.

If not, you have to make the following adjustment in 
lib/python/OFS/__init__.py:

try:
 # Apply the TransparentFolders patch.
 import Products.TransparentFolders.TransparentFolderPatch
except: pass # The patch may have been removed.

These lines may not exist, if you did not install the product properly.

Regards,
Stephan


--
Stephan Richter
CBU - Physics and Chemistry Student
Web2k - Web Design/Development  Technical Project Management


___
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] regex vs ts_regex

2000-12-10 Thread Ross Lazarus

Apropos http://www.zope.org/Documentation/How-To/ThreadSafety

Am I missing something here? 
There seem to be a number of places in the current 2.2.4 source where
the python regex module is used - not ts_regex, thus apparently
violating your advice on thread safety? 

For example, I was just spelunking through
/lib/python/AccessControl/User.py, App/Product.py so I started greping a
few subdirectories.

DateTime.py uses ts_regex as does OFS/ObjectManager.py but NOT
OFS/SimpleItem.py ...

Is there some reason why it's ok for some modules to use regex rather
than ts_regex ???

(I'm resending this to [EMAIL PROTECTED] because it bounced from
[EMAIL PROTECTED] - is something broken?)

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