Re: [Zope] Cookie Crumbler

2014-02-10 Thread Stefan H. Holek
These days I'd use the PAS with plone.session, which despite its name works 
fine without Plone.

https://pypi.python.org/pypi/plone.session

Stefan


On 09.02.2014, at 23:10, Jon Grange wrote:

> Hello all
> Returning to a zope 2 web application I built 5 or 6 years ago that now needs 
> some updating. Is cookie crumbler over SSL still a good and proper way to 
> secure a public facing website?

-- 
Stefan H. Holek
ste...@epy.co.at

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TextIndexNG3 Problem: Links werden nicht indexiert

2012-11-05 Thread Stefan H. Holek
On 05.11.2012, at 09:06, Ruth Cordes wrote:
> Hi Andreas,
> I just tried to index a zope page template object with TextIndexNG3 and 
> noticed
> that the HTML also wasn't rendered, just like it was with dtml. Strange. 
> Perhaps
> there is something wrong with my zope-instance? Or could it be that the
> TextIndexNG3-Products I use don't go together well? It's
> Products.TextIndexNG3-3.4.5.1-py2.6.egg, zopyx.txng3.core-3.5.3-py2.6.egg and
> zopyx.txng3.ext-3.3.2-py2.6-linux-i686.egg. I also found two older versions:
> zopyx.textindexng3-4.0.1-py2.6-linux-i686.egg and
> Products.TextIndexNG3-3.4.1-py2.6.egg in the "eggs"-folder. Might that cause 
> the
> trouble?
> Greetings, Ruth

The section "How to make your custom content-types searchable" [1] indicates 
you have to provide an IIndexableContent adapter for the types you want indexed 
(i.e. DMTLDocument).

Cheers,
Stefan

[1] http://pypi.python.org/pypi/Products.TextIndexNG3

-- 
Stefan H. Holek
ste...@epy.co.at

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Maintain Last Modified during Copy

2010-02-12 Thread Stefan H. Holek
Are you talking about (ZODB-level) bobobase_modification_time or about  
(CMF/Plone-level) modified time? In the former case you are out of  
luck, in the latter you can just set it back to its old value after  
making the copy.

Stefan


On 10.02.2010, at 19:47, Brian Brinegar wrote:

> I'm looking for a way to copy content from one database to another
> without updating modification times.
>
> I believe the modification times are tied to transaction IDs which may
> mean this isn't possible.
>
> Moving objects does not update their modification times, but, it  
> doesn't
> seem to be possible to move objects from one storage to another.
>
> One option that works is to copy the entire database, remove  
> everything
> I don't want, and then pack it. But this isn't ideal.
>
> Any suggestions?
>
> --
> Brian Brinegar
> Web Services Coordinator
> Engineering Computer Network
> Purdue University
> ___

--
Stefan H. Holek
ste...@epy.co.at




___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Get raw data (byte array) from flash in Zope

2009-11-25 Thread Stefan H. Holek
Try REQUEST.BODYFILE


On 25.11.2009, at 12:30, Dragos Chirila wrote:

> The question is: how can I get this data on the server side in Zope?  
> Becasue:
>
> - REQUEST.form is empty
> - HTTP_RAW_POST_DATA is missing
> - there is no other key or value in the REQUEST to indicate the value
> I am looking for

--
Stefan H. Holek
ste...@epy.co.at




___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] define library path for python external method

2009-05-13 Thread Stefan H. Holek
You add the additional path to etc/zope.conf using the 'path' directive.

Stefan


On 11.05.2009, at 13:22, Dganit David wrote:

> Hi,
>
> I use python script as an external method,
> Do you know how to define the python  libraries path.
> I get an error No module named  …..
>
> My program run  file when all code is in file or from python directly.
>
>
> Thanks Dganit

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


Re: [Zope] dtml-tree documentation

2008-05-26 Thread Stefan H. Holek

http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.15.html

On 25.05.2008, at 16:54, Garry Saddington wrote:


Is there a complete documentation of the dtml-tree tag anywhere?


--
Stefan H. Holek
[EMAIL PROTECTED]




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] first attempt to use RELSTORAGE

2008-05-11 Thread Stefan H. Holek
There is a buldout-friendly version of RS now. A sample buildout.cfg  
file has been posted to zodb-dev:

http://mail.zope.org/pipermail/zodb-dev/2008-April/011828.html

HTH,
Stefan


On 9. Mai 2008, at 18:05, David Bear wrote:


Any adivce?


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZopeTestCase and Selenium RC? Anybody?

2008-03-20 Thread Stefan H. Holek
You can tell ZTC to start a server by calling  
ZopeTestCase.utils.startZServer()


Stefan


On 20.03.2008, at 15:24, Peter Bengtsson wrote:

I don't know how/if the zope testrunner starts a server that can be  
reached with a browser or not.


--
Stefan H. Holek
[EMAIL PROTECTED]




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] is it possible to bypass ZSQL methods and call storedprocedures in sqlserver straight from ZPT?

2007-11-06 Thread Stefan H. Holek
IIRC, DB connections have a 'manage_test' method that could be (ab) 
used for things like that.


On 6. Nov 2007, at 15:23, Jaroslav Lukesh wrote:

The question is, can you go straight through to a relational  
database using the connector object and call a stored procedure  
straight from a ZPT? Or must you use a ZSQL method to access the  
procedure?


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Defining a dictionary in ZPT?

2007-11-02 Thread Stefan H. Holek
The only point being backed up by this thread, IMO, is that "Thou  
shalt not code in TALES."


Stefan


On 2. Nov 2007, at 12:53, michael nt milne wrote:


Backs up my point about more
friendly and usable error messages.


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] custom Lexicon developpement problems

2007-05-04 Thread Stefan H. Holek
http://dev.plone.org/collective/browser/UnicodeLexicon/trunk/profiles/ 
default/catalog.xml


Stefan


On 4. Mai 2007, at 15:04, Winterflood, Jonathan wrote:

My main issue is how to integrate the 'indexed_attr' field, but I  
can't see what is necessary to activate this functionality


Could you maybe explain this?


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] custom Lexicon developpement problems

2007-05-02 Thread Stefan H. Holek
You may want to look at http://www.zope.org/Members/shh/ 
UnicodeLexicon for inspiration.


Stefan


On 2. Mai 2007, at 10:50, Winterflood, Jonathan wrote:


Hovever, I'm having problems creating indexes that use them:
I created the lexicon and indexes via the catalog.xml file, but the  
'indexed_attr' fields are ignored (therefore, creating indexes on  
multiple fields isn't possible).
In the ZMI, in portal_catalog, I cannot select the lexicon for use  
when I add a ZCTextIndex


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] manipulating zodb from independent database connection

2007-04-11 Thread Stefan H. Holek

On 11. Apr 2007, at 07:19, Tim Nash wrote:



I'm using zope 2.5 (matches a book I like) and doing like so:


This is a *very* old release (5 years?).


>>> from ZODB import FileStorage, DB

storage = FileStorage.FileStorage('Data.fs')
db = DB(storage)
connection = db.open()
root = connection.root()


Also, can the ZODB be altered this way on a running Zope instance? I
would like to have a script run on cron and insert objects and remove
objects from the ZODB while the zope instance application is running.
I'd like these newly inserted objects to be Zpublishable as well.


To access the ZODB from separate processes you have to run ZEO.

Stefan

--
It doesn't necessarily do it in chronological order, though.
  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] VirtualHostBase VHM keyword doesn't work.

2007-04-11 Thread Stefan H. Holek
You are missing the [P] in your rewrite rule. Please follow How-tos  
to the letter. ;-)


Stefan


On 11. Apr 2007, at 06:23, Mark, Jonathan (Integic) wrote:



RewriteEngine on
DocumentRoot /var/www
Servername goodbyeken.com
RewriteRule /(.*)  http://goodbyeken.com:8080/VirtualHostBase/ 
http/www.goodbyeken.com:80/goodbyeken.com/VirtualHostRoot/$1




--
It doesn't necessarily do it in chronological order, though.
  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] setup SecureMail for Plone

2007-04-03 Thread Stefan H. Holek

http://www.stunnel.org/

Stefan


On 3. Apr 2007, at 06:31, marco marco wrote:

My email server requires SSL connections for sending email.  How  
can I setup SecureMail in Plone 2.5.1 to send user registration email?


--
It doesn't necessarily do it in chronological order, though.
  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope hangs in FreeBSD with plenty of memory and CPU resources

2007-02-25 Thread Stefan H. Holek

http://plone.org/documentation/faq/plone-on-bsd-python-stack

Stefan


On 26. Feb 2007, at 06:06, Jean Lagarde wrote:


All,

As a coincidence, that hang of Zope I mentioned in a message I posted
yesterday has happened again today (second time), after a planned
reboot. So here is a completely different issue from the memory one
we've been discussing today.


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] OFS.Cache.Cacheable.ZCacheable_invalidate and view_name

2006-11-19 Thread Stefan H. Holek
No, you are right. The way the cache is constructed doesn't allow to  
purge by view_name.


Stefan


On 19. Nov 2006, at 13:46, Maciej Wisniowski wrote:


As far as I understand this, 'view_name' is useless here, and
invalidation always occurs for all cache keys associated with object
'ob'. But this is not what docstring for ZCacheable_invalidate says.
Seems strange but maybe I've missed something here?


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope2.9 sqllite

2006-11-09 Thread Stefan H. Holek
I found that ZSQLiteDA does some evil connection pooling resulting in  
the error you see. You may want to check out http://www.zope.org/ 
Members/zoping/ZSQLite3DApkg instead.


Stefan

P.S. I have a fixed version of ZSQLiteDA 0.4.0 hanging around. Holler  
if you want it.



On 8. Nov 2006, at 18:34, Chris Hoy wrote:


Zope 2.9
ZSQLiteDA ZSQLiteDA-0.4.1
Pysqlite 2.3.2


I can connection to the database but whenever it try to render a page
template that uses a SQL Method to get data from the database I get  
the

following error

Error Type: ProgrammingError
Error Value: SQLite objects created in a thread can only be used in  
that
same thread.The object was created in thread id 3968 and this is  
thread id

4328


--
It doesn't necessarily do it in chronological order,
though.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] storing persisten object in python dictionaries

2006-10-26 Thread Stefan H. Holek

You don't need to traverse /me thinks. Item access is fast. How about:

app.data[classId].instances[obId]

Stefan


On 26. Okt 2006, at 05:44, Jürgen Herrmann wrote:


i have a writeen am framework where objects have unique ids and
instances are stored in btreefolders, one per class.
if i want to retrieve an instance based on id, i lookup it's class
name and the get the class' container path from my metadata manager
(f.ex. "/app/data/Appointments/instances").
now i traverse to this container and get the object with given id
from there.


--
Anything that, in happening, causes itself to happen again,
happens again.  --Douglas Adams


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


Re: [Zope] Re: Zope 2.10.0 released

2006-10-05 Thread Stefan H. Holek
Maurits, you seem to be working as root, which is the root of all  
evil (pun intended). Don't do that, ever. The permission issues you  
reported also only crop up if the tarball is extracted while root.  
Don't do that!


Stefan


On 5. Okt 2006, at 13:12, Maurits van Rees wrote:


BTW, after a ./configure, make, sudo make install I get:
$ find -user root
./lib/python/zope.proxy
./lib/python/zope.proxy/proxy.h
./build-base/python-2.4/build-lib/version.txt

So those three files (in the directory where I extracted the tar ball
to) are owned by root, which is a bit strange.  No big deal, bit if
this can be fixed, it would be nice.


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Help! Zope Crashed! Production Server!

2006-10-05 Thread Stefan H. Holek

The most common issue on *BSD is this:
http://tomster.org/blog/archive/2006/09/27/size-does-matter

Stefan


On 4. Okt 2006, at 20:43, Javier Subervi wrote:

The person who ran this box previously didn't understand FreeBSD's  
port system, so he built Python in a different place.


--
It doesn't necessarily do it in chronological order,
though.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] delete latest transactions

2006-10-02 Thread Stefan H. Holek

http://www.zope.org/Members/itamar/CorruptedZODB

Stefan


On 2. Okt 2006, at 23:03, Einar Næss Jensen wrote:


How, if possible, can one delete the latest transactions in Data.fs?
If I wanted to delete all transactions after a given date, can I do  
that?


if not, is it possible to load the Data.fs -file using python and  
somehow

export a given object and subobjects (like export in the zmi)?


--
It doesn't necessarily do it in chronological order,
though.  --Douglas Adams


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


Re: [Zope] HTTPResponse

2006-09-29 Thread Stefan H. Holek
The point of stream iterators is not the chunk size, but that they  
are handed to Medusa (ZServer) right away. As a result the Zope  
thread is immediately freed to serve new requests, while ZServer  
takes care of streaming the data to the client.


Stefan


On 29. Sep 2006, at 15:14, Pascal Peregrina wrote:


Hi,

I would like to know what is the use of implementing the
Zpublisher.Iterators.IStreamIterator on the object returned as the  
body of a

HTTP response.

As far as I could read the Zope code (Zserver, etc), this will make  
the

response data to be sent 64k at a time.

So will this improve performance/concurrency in any way for >64k  
data HTTP

responses?


--
Anything that, in happening, causes itself to happen again,
happens again.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Monkey Patching Grief with Zope 2.9.4

2006-09-28 Thread Stefan H. Holek

Zope and ZODB switched to new-style classes.

Stefan


On 26. Sep 2006, at 22:52, Mark Wilson wrote:

I'd be interested to hear if anyone has any info about why and how  
this change

was made to Zope.


--
Anything that, in happening, causes itself to happen again,
happens again.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Monkey Patching Grief with Zope 2.9.4

2006-09-26 Thread Stefan H. Holek
Since Zope 2.8 you can no longer borrow methods from other classes  
like this. You have to borrow the function implementation.


SpecialUser.allowed = PF2SpecialUser.PF2SpecialUser_allowed.im_func

Stefan


On 26. Sep 2006, at 16:33, Mark Wilson wrote:


# now the monkey patching - ooh ooh k ooh

# save original method for use by superuser
#(see PF2SpecialUser.PF2SpecialUser_allowed)
PF2SpecialUser.PF2Superuser_allowed = SpecialUser.allowed
# replace with our custom method
SpecialUser.allowed = PF2SpecialUser.PF2SpecialUser_allowed



--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Weird paths in the filesystem using Photo and ExtFile

2006-08-26 Thread Stefan H. Holek

Hi Pablo,

This comment from the ExtFile source code may shed some light on the  
issue. Photos can for historical reasons, and without changes to the  
Photo product, not take advantage of ZODB_PATH = PHYSICAL.


# XXX: The Photo product uploads into unwrapped ExtImages.
# As we can not reliably guess our parent object we fall back
# to the old behavior. This means that Photos will always
# use ZODB_PATH = VIRTUAL independent of config settings.

Stefan


On 25. Aug 2006, at 21:54, Pablo Ziliani wrote:


For example, if I call these "real" urls:
- http://zopeserver.com:8080/sites/site1/images/image.jpg? 
display=whatever
- http://zopeserver.com:8080/sites/site2/images/image.jpg? 
display=whatever


in the filesystem I would have something like:
- $INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/ 
image_whatever.jpg
- $INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/ 
image_whatever.jpg


but if I call the same via the virtual url:
- http://www.virtualsite1.com/images/image.jpg?display=whatever
- http://www.virtualsite2.com/images/image.jpg?display=whatever

I only get:
$INSTANCE_HOME/var/photos/images/image.jpg/image_whatever.jpg


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] PUT_factory and File object?

2006-08-10 Thread Stefan H. Holek

On 10. Aug 2006, at 13:52, Eric Fernandez wrote:


def PUT_factory( self, name, typ, body ):


 ob = None


   if typ.startswith('text'):
   ob = File(name, '', body, content_type=typ)
   return ob


However, I cannot upload jpg files anymore... What am I doing wrong  
there?


Stefan


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] no accounts in root user folder?

2006-08-10 Thread Stefan H. Holek

Yes, you must never delete an account that owns ZODB objects.

Stefan


On 10. Aug 2006, at 09:58, Vangelis Mihalopoulos wrote:

where 'call_backend' is an External Method called by a Python  
Script. All objects in zope are owned by the "admin". Could this be  
causing the problem?


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Programatically logging out of Zope

2006-08-03 Thread Stefan H. Holek

from AccessControl.SecurityManagement import noSecurityManager
noSecurityManager()

Stefan


On 3. Aug 2006, at 13:58, Sinang, Danny wrote:


Hello,

Would anyone here know how to programmatically log out of Zope ?


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How can i improve performance of website under heavy load in Zope2.6.1

2006-08-03 Thread Stefan H. Holek

On 31. Jul 2006, at 09:13, Sudesh Soni wrote:

I wonder why Zope is default set for handling 4 threads and 7  
database connections.


These are good values under normal circumstances.



I tried inreasing threads to 20 and database connections to 30 by  
updating z2.py and DB.py, presuming that this will help to improve  
performance under heavy load.


Can anyone suggest what impact will be there if i do this , in Zope  
2.6.1




Zope is not Apache. Increasing the number of threads is unlikely to  
help performance unless, perhaps, when you have a heavily loaded  
RDBMS backing your Zope and see threads "hanging" waiting for the  
RDBMS to respond.



OR

Can anyone suggest any other option to improve performance under  
heavy load in Zope 2.6.1


Figure out why your Zope is slow. Is it CPU bound or I/O bound? Use a  
profiler to analyze your code (PTProfiler, ZopeProfiler). Set up ZEO  
+ multiple ZEO clients, if need be on multiple boxes. And put a cache  
in front, Squid works well.


Stefan

--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Trying to trap ConflictError

2006-07-04 Thread Stefan H. Holek
First, you should not - ever - catch a ConflictError. It is essential  
for ConflictErrors to be propagated to the ZPublisher.


Second, the conflict is detected at commit time, which happens at the  
very end of the REQUEST. This likely is a while after your method has  
executed.


Stefan


On 4. Jul 2006, at 15:56, Jonathan wrote:


I am trying to trap the following error:

Traceback (innermost last):
  Module Zope2.App.startup, line 173, in zpublisher_exception_hook
  Module ZPublisher.Publish, line 121, in publish
  Module Zope2.App.startup, line 240, in commit
  Module transaction._manager, line 96, in commit
  Module transaction._transaction, line 380, in commit
  Module transaction._transaction, line 378, in commit
  Module transaction._transaction, line 433, in _commitResources
  Module ZODB.Connection, line 484, in commit
  Module ZODB.Connection, line 526, in _commit
  Module ZODB.Connection, line 554, in _store_objects
  Module tempstorage.TemporaryStorage, line 200, in store
ConflictError: database conflict error (oid 0x39b0, class  
BTrees._OOBTree.OOBucket, serial this txn started with  
0x0366974da4fd2288 2006-07-04 13:33:38.669252, serial currently  
committed 0x0366974da54d9fcc 2006-07-04 13:33:38.742942)



in an external method, as follows:

folder = self.unrestrictedTraverse(TEMPFOLDERIMAGES, None)
try:
folder.manage_addImage(imageId, imageData)
except:



But the try/except block is not catching the error! (the error  
continues to show up in error_log)
(note: I started by trying "except ConflictError:", but that was  
not working, so I went to the bare try/except)


The traceback does not show where the error originates in the  
external method, but there is only one place where the external  
methods writes to TemporaryStorage. Does this indicate that the  
error is not bubbling up properly?


Any ideas as to why the error trapping is not trapping?  (running  
Zope 2.9.2, debug=on)


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Any known leaks in ExtFile and OpenFlow?

2006-06-05 Thread Stefan H. Holek
I am not aware of leaks in ExtFile but am certainly interested should  
you be able to point out some. ;-)


Stefan


On 4. Jun 2006, at 11:59, Michael Vartanyan wrote:


Hi all,

One of my Zope (2.8.4 on Python 2.4.2, SLES9) sites constantly hits  
the memory limit. It makes heavy use of two products - ExtFile  
(1.5.0) and OpenFlow (1.1.0). ExtFile class (of ExtFile) and  
workitem class (of OpenFlow) are leading the refcount list with a  
not-constant but overall increasing numbers of references.  
Refcounts for both reach numbers that are incomparably higher than  
the numbers of their instances in ZoDB. I wanted to ask if there  
are known leaks in these products before going into (painful)  
hunting and debugging leaks in my own code.


Thanks!


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] refreshing external method

2006-06-03 Thread Stefan H. Holek
Run Zope with debug-mode on (see etc/zope.conf) and EMs will be  
refreshed for you. Not however that this only works for the EMs  
themselves and *not* for modules they may be importing; changes in  
imported modules are not detected by the machinery.


Stefan


On 2. Jun 2006, at 13:47, thomas desvenain wrote:


hello,

is there any way to refresh External Method (as Extension/Install.py
for exemple) without restarting zope, as product's "refresh" method ?



--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Permissions, files and folders

2006-04-20 Thread Stefan H. Holek
I recommend to install DocFinderTab. And there is something at http:// 
api.plone.org/ for those who like such things ;-)


Stefan


On 18. Apr 2006, at 13:21, Erik Billing wrote:


Is there any complete api reference avalible?


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] DELETE Objects

2006-04-18 Thread Stefan H. Holek

Deletion *is* an operation on the container because it
a) removes an attribute from the container
b) removes an entry from the container's _objects tuple

DELETE is for WebDAV.

You options are
a) Python Script with proxy role
b) External Method (or another form of unrestricted Python code)

Stefan


On 18. Apr 2006, at 14:15, Erik Billing wrote:

I want to create a python script that deletes a specific file from  
a folder.
For now, the user who is calling the script does not have the  
Delete objects
permission on the folder, only the file which he should be able to  
delete. I
have previously used the delObjects method on the folder to remove  
the file,
but this requires the Delete obejcts permission on the folder  
itself. I
would like to do something like container[entry_id].DELETE() but  
the DELETE

method requires 3 arguments, and I dont know what to give it? Or is it
better to go in the delObjects on the container and use a proxy to  
solve the

permission problems?

Best regards /Erik


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ExtFile and TextIndexNG issues

2006-04-12 Thread Stefan H. Holek
This however is *exactly* the problem. Please use 1.5. ExtFile  
1.4.4's index_html writes to the request regardless of how it was  
called (by publisher or script).


Stefan

On 11. Apr 2006, at 19:24, Palermo, Tom wrote:


I haven't tried upgrading to ExtFile 1.5 from the svn trunk yet but I
really don't think that's the problem. I'm going to try that next  
(upgrading

to ExtFile 1.5). Does anyone have any ideas about what would cause the
ExtFile to launch instead of just get catalogged?


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] TextIndexNG and ExtFile

2006-04-08 Thread Stefan H. Holek
This is fixed on SVN trunk [1]. I hope to get around to releasing  
1.5.0 sometime soon-ish. Please also note that it is *not safe* to  
use 1.4.4 with Zopes > 2.7 because of major changes in the  
transaction machinery of Zope.


Stefan

[1] svn co https://svn.plone.org/svn/collective/ExtFile/trunk ExtFile


On 7. Apr 2006, at 23:22, Michael Vartanyan wrote:




I've got a site with a couple hundred ExtFile objects. I now need  
to index the content of the various files (word, pdf, excel, ppt).  
I see that ExtFile doesn't have a PrincipiaSearchSource method so  
I created one. It returns self.index_html(). When I go back into  
my catalog and reindex my PrincipiaSearchSource index (a  
textindexng index), clicking the "Reindex" button opens the  
ExtFile I'm trying to index. Is there something more to the  
process of trying to index ExtFiles with TextIndexNG. I've googled  
around and tried a few things but either they don't work or I get  
the same results I've just described. Any ideas?




this is what was discussed here:

http://mail.zope.org/pipermail/zope/2006-March/165803.html
http://mail.zope.org/pipermail/zope/2006-April/165924.html


and a number of times before. Looks like someone needs to really  
look at this. I will try to do that over the weekend, if nothing  
works... well, my 19k ExtFiles will have to turn into Chris' blobs :-)

___


--
Anything that happens, happens.  --Douglas Adams
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Problem with ExtFile

2006-04-05 Thread Stefan H. Holek
Oh, also note that ExtFile 1.4.4 does *not* work with Zope > 2.7. It  
clearly says so in the README and on the download page. You *must*  
use SVN trunk (soon to be 1.5.0) with Zope 2.8 and higher.


Stefan


On 4. Apr 2006, at 21:48, Michael Vartanyan wrote:



Same problem here. Occasionally, uploading ExtFile would redirect  
to file content itself with broken (unset?) content-type. Anyone  
has a ready fix?


Thanks.

Bruno Grampa wrote:

Hello,
i've a problem with ExtFile 1.4.4 installed in a Zope 2.8.6 (on  
RHES4).

The redirection, at the end of file creation doesn't work.
To test the problem you have to create these methods:
The first one is called 'form':


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Problem with ExtFile

2006-04-05 Thread Stefan H. Holek

Could both of you please

a) Try the SVN trunk of ExtFile [1]
b) Be more specific with your bug reports. I have added tests that do  
what Bruno sent me, DTML and all (yuck), but am unable to reproduce  
the issue.


Thanks,
Stefan

[1] svn co https://svn.plone.org/svn/collective/Extfile/trunk ExtFile


On 4. Apr 2006, at 21:48, Michael Vartanyan wrote:



Same problem here. Occasionally, uploading ExtFile would redirect  
to file content itself with broken (unset?) content-type. Anyone  
has a ready fix?


Thanks.

Bruno Grampa wrote:

Hello,
i've a problem with ExtFile 1.4.4 installed in a Zope 2.8.6 (on  
RHES4).

The redirection, at the end of file creation doesn't work.
To test the problem you have to create these methods:
The first one is called 'form':
---


name="form1">


Insert

Id 
File






---

The second one is called 'write':
---

(id=REQUEST['id'],title='',descr='',file=REQUEST 
['file'],content_type='', permission_check=0)">


(id=REQUEST['id'],title='',descr='',file=REQUEST 
['file'],content_type='',create_prev=1, maxx='100', maxy='100',  
ratio=1, permission_check=0)">



Ok, done.


---

If i use manage_addExtImage i got the "Ok, done" message; if i use  
manage_addExtFile no, just a piece of page (junk?).


I can't understand why, can someone help me?

Thanks!
   Bruno


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] logging from external methods

2006-04-02 Thread Stefan H. Holek
Note that ExternalMethods are not, and do not behave like, python  
modules.


Stefan

On 1. Apr 2006, at 01:28, Jed Parsons wrote:

I'm trying to perform some logging from external methods.  I've  
discovered that, if you're not careful, you get more and more  
loggers each time Zope reloads the module.  This leads to an ever- 
increasing number of identical entries in the log file, whose  
timestamps all match down to the millisecond.


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] single sign-on

2006-03-31 Thread Stefan H. Holek
You may want to contact Netsight(.co.uk), they have a working NTLM  
auth system for Zope/Plone. It's not gratis though, AFAIK. It's also  
possible to use ActiveDirectory for both Windows and Zope (via  
LDAPUserFolder).


Stefan


On 31. Mär 2006, at 09:03, Fernando Martins wrote:

Interesting to know about, but it seems to be restricted to web  
sso, whereas
I had in mind sso including the workstation login. It seems to be a  
full
authentication mechanism on its own and it doesn't integrate with  
existing
authentication systems, right? (no NTLM and it uses kerberos but on  
it's

own)

Thanks,
Fernando



--
Anything that happens, happens.  --Douglas Adams


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


Re: [Zope] Zope + Apache on Quad Debian machine

2006-03-16 Thread Stefan H. Holek
a) Your system may be I/O bound - not CPU bound - so you will never  
see the CPU max out because the limiting factors are memory and disk/ 
network access.


b) Make sure to tune Python's checkinterval. While you should  
*always* do that, it is especially important on multi-processor/multi- 
core hardware. The rule of thumb is to run the pystone benchmark,  
divide the "pystones" your machine benchmarks at by 50, and put the  
result into etc/zope.conf.


e.g:
python-check-interval 1000

Once you get the checkinterval right, playing with processor affinity  
becomes a pointless exercise, in my experience.


c) Always use profiling tools for performance analysis. "Guessing"  
rarely leads to effective optimizations. ZopeProfiler and PTProfiler  
come to mind.


HTH,
Stefan


On 15. Mär 2006, at 21:45, Hugo Ramos wrote:


Yellow,

I'm using Zope+Apache on a 4 xeon's/4GB ram machine running Debian.
I've noticed that the CPU's never go beyond 30% top occupation... but
on rush hours the site takes too long to load...

I've been reading about process affinity and how it could speed up
everything by making zope run on 1 CPU, Apache on another and so on...

Has any1 tried this before? Can you point me to some documentation?
What's your experience? is it true that not doing this the 4 cpu's
will not be 100% used?


--
Anything that happens, happens.  --Douglas Adams


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


Re: [Zope] How to specify caching for ZSQL methods on file system

2006-03-02 Thread Stefan H. Holek

You are close ;-)
The info goes into a  block at the start of the file.


title: Foo
arguments: foo bar
max_rows: 1000
max_cache: 100
cache_time: 60


...

Stefan


On 2. Mär 2006, at 15:15, Yuan HOng wrote:


I have some ZSQL methods written on the file system using FSDV. In ZMI
I can not find the 'Advanced' tab usually available for ZSQL methods
in ZODB for specifying the caching properties of the ZSQL method.

Can anyone give some clues as how to do this for ZSQL on FSDV? I
suppose I might need to write some *.metadata file to specify these
properties using FSDV?

--
Hong Yuan


--
Anything that happens, happens.  --Douglas Adams


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


Re: [Zope] Change owner from external app

2006-03-01 Thread Stefan H. Holek
*Everything* you can do in the ZMI, you can also do from code. Most  
of it even via XML-RPC. In case a method you want does not publish  
nicely to XML-RPC, write a helper script in Zope and RPC that one.


Also, install DocFinderTab for all the API doc needs you may have.

Stefan


On 1. Mär 2006, at 17:32, Marek 'MMx' Ludha wrote:


Hi.

I am writing an external application and I need to modify owner and
permissions of zope files from that app. I thought about using HTTP
object publishing or XML-RPC, so I checked documentation at
http://www.plope.com/Books/2_7Edition/AppendixB.stx#2-45 but I can't
find any method to deal with owner/permissions. Is there really no way
to do this or am I just missing something?
Thanks in advance.

Marek Ludha


--
Anything that happens, happens.  --Douglas Adams


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


Re: [Zope] Re: Zope scheduling problem

2006-02-17 Thread Stefan H. Holek
Uhm, you sure this patch is a good idea? Why not use  
portal_catalog.unrestrictedSearchResults?


Stefan

On 17. Feb 2006, at 10:14, Pawel Lewicki wrote:


Hi,
The problem is with portal_catalog. See/apply this patch
http://www.zope.org/Collectors/CMF/380

Pawel


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] restricting permissions for direct access only

2006-02-16 Thread Stefan H. Holek

There is no way, proxy roles are not passed-on to callees.

Stefan

On 14. Feb 2006, at 17:04, Michael Shulman wrote:


But... it's still not working for my real site.  I think the issue is
this.  If script1 has proxy role Manager, and script2 has view
permissions set only for Manager, then script1 can call script2, no
problem.  But if script1 instead calls script3, which then calls
script2, it doesn't work unless script3 *also* has proxy role Manager.
 Is there a way to make scripts inherit proxy roles from their
callers?  Or am I confused once again?


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

2006-02-16 Thread Stefan H. Holek
Please learn to read and to provide the *complete* traceback. The  
error text alone is not enough most of the time.


Your error *may* mean that 'system' is not yet wrapped. Are your  
positive that 'system' is a folder that already exists in the ZODB,  
i.e. has already been _setObject'ed?


Stefan


On 16. Feb 2006, at 13:33, Roman Klesel wrote:


when I now do:

system.manage_addProduct['OFSP'].manage_addFile(fid,
title='',
file=cpu_load,
content_type='text/plain',
precondition='')


I get:

AttributeError: _getProducts


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] VerboseSecurity and zope 2.8.5

2006-02-15 Thread Stefan H. Holek
If this is Plone, you also need to tell error_log not to ignore  
Unauthorized and clear the Login page ID in cookie_authentication.  
See 


Stefan


On 15. Feb 2006, at 14:39, Peter Bengtsson wrote:


I'm not getting any verbose security messages in my zope 2.8.5.
zope.conf reads:
security-policy-implementation python
verbose-security on

I'm trying to log in as a user but get rejected which is probably
because I've incorrectly configured one method or object to require
one permission too many.

I've tried looking in error_log, event.log and the printed output from
./bin/runzope
Any ideas?


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ExtFile - wrong file extension and content_type

2006-02-09 Thread Stefan H. Holek

Two things to check

- Does your /etc/mime.types file on the server contain the correct  
entry for msword?

- Do your clients (browsers) reliably sent the msword content-type?

Stefan


On 7. Feb 2006, at 19:16, Palermo, Tom wrote:


All,

I am working on a project using ExtFile. Lately, when uploading MS  
Word files, they get uploaded to the file system as .exe files (eg.  
test.doc becomes test.exe) and the content_type is set to  
application/octet-stream instead of application/msword. Sometimes  
the content_tpye is correct but the file extension is still set  
to .exe. Does anyone know what could be causing this? Is there a  
config setting in ExtFile that's doing this? Any ideas would be  
much appreciated.


Thanks,
Tom


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Can ZServer or ZPublisher be coaxed to return port 80 response..??

2006-01-14 Thread Stefan H. Holek

A fairly common setup is to have:

  Apache with appropriate VHM rewrite rules --> pound --> 2-n ZEO 
clients


If you don't want Apache in front, it is also possible to configure the 
VHM directly (inside Zope). Writing your own access rules and mucking 
with the URLs is neither necessary nor encouraged.


Stefan


On Jan 14, 2006, at 14:46, Eric.Roby wrote:

We have a new firewall and firewall guru...  He wants the firewall to 
handle and route port 80/443 requests to pound instances running on 
port 8080 and 8443.  Whereby pound routes said requests to appropriate 
back-end Zope servers (running on other high-end ports).  Obviously - 
in this new scenario - Zope will return requests with the 8080 and 
8443 ports attached to the response URL.  He wants Zope to respond, 
in-kind, with URLs re-written to port 80 and 443.  I have tried 
messing with Site Access (messing with SERVER_URL in the REQUEST) and 
can strip out the 8080 and replace with 80, but there are side effects 
and this just doesn't seem right.


Is there a saner way, possibly within the zope.conf config items (like 
CGI)  or some other deep "ZopeZen" magic that can address this or 
would it require some deep patching  ..??


Certainly Apache (re-write) between pound and Zope would probably 
address this but that seems kinda silly...


--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] request.set('AUTHENTICATED_USER',...

2006-01-14 Thread Stefan H. Holek
AUTHENTICATED_USER has been deprecated aeons ago and should have 
vanished from the REQUEST by means of bit rot alone ;-). You have to 
ask the security manager for the current user:


from AccessControl import getSecurityManager
getSecurityManager().getUser()

This is allowed in Python Scripts, AFAIK.

Stefan


On Jan 13, 2006, at 20:22, Brian Brinegar wrote:


We are running Zope 2.6.x and I noticed yesterday that I could do the
following:

  acl_users = container.acl_users
  user = acl_users.getUser('test_user')
  request.set('AUTHENTICATED_USER',user)
  print request.AUTHENTICATED_USER.getUserName()

This isn't a huge deal since it doesn't seem to change the permissions
available to the user. But many of our scripts rely on
AUTHENTICATED_USER.getUserName() to return the actual logged in user. 
Is

this addressed in later versions of Zope? Is there a better way to get
the current user's user name?


--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is.   /Pete McBreen/

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] states in _p_resolveConflicts

2005-12-08 Thread Stefan H. Holek

Hope these help:

http://mail.zope.org/pipermail/zope/2002-December/128574.html
http://mail.zope.org/pipermail/zodb-dev/2003-October/006133.html
http://mail.zope.org/pipermail/zodb-dev/2004-August/007796.html

Stefan


On 8. Dez 2005, at 00:21, Dennis Allison wrote:



I am having trouble understanding what they are and how one gets from
a "state" to the ZODB value associated with thast state.  Can someone
assist?

Many thanks, -d



--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: ZopeTestCase.Functional and sessions?

2005-11-21 Thread Stefan H. Holek
Well, yes. As you have already discovered, publish() creates it's own  
REQUEST (also see ZPublisher.Test). All you have after a call to  
publish() is the response object. Note that you *can* check ZODB- 
based variables after publish(). However the REQUEST is not stored in  
the ZODB...


Which begs the question why you need publish() in the first place. It  
is only useful if you want to test the Publisher, i.e. the status  
code, or some returned headers and cookies. Everything else can be  
tested directly. How to put a session object into self.app.REQUEST is  
demonstrated in the testShoppingCart.py example test.


Stefan


On 21. Nov 2005, at 03:46, Paul Winkler wrote:


Yes, everything is fine unless you attempt to access the session
from the test code. So I can't see any way to e.g. assert that after
publishing a page, a certain variable is set in the session.
For example, I wish I could rewrite your test like so:

def testUseSessions(self):
response = self.publish(self.folder_path+'/use_session')
self.assertEqual(response.getStatus(), 200)
self.assertEqual(self.app.REQUEST.SESSION.get('foo', 'xxx'),
 'bar')



--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] conflicts, sessions, and programming best practices guidelines

2005-11-16 Thread Stefan H. Holek
Try to partition your collision space. Do you mount a shared temp_folder?
Don't! Do as Chris said and keep a temp_folder per ZEO client. Let the
load balancer send people to the same ZEO client every time (according to
the cookie).

Note that there is no solution for bad coding practice other
than to fix it ;-). Keep session access to an absolute minimum (read *and* 
write).

You may also want to look at SQLSessions, which seem to be able to take a
higher load (haven't tried for a while). But only up to a point until you
get concurrency issues in the RDBMS. Psycopg in particular defers
conflicts to Zope by again raising ConflictErrors...

In the end, the key to scaling is to keep state out of the app server.

http://www.loudthinking.com/arc/000479.html
http://www.danga.com/words/2004_oscon/oscon2004.pdf

Stefan


On Tue, 15 Nov 2005, Dennis Allison wrote:

>
> Peter,
>
> That's pretty much what we've done, but it is not really enough in
> our case.  Our sites are interactive with lots of per user state.  We make
> fairly heavy use of session variables to track the state.  Our number of
> simultaneous users is also fairly high.  In addition, during development,
> we structured things for ease of development rather than for mimimum
> liklihood of conflict errors.  At this point we are seeing many conflicts
> and interactions with both the sessioning mechanism and the persistence
> mechanism--or so it appears.
>
> Even when we resolve the current database interaction problem, a
> refactoring seems in order to ensure the number of conflicts is kept to a
> minimum.
>

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


Re: [Zope] Zope 2.8 and conflict errors

2005-08-08 Thread Stefan H. Holek

Well, you know...

In this one project, we had an interesting (cough) situation with  
PostgreSQL + psycopg, where we would see plenty of write conflict  
errors coming from the DB connector.


Turned out PostgreSQL has kind of an "optimistic" transaction  
control, where the DB server returns something like "couldn't really  
resolve this concurrency issue, please retry" to the DB connector,  
and psycopg would translate that into a ZODB ConflictError to make  
the ZPublisher retry the transaction. Not kidding.


So, while I don't know much about the internals of DCOracle you may  
want to make sure the ConflictErrors are due to the ZODB at all.


Stefan


On 7. Aug 2005, at 23:50, Tim Peters wrote:





If you want to dig deeper, look into what happens inside
   lib/python/ZODB/ConflictResolution.py





I'll try to check this, thanks for the hint. :)



It's the only way you'll figure it out ;-)


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] large installations and conflict errors

2005-08-08 Thread Stefan H. Holek
Do you mount your catalog in a separate database? If not, you may  
want to try this to split up the conflict domains. Multiple catalogs  
may or may not help. Multiple databases will help more likely, IMO.


Stefan


On 8. Aug 2005, at 16:01, M. Krainer wrote:


Currently we think that our bottle neck is the 'portal_catalog' and
I'm working on splitting it up into multiple ZCatalogs.


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] [ANN] Zope 2.8.0 released

2005-06-11 Thread Stefan H. Holek

Wheee! Two thumbs up, Andreas. Thanks a lot!

Stefan


On 11. Jun 2005, at 08:51, Andreas Jung wrote:

on behalf of Zope Corporation and the Zope community I am pleased  
to announce the release of Zope 2.8.0.  You can download Zope 2.8.0  
from


 http://www.zope.org/Products/Zope/2.8.0/

Some new features of Zope 2.8:

  - ZODB 3.4 with MVCC (multi version concurrency control) support.
MVCC solves nearly every problem with ZODB read-conflict errors
which is very important for high-traffic Zope sites.

  - Extension Classes were rewritten as Python new-style classes  
making

all features of Python new-style classes available in Zope
objects. This includes support for cyclic garbage collection.

  - Integration of Zope 3 technologies through Five (see http:// 
codespeak.net/z3/five/)





--
Software Engineering is Programming when you can't. --E. W. Dijkstra

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Error Value: domains

2005-06-05 Thread Stefan H. Holek
The traceback says there is a PythonScript involved, and I am pretty  
sure there shouldn't. I assume you have created a script with a  
reserved name which is now interfering with user retrieval.


Welcome to implicit acquisition.

Stefan


On 4. Jun 2005, at 19:15, Know-iT - Christian Steinhauer wrote:


Module ZPublisher.Publish, line 98, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 39, in call_object
Module AccessControl.User, line 937, in manage_users
Module Shared.DC.Scripts.Bindings, line 306, in __call__
Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
Module App.special_dtml, line 180, in _exec
Module DocumentTemplate.DT_Util, line 201, in eval
__traceback_info__: user
Module , line 0, in ?
AttributeError: domains


--
Software Engineering is Programming when you can't. --E. W. Dijkstra

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] high loads, more threads, spinning wheels

2005-05-02 Thread Stefan H. Holek
I assume what you see are "hangs" i.e. Zope appearing to not accept new 
requests, as soon as all 4 worker threads are busy waiting for the 
RDBMS system to answer.

Now, using more threads will push back the point of unresponsiveness, 
but as soon as you have the 13th request hitting Zope, you are back at 
square one.

I see two ways of tackling the situation:
- Optimize the hell out of your RDBMS and your SQL queries. Make them 
return fast enough to handle the load.

- Write a front-end that does not rely on Zope but takes advantage of 
Apache's scalability features. This could be done in mod_python or 
mod_perl for example.

In that one project I am thinking about we ended up doing both. 
Sometimes you just have to accept that Zope is probably not the right 
tool for the job.

Stefan
On 2. Mai 2005, at 15:28, Jim Abramson wrote:
Upping the number of threads is unlikely to give you better
performance. The only case where this could make sense is if
you had something like a highly saturated RDBMS backend,
tying up your worker threads.
Well this is *exactly* the issue I'm facing.  I need to soften
the impact of this situation if possible, and it's going to be
ZEO in the end, but rolling this out is probably not going to
be possible in the very short term.
But - Zope threads don't operate like you probably expect
from knowing Apache and similar models. For one, they *never*
will run in parallel.
Python employs a global interpreter lock (GIL), so there will
only be a single thread "working" at all times. What you want
is to up the number of processes (interpreters) not the
number of threads. Hence ZEO.
So far I've done some very off-the-cuff tests upping the
threads/connections to 12/16 and banging on it with jmeter.
The results were favorable in comparison to the default config.
Could this have been a fluke?
Jim
--
Software Engineering is Programming when you can't. --E. W. Dijkstra
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] high loads, more threads, spinning wheels

2005-05-01 Thread Stefan H. Holek
On 29. Apr 2005, at 15:34, Jim Abramson wrote:
Can this be taken to mean that:
- the practical maximum number of threads to run your single (non-ZEO)
zope instance is {number of zodb connections in pool} else you risk
deadlock
You will want to make the connection pool a bit larger than the number 
of threads you start. But see below.

if yes, would upping the number of ZODB connections effectively raise
the ceiling - e.g. 12 ZODB connections -> 12 threads should perform
properly ?   Is increasing the number of ZODB cx's possible, let alone
advisable?  (why the default of 7 - not 6 or 8?)
Upping the number of threads is unlikely to give you better 
performance. The only case where this could make sense is if you had 
something like a highly saturated RDBMS backend, tying up your worker 
threads.

But - Zope threads don't operate like you probably expect from knowing 
Apache and similar models. For one, they *never* will run in parallel. 
Python employs a global interpreter lock (GIL), so there will only be a 
single thread "working" at all times. What you want is to up the number 
of processes (interpreters) not the number of threads. Hence ZEO.

More concretely, is there any good way to increase the request-handling
capacity of a standalone instance, beyond the limits imposed by the
defaults, without deploying ZEO?
Caching is essential. Put up a squid. And buy real hardware. Zope won't 
give you love on PC-class devices. Buy more RAM, and then some more.

And there is nothing wrong with ZEO, really, there's only advantages. I 
run it on my laptop even. On modern hardware you can easily run 2-4 ZEO 
clients per CPU.

HTH,
Stefan
--
Software Engineering is Programming when you can't. --E. W. Dijkstra
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Strange lockup during functional tests (sandboxed)

2005-04-23 Thread Stefan H. Holek
ZopeTestCase.app() returns a new connection which you would have to 
ZopeTestCase.close(app) after use. If you forget to close, you will 
deplete the connection pool and cause the hang you experience.

Also, note that the app argument to utility methods is *optional*, and 
setupCoreSessions() will manage the connection for you if you omit it.

So, make this ZopeTestCase.utils.setupCoreSessions() and all should be 
fine.

HTH,
Stefan
On 23. Apr 2005, at 15:39, Balazs Ree wrote:
ZopeTestCase.utils.setupCoreSessions(ZopeTestCase.Zope.app())
--
Software Engineering is Programming when you can't. --E. W. Dijkstra
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Description Strings in Archetypes

2005-04-11 Thread Stefan H. Holek
Please take this to the plone-users list. See http://plone.org/contact
Stefan
On 11. Apr 2005, at 18:36, S.D. wrote:
I'm running Archetypes 1.3.2-final in Plone 2.0.5 (Mac OS X Server). I 
added the
Article example from ArchExamples to the available items list in a 
Plone site.
It works fine except for the fact that when you look at a list of 
Articles
inside a given folder, each item's Description is taken from the 
Description
string of the containing folder rather than the Description attached 
to that
individual Article.
--
Software Engineering is Programming when you can't. --E. W. Dykstra
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ExtFile Extention Mappings

2005-04-09 Thread Stefan H. Holek
Why?
Because one of the main tricks of ExtFile is the ability to have files 
and images served statically by Apache, right out of the repository. 
Apache determines the mime type to serve from the file extension, ergo 
ExtFile has to make sure there is one.

How?
from mimetypes import guess_extension
ext = guess_extension(self.content_type)
If this yields the wrong result perhaps your system's mimetypes table 
is messed up? I must admit my use case is images for the most part, and 
they work just fine.

If this does not do what you want poke around a bit in Config.py. You 
can change almost every aspect of ExtFile's repository handling.

hth,
Stefan
On 8. Apr 2005, at 19:17, Edward Pollard wrote:
 I've done some poking at the source code but don't see why ExtFile is 
doing this or what logic it uses.
--
Software Engineering is Programming when you can't. --E. W. Dykstra
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Dynamic Zope Style Sheets with HTML 4.01 Strict

2005-04-01 Thread Stefan H. Holek
http://simplates.zetaweb.com/
On 31. Mär 2005, at 19:38, Andy Yates wrote:
So, how do I make a dynamic style sheet that has the correct (text/css)
content type?
--
Software Engineering is Programming when you can't. --E. W. Dykstra
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] pb : transparent folder 0.3 and ZSQL methods

2000-12-24 Thread Stefan H. Holek

On 22 Dec 2000, Didier Georgieff wrote:

> I have a (regular) folder on root level with ZSQL methods.
> I have a transparent folder on root level with a ZMySQLdatabase connection
> 
> When i manage any of the ZSQL method, i get that :
> Warning: There are no SQL database connections. You need to add a Zope 
> SQL database connection before you can use an Zope SQL Method
> BUT test tab works fine, and overall, the ZSQL methods called thru DTML are 
> still working (it didn't broke my application)

This is due to the way ZSQL Methods are looking up the DB connection
objects. You will have to modify the ZSQL Methods code as described in
http://www.egroups.com/message/zope/45078

HTH,
Stefan


___
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] LoginManager and SSL client authentication

2000-12-16 Thread Stefan H. Holek

On Fri, 15 Dec 2000, Mayers, Philip J wrote:

> We've got a bespoke application for storing our (very large) user account
> database here. One field a user can have is a crypted unix password (which
> I'm currently using to authenticate users). The other thing that can exist
> is the Subject or SubjectAltName of an SSL certificate suitable for client
> web authentication.
 
> 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?

What might possibly help you:

* Look into mod_ssl's FakeBasicAuth feature

* Look at those How-Tos:
http://www.zope.org/Members/unfo/apache_zserver_ssl
http://www.zope.org/Members/Roug/certificate_mapping

Regards,
Stefan


___
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] ZCatalog raises index out of range exception error

2000-12-16 Thread Stefan H. Holek

On Fri, 15 Dec 2000, Martin Winkler wrote:

> 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.

Do you have a SiteRoot-ed environment? I believe I saw this error when
trying to use the Catalog in a SiteRoot-ed folder...

No solution, sorry ;)
Stefan



___
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-13 Thread Stefan H. Holek

On Wed, 13 Dec 2000, Olaf Zanger wrote:

> i found out that spaces may be replaced by "+" in the link, 
> but how do i get the "+" into the  statement?

what you want is 

see the DTML guide:
http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.5.html

HTH
Stefan


___
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] Comment elimination...

2000-12-07 Thread Stefan H. Holek

On Thu, 7 Dec 2000, Curtis Maloney wrote:

> On Thursday 07 December 2000 08:05, Dieter Maurer wrote:
> > Curtis Maloney writes:
> >  > ... finding objects with "comment" in them 
> >
> > You can use the "Find" tab and fill the "containing" field
> > with "comment".
> 
>  duh!
> 
> I've been ignoring that tab for so long I don't even see it any more. (o8
> Yep, this does exactly what I want... thanks.
> 
> So I take it all the other people want is a 'replace' option added to this ?

This might be it then:
http://www.zope.org/Members/shh/ReplaceSupport

Regards,
Stefan



___
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] Search and replace interface

2000-12-06 Thread Stefan H. Holek

On Wed, 6 Dec 2000, Chris Withers wrote:

> There was a trhead recently abotu search and replace. It'd be great if
> Zope had a search and replace interface, wouldn't it? ;-)

May I humbly point you to the ReplaceSupport product I had cataloged
today... 

http://www.zope.org/Members/shh/ReplaceSupport/

It is not the object-level replace interface you were asking 
for, Chris, but it still helps a lot round here when we do 
things TTW. ;)

Regards,
Stefan


___
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] FTP in HTML-Kit? Sussed it!

2000-12-05 Thread Stefan H. Holek

On Tue, 5 Dec 2000, Jason Cunliffe wrote:

> Thanks for your notes, especially the  "open as text" tip.

I found an option in "Edit | Preferences | Workspace" named 
"Ignore file type when opening/inserting"

It may have (yet undetected) side effects, but doubleclicking
index_html now does what I would expect it to... ;)

Regards,
Stefan


___
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] What difference between subclassing from OFS:Folder andObjectManager

2000-12-05 Thread Stefan H. Holek

On Tue, 5 Dec 2000, Dirksen wrote:

> What is the difference between subclassing from OFS:Folder and ObjectManager? Is it 
>the
> ONLY difference that the ObjectManager is able to limit kinds of object to contain?
> 

Deriving from OFS:Folder will only give you global meta types in the
Addbox, whereas deriving from ObjectManager will only give you the
included ZClasses. I have not yet found a way to have both ;(

Stefan


___
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] ZSQLMethods

2000-12-04 Thread Stefan H. Holek

On Mon, 4 Dec 2000, Tom Deprez wrote:

> Thanks, is this code still efficient if the tables relate to 1:1 and you
> need to show a list of all records in a tabulare table?
> 
> eg key, NAME, ALIAS, 
> 
> where NAME is from database1 and ALIAS is from database2
> 
> The code below would impact that for every record in database1, I've to
> query database2
> Is there another way to do this? (more efficient?, ie less database query)

This might not apply to your case, but with many RDBMS you can also use
the dbname when qualifying columns. With MySQL for example, having 2 dbs
on the same server you can say:

select db1.table1.column1, db2.table2.column2
from db1.table1, db2.table2
...


HTH,
Stefan


___
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 Not Zope? 'Cos I like to bitch! ;-)

2000-12-01 Thread Stefan H. Holek

On Fri, 1 Dec 2000, Oleg Broytmann wrote:

> On Fri, 1 Dec 2000, Stefan H. Holek wrote:
> > >   Why isn't there a mod_zope module?
> >
> > There certainly are mod_snake and mod_python. Has anybody tried to run
> > Zope with one of those?
> 
>Zope is a server by itself, it doesn't need to be embedded ito Apache.

I (hope I) wasn't implying that Zope _needs_ to be embedded into
Apache. ;) 

I for my part am quite happy with proxypassing.

All I wanted to know is whether anybody had tried to run Zope with
mod_python/mod_snake yet. Zope can be (and is) run as [pf]cgi and 
there are more or less valid reasons to do just that.

Experiences anybody?


> 
>There IS mod_pcgi2 to connect Apache to Zope.
> 

I know there is, and I might even try it one day ;)


Regards,
Stefan


___
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 Not Zope? 'Cos I like to bitch! ;-)

2000-12-01 Thread Stefan H. Holek


>   Why isn't there a mod_zope module?

There certainly are mod_snake and mod_python. Has anybody tried to run
Zope with one of those?

Stefan


___
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] has_permission in PythonMethod

2000-11-30 Thread Stefan H. Holek

I have this (internal) PythonMethod called filtered_meta_types

user=self.REQUEST.AUTHENTICATED_USER
meta_types=[]
if callable( self.all_meta_types ):
  all=self.all_meta_types()
else:
  all=self.all_meta_types
for meta_type in all:
  if meta_type.has_key( 'permission' ):
# this is always false :(
if user.has_permission( meta_type['permission'], context ): 
  meta_types.append( meta_type )
  else:
meta_types.append( meta_type )
return meta_types

I do not get why the 'has_permission' condition is always false
If I mimic this function in DTML (yuk), it *does* work.

TIA,
Stefan

--
Things work better when plugged in 


___
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] login dialog text

2000-11-30 Thread Stefan H. Holek

On Thu, 30 Nov 2000, Ragnar Beer wrote:

> Hi Zopistas!
> 
> When users connect to a restricted area a dialog box pops up that 
> looks more or less like this:
> 
> 
> Enter user name for Zope at myhost:
>  User: _
> Password: _
> 
> 
> Where and how can I change the content of the first line so that it 
> would e.g. read "Enter user name for funky stuff at myhost"?

you can put the following in your start script somewhere before the exec

Z_REALM='my funky stuff'
export Z_REALM

HTH,
Stefan


___
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] ZopeWeaver?

2000-11-29 Thread Stefan H. Holek

On Wed, 29 Nov 2000, Simon Coles wrote:

> Yes, this works fine on the Mac. I suspect the difference is because 
> on the Mac they are taking the http content types to figure out the 
> content, but on Windows they are being lazy and using the file 
> extension. Why they didn't use the same code I don't know.

Thats just the way Windows works. Somehow M$ chose to determine the
filetype by the file extension, and the file extension only (and then
they chose to _hide_ the extension by default... ;). 

A somehow related issue is that IE seems to prefer file extensions over
any HTTP headers, MIME types and such.

Mac has a forked filesystem keeping type information separately. Thus no
problem with names.

Cheers,
Stefan


___
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] Factory location and Add box pollution

2000-11-28 Thread Stefan H. Holek


Thanks, but it doesn't ;) The prob is that anything inside the
projectfolder's ZClass becomes invisible...


On Mon, 27 Nov 2000, Lalo Martins wrote:

> Create all your ZClasses normally, and make projectfolder a
> subclass of Folder. Then, move all the Factories (except the
> projectfolderFactory) to inside the projectfolder ZClass. This
> should do the same trick as LocalFactory.
> 
> 
> On Mon, Nov 27, 2000 at 02:38:42PM +0100, Stefan H. Holek wrote:
> > I want to create a folderish ZClass to contain all my
> > project specific ZClasses. The idea is to only have them show up
> > when inside my projectfolder. Just like the ZClass object only
> > shows up inside a product's folder.
> > 
> > Well, when I derive from OFS:Folder I do get all the global stuff, but
> > _not_ my included ZClasses in the Add box. OTOH, deriving from
> > ZClasses:ObjectManager gives me my ZClasses, but _not_ the global
> > objects (DTML Methods, ...)
> > 
> > Deriving from _both_ gives me the behavior of whichever was named first.
> > 
> > I have seen the LocalFactory product, but this would force me to move
> > the factories and constructors out of my ZClasses. Its very existance
> > though might mean what I want is impossible :( 
> 
> 
> 
> []s,
>|alo
>+
> --
>   Hack and Roll  ( http://www.hackandroll.org )
> News for, uh, whatever it is that we are.
> 
> 
> http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
>  pgp key: http://zope.gf.com.br/lalo/pessoal/pgp
> 
> Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar
> 
> ___
> Zope 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] Factory location and Add box pollution

2000-11-27 Thread Stefan H. Holek

I want to create a folderish ZClass to contain all my
project specific ZClasses. The idea is to only have them show up
when inside my projectfolder. Just like the ZClass object only
shows up inside a product's folder.

Well, when I derive from OFS:Folder I do get all the global stuff, but
_not_ my included ZClasses in the Add box. OTOH, deriving from
ZClasses:ObjectManager gives me my ZClasses, but _not_ the global
objects (DTML Methods, ...)

Deriving from _both_ gives me the behavior of whichever was named first.

I have seen the LocalFactory product, but this would force me to move
the factories and constructors out of my ZClasses. Its very existance
though might mean what I want is impossible :( 

Lost,
Stefan

--
Things work better when plugged in 


___
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] seeking zope success stories in higher education

2000-11-24 Thread Stefan H. Holek


might be a start:
http://www.zope.org/Members/Kemalus/make_zope_decision

Stefan


___
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] images last-modified bug?

2000-11-24 Thread Stefan H. Holek

On Fri, 24 Nov 2000, Júlio Dinis Silva wrote:

> I read sometime ago of a bug in zope not sending images header
> last-modified, which cause browsers to always get images from
> zope not using the browser's cache. I'm seeing some different behaviour in 
> my site statistics since I upgrade from 216 to 222, and
> I think it could be related with this image problem. I search in HISTORY.txt 
> but I cant find nothing saying If the bug really existed and if it was 
> fixed.

http://classic.zope.org:8080/Collector/1737/view

its fixed for 2.2.4, sadly no patch for 2.2.2 afaik :(

Stefan


___
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] Objection to Python Script Name

2000-11-23 Thread Stefan H. Holek

On Thu, 23 Nov 2000, Chris Withers wrote:

> Chris Gray wrote:
> > 
> > I know, I know.  It's a little late to speak up, but I think there is a
> > logical objection to this name:  inconsistency with "DTML Method" and
> > "ZSQL Method".
> 
> These are old, horrible and will hopefully be re-thought and given
> different names ;-)

Ouch ;)

I had already made my point when the last poll was taking place.
Renaming the XY Methods will break all documentation, how-tos, snippets, 
whatever. After all the traffic the mismatch of the ZB and non-CVS Python
Methods has created, I really do not want to even imagine the flood of 
"My system does not have XY Methods" posts.

Hey, we are still using things like bobobase_modification_time...

Stefan


___
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] validation-onClick

2000-11-23 Thread Stefan H. Holek

On Thu, 23 Nov 2000, Angietel wrote:

> The form="a" and its input field="custid" is being validated, when the alert message 
>box came out then i clicked on the 'OK' button which is inside the alert message box, 
>but it return to another page instead return to form="a".
> ( I prefer to use 'onClick' instead of 'onSubmit' )

this is a good choice! onsubmit gives you troubles with some browsers.

>  

make this <... onclick="javascript:return checkid();">

Regards,
Stefan


___
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] sending thousands of emails in the background (returningthe webpage immediately) ?

2000-11-23 Thread Stefan H. Holek

On Thu, 23 Nov 2000, chas wrote:

> Goal: an end-user fills in a form on a webpage and clicks
>   the 'submit' button.  As a result, thousands of 
>   customized e-mail messages are sent.
> 
> Problems: 
> (i)   The msgs are customized so Mailman is not appropriate.
>   also, there is substantial workflow so Zope is preferred.
> (ii)  The end user only uses a web browser - s/he will not be
>   expected to log in and use ZClient, so the previous solution
>   suggested below is not viable.
> (iii) The confirmation webpage must return immediately... 
>   ie. we do not want to wait for all the emails to be 
>   sent before the page is returned to the user.
>   This has to be processed in the background (perhaps
>   for the next hour or so, even if the user logs off).
> 
>   Possible scenario : user logs on, fills in form, hits 'submit', 
>   confirmation webpage is returned to the user saying it's ok,
>   emails start to get sent out, user logs off, emails
>   continue to get sent out, user logs back on 2 hrs later
>   and its still processing.
> 
> 
> Anyone any ideas on this one ? Thanks a lot,

You might want to take a look at my bulk mailing how-to
http://www.zope.org/Members/shh/BulkMailHack/

Regards,
Stefan


___
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] Where does ZClassID come from?

2000-11-22 Thread Stefan H. Holek

How is the class id of a ZClass computed? From the filename?
Does this mean I cannot have MyZClass-0-0-1.zexp because the name must not
change?

TIA
Stefan

--
Things work better when plugged in 


___
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 Installing PKT

2000-11-22 Thread Stefan H. Holek

On Wed, 22 Nov 2000, Dany Rioux wrote:

> Error Value: No module named PythonMethod.PythonMethod
> 
> I would guess I'm missing some module. Anyone can tell me which one it is?

Well, you seem to be missing PythonMethods ;)

You must get them from the CVS. See http://www.zope.org/Resources/CVS_info

Stefan


___
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/DTML Document transparency

2000-11-22 Thread Stefan H. Holek

On Tue, 21 Nov 2000, Dieter Maurer wrote:

> Randall Kern writes:
>  > 
>  > In the case of DTML Documents, the following works fine:
>  > 
>  > 
>  > 
>  > In the case of ZClasses, I have to use something like this:
>  > 
>  > 
>  >   
>  > 
>  > 
>  > But this is rather ugly, and it's the sort of thing one shouldn't have =
>  > to do in an oo system.
>
> You may look at the mixin "ZCallable".
> I do not know what it does but the name suggests, it might
> perhaps help you.

I could not make ZCallable work ("too many datafull baseclasses" even if
it is the *only* baseclass). 

Maybe you could use the Renderable product, which lets you override the
__str__ method. 

Stefan


___
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: Re-2: [Zope] Search and replace

2000-11-20 Thread Stefan H. Holek

On 20 Nov 2000 [EMAIL PROTECTED] wrote:

> Hello Stefan,
> which replace product do you mean?
>   Arno

http://www.zope.org/Members/cguardia/replace

but be warned, it does NOT work with Zope 2.2.x (breaks your Folder.py)

Stefan


___
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] Search and replace

2000-11-20 Thread Stefan H. Holek


FWIW, there used to be the replace product that worked great for me with
Zope 2.1.6. Pity I upgraded ;)

Stefan


___
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] Avoiding acquisition aka testing for contained objects

2000-11-16 Thread Stefan H. Holek

On Wed, 15 Nov 2000, Johan Carlsson wrote:

> > If I want to know whether a certain object is contained in 
> > the current folder I do this:
> > 
> > 
> >   yes it's here
> > 
> >   not here
> > 

> hasattr(self.aq_base, 'index_html') should probably work.
> 
> aq_base returns the unwrapped base object.

Thanks, but it seems that aq_base is not available from DTML 

- Hmm

Regards,
Stefan


___
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 separate markup from presentation

2000-11-15 Thread Stefan H. Holek

On Wed, 15 Nov 2000, Tom Sheffler wrote:

> I'm aware of HiperDom, but I'm wondering if anyone has a good
> suggestion for how to structure docs so that docs can be written
> using abstract tags whose definition is separate.

[snip]
 
> This is the first part of the problem.  Additionally, I would
> like the definitions of my tags (MyH2Start and MyH2End) to be
> dependent on the context in which the content appears.  (If it
> shows up in a sidebar, an H2 looks one way, rather than in
> a main page where is looks another way.)

[snip]
 
> I'm not looking for a product as much as a suggestion for
> a methodology.  Any help appreciated.

You might still want to have look at the DTMLTemplate product ;)
http://www.zope.org/Members/halazar/Products/DTMLTemplate/

HTH
Stefan


___
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] ZCallable

2000-11-15 Thread Stefan H. Holek

I have this ZCallable product (from the PTK, I think). I do however not
manage to derive a ZClass from ZCallable. The error is something like "Too
many datafull base classes".

Is ZCallable not intended to work like that (the source hints to
some ExtensionClass business) or am I missing something?

TIA
Stefan

--
Things work better when plugged in 


___
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] Avoiding acquisition aka testing for contained objects

2000-11-15 Thread Stefan H. Holek

If I want to know whether a certain object is contained in 
the current folder I do this:


  yes it's here

  not here


Id like to know whether this is the best/most efficient way to do it.
Things like hasattr() are subject to aquisition i.e. they would find
an index_html method along the acquisition path; something I do not 
want. I also cannot bracket everything in a  because
chopping my namespace is not what I want either.

TIA,
Stefan

--
Things work better when plugged in 


___
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] Can Zope use a Different Python?

2000-11-10 Thread Stefan H. Holek

On Fri, 10 Nov 2000, Gary Perez wrote:

> We've got Zope 2.2.2 installed on a Linux box. We want to be able to use
> the full-up python that's on the box instead of the python interpreter
> that comes with Zope for playing with External Methods.
>
> Is there any way to circumvent Zope's python in this way?

get the source distribution

> Alternatively, we're plagued by import and attribute errors when
> accessing the External Methods. Will simply moving (or linking?) all the
> pieces (whatever.py, __init__.py, etc.) into a subdirectory of "Shared"
> fix the problem?

check your PYTHONPATH in the start script

hth,
stefan


___
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] Generating text/csv from DTML method, Mime Type?

2000-11-10 Thread Stefan H. Holek

On Fri, 10 Nov 2000, Farrell, Troy wrote:

> I know this sounds silly, but try making the url end with .csv
> I wrote a perl cgi script some time ago that spit out a csv file.  When it
> ended with .csv, IE seemed to ignore the server's Content-type: text/html
> header.

Not silly! I have also seen IE prefer the file extension over any MIME
type, HTTP header or whatever interoperable standard you may come up with.
Welcome to the Micro$oft way of making the Internet an extension of
its  desktop...



___
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] Is data.fs corrupted?

2000-11-10 Thread Stefan H. Holek

On Fri, 10 Nov 2000, Chris McDonough wrote:

> > FWIW, I can also report this problem with ZDiscussions. In my case it
> > stemmed from not properly deleting the ZDiscussion product before moving
> > my Data.fs from 2.1.6 to 2.2.1 (I think). The symptom then was beeing
> > unable to create ZSQL Methods (!) because of a missing
> > ../Products/ZDBase/ZDiscussions.py file which I "fixed" by installing
> > ZDBase again
> 
> Man that's weird.  But it's good info.  Does the current PTK include
> ZDiscussions?

Ah yes, I also had some PTK version installed in the 2.1.6 Zope; in case
this might be of importance. 

> > I can however NOT import the ZDiscussions.zexp
> > anymore because of "Duplicate Class Ids".
> 
> So it looks like a ZClass didn't get cleaned up properly when you deleted
> the ZDiscussions through-the-web product.  It might mean that there's a
> reference to an object in that area somewhere else in the ZODB.

I believe I *did not* delete ZDiscussions, but brought my Data.fs to
2.2.1 without having the product installed there. Operator error, I
suppose ;)

Funny thing is that I did not *use* any ZDiscussions, PTK or whatever
objects (anymore), just had the products hang around thinking they
were stale anyway...

Regards,
Stefan


___
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] Is data.fs corrupted?

2000-11-10 Thread Stefan H. Holek

On Fri, 10 Nov 2000, Chris Withers wrote:

> Chris McDonough wrote:
> > 
> > I'm going to take a guess.  It would appear AFAICT that the ZDiscussions
> > product installed an object which it hung off the root object (the
> > application object) when it was first imported.  
> 
> Don't rememebr seeing anything like this in ZDiscussions when I was
> looking over the code...
> 
> > The point being that I'd bet we'd find a programming error staring at us in
> > this sequence of events if we looked hard enough.  Though it's tempting to
> > call it a "ZODB corruption" problem, if you really get down to the lower
> > levels, it's likely an application-level problem.
> 
> Maybe it's a Zope-level rather than ZODB level problem? Maybe some of
> the ZClass machinery or product registration machinery is screwing
> things up?
> 
> Given that people have reported this from more than one product now, I'd
> be inclined to think it's not random bits of bad code in products. Maybe
> there's a method/pattern which used to be okay/recommended which is now
> causing problems?

FWIW, I can also report this problem with ZDiscussions. In my case it
stemmed from not properly deleting the ZDiscussion product before moving
my Data.fs from 2.1.6 to 2.2.1 (I think). The symptom then was beeing
unable to create ZSQL Methods (!) because of a missing
../Products/ZDBase/ZDiscussions.py file which I "fixed" by installing
ZDBase again. I can however NOT import the ZDiscussions.zexp
anymore because of "Duplicate Class Ids".

Oh well,
Stefan 


___
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] Bulk Mailing How-To!

2000-11-10 Thread Stefan H. Holek


For those who care: I have created a bulk mailing How-To at

http://www.zope.org/Members/shh/BulkMailHack/

Cheers,
Stefan

--
Things work better when plugged in 


___
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] ZMethod (Safe)

2000-11-09 Thread Stefan H. Holek

On Wed, 8 Nov 2000, Evan Simpson wrote:

> We've pretty much settled on restricted/unrestricted here.  In honor of the 
>presidential Indecision
> 2000 race, we're seriously thinking about revamping and rerunning the poll, so 
>ZMethod may well get
> its moment in the spotlight.
> 
> Cheers,
> 
> Evan @ digicool & 4-am


Enough! 
Imagine you actually and really do change the name of Python Method or
much worse the names of all XY Methods. Would that automatically change
all the Guides, How-Tos, Tips, Books, Emails, Articles, Sourcecode and
whatever it is we call Documentation? No it would not!

I herewith predict that changing the method names will add a layer of
confusion Zope just does not need.

My 0.02,
Stefan


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




  1   2   >