Re: [Zope-dev] Looping through a folder's contents...

2000-08-21 Thread David Trudgett

At 2000-08-20 23:06 -0700, [EMAIL PROTECTED] wrote:

I would like to loop through the contents of a folder, and the
contents of the subfolders of that folder.  I know I can do this to a
singular level by doing something like:

dtml-in "subfolder.objectValues('Folder')"
dtml-var title
/dtml-in

Should give me a list of the titles of all the subfolders of the
folder called "subfolder".  So, once I get there, how do I loop
through the subobjects of each of those folders?

In other words, I have a subfolder inside of the folder called
"subfolder" and I want to see the contents of that folder.  How do I
do it?
--

I've used code similar to the following in an external method before:

thisitem = self.getFirstChild()
while thisitem is not None:
 if thisitem.meta_type == 'DTML Document':
 ...
 thisitem = thisitem.getNextSibling()


I haven't tried to do it in DTML.

David Trudgett




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




Re: [Zope-dev] Data.fs

2000-08-21 Thread Toby Dickenson

On Sat, 19 Aug 2000 14:17:51 -0400 (EDT), Chris McDonough
[EMAIL PROTECTED] wrote:

 Surely this raises some data integrity issues if you copy in 
 mid-transaction?  Or does an incomplete transaction at the end of the db 
 just get thrown out, and the design of the db assure that only the end of 
 the file gets updated?

An incomplete transaction at the end of Data.fs gets ignored and
is subsequently overwritten by the next new transaction.  Data is always
appended to the file.

.except during an 'Undo', when one byte is rewritten in the middle
of the file.

Toby Dickenson
[EMAIL PROTECTED]

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




[Zope-dev] Re: [Zope] Looping through a folder's contents...

2000-08-21 Thread Andrew Kenneth Milton

+---[ [EMAIL PROTECTED] ]--
| I would like to loop through the contents of a folder, and the
| contents of the subfolders of that folder.  I know I can do this to a
| singular level by doing something like:
| 
| dtml-in "subfolder.objectValues('Folder')"
| dtml-var title
| /dtml-in
| 
| Should give me a list of the titles of all the subfolders of the
| folder called "subfolder".  So, once I get there, how do I loop
| through the subobjects of each of those folders?
| 
| In other words, I have a subfolder inside of the folder called
| "subfolder" and I want to see the contents of that folder.  How do I
| do it?

I'll give you the general case for 'all' folders:-

Make a Method...  Recurse_SubFolder.

dtml-in "root.objectValues('Folder')"
dtml-in "_.range(depth)"nbsp;/dtml-indtml-var title
dtml-var "Recurse_SubFolder(root=this(),depth=depth+1)"
/dtml-in

-

dtml-var "Recurse_SubFolder(root=subfolder, depth=0)"


You can obviously expand this to also take a 'type' for objectValues,
and pass the namespace etc.

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

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




[Zope-dev] Looping through a folder's contents...

2000-08-21 Thread jiva

I would like to loop through the contents of a folder, and the
contents of the subfolders of that folder.  I know I can do this to a
singular level by doing something like:

dtml-in "subfolder.objectValues('Folder')"
dtml-var title
/dtml-in

Should give me a list of the titles of all the subfolders of the
folder called "subfolder".  So, once I get there, how do I loop
through the subobjects of each of those folders?

In other words, I have a subfolder inside of the folder called
"subfolder" and I want to see the contents of that folder.  How do I
do it?
-- 
IBM Pollyanna Principle:
Machines should work.  People should think.

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




[Zope-dev] Methods with no __roles__ defined no always protected?

2000-08-21 Thread Chris Withers

Hi,

Just doing Squishdot for 2.2 when I noticed the following:

The SquishSite class has a method called item_count() which is used on
one of the management pages. It currently isn't protected by any
permissions or __roles__ and yet it still works fine on the management
screen concerned.

I thought this sort of thing was supposed to throw up an unauthorized
error in 2.2?

cheers,

Chris

PS: It is now protected by a permission, but I can send anyone who cares
a version which isn't...

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




[Zope-dev] acquired methods and permissions

2000-08-21 Thread Chris Withers

More questions from 2.2'ing Squishdot ;-)

If a method is acquired by an object, does it use any permissions
defined for that method in the object it's acquired from, or do you have
to specify the permissions in the acquiring object as well?

cheers,

Chris

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




[Zope-dev] attribute protection question

2000-08-21 Thread Chris Withers

In the new security model is it just attributes that are methods that
are protected or is it all attributes?

For example, I have a lump of text in an Article class which is stored
in self.body.

Now, would I need body__roles__=None or somethign similar to be able to
do:
dtml-var body
?

cheers,

Chris

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




Re: [Zope-dev] zpatterns: how to invalidate the attributecache?

2000-08-21 Thread Jephte CLAIN

"Phillip J. Eby" wrote:
 I don't see a need for a mass invalidation operation, just more
 documentation on these inner workings.  :)

or the lack of an attribute depencies mechanism :-)
if attribute x depends on attribute y from another generic attribute
provider, invalidation of y doesn't make y to be recomputed.

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




Re: [Zope-dev] Methods with no __roles__ defined no always protected?

2000-08-21 Thread Toby Dickenson

On Mon, 21 Aug 2000 12:15:24 +0100, Chris Withers [EMAIL PROTECTED]
wrote:
The SquishSite class has a method called item_count() which is used on
one of the management pages. It currently isn't protected by any
permissions or __roles__ and yet it still works fine on the management
screen concerned.

I thought this sort of thing was supposed to throw up an unauthorized
error in 2.2?

No, for two reasons:

Firstly, I assume your management page is a dtml file on disk, not a
dtml object stored in the ZODB. dtml files bypass *all* security
checks. 

Secondly, all objects that inherit from OFS.Item.SimpleItem (that is,
almost all high level objects) have the
__allow_access_to_unprotected_subobjects__ flag set. Your method would
be callable from through-the-web dtml too.


The basic rules of Zope security are fairly easy; its the exceptions
that cause the problems.

Toby Dickenson
[EMAIL PROTECTED]

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




Re: [Zope-dev] Methods with no __roles__ defined no always protected?

2000-08-21 Thread Chris Withers

Toby Dickenson wrote:
 Firstly, I assume your management page is a dtml file on disk, not a
 dtml object stored in the ZODB. dtml files bypass *all* security
 checks.

That's nice :(

 Secondly, all objects that inherit from OFS.Item.SimpleItem (that is,
 almost all high level objects) have the
 __allow_access_to_unprotected_subobjects__ flag set. Your method would
 be callable from through-the-web dtml too.

Even though it now has a permission attached to it?

cheers,

Chris

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




[Zope-dev] Unauthorized head hurting :(

2000-08-21 Thread Chris Withers

Is there any way you can find out what, exactly (ie a traceback ;-) is
causing an unauthorized error?

cheers,

Chris

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




RE: [Zope-dev] attribute protection question

2000-08-21 Thread Brian Lloyd

 In the new security model is it just attributes that are methods that
 are protected or is it all attributes?

All attributes - methods just happen to be the most common 
case.


 Now, would I need body__roles__=None or somethign similar to 
 be able to
 do:
 dtml-var body

Yes, or (better) associate the name of the attribute with 
a permission.


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 



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




[Zope-dev] Squish

2000-08-21 Thread Chris Withers

...it was named appropriately ;-)

Right, this would probably be easier if you have a background knowledge
of Confera/Squishdot code, anyway...

there's two classes, SquishSite and Posting. They don't inherit from
each other, but postings are always contained in a SquishSite and
eveything is Acquisition.Implicit-inheriting.

Right, there's a whole host of methods:
def postingValues(self): 
def tpId(self): 
def tpURL(self): 
def this(self): return self 
def has_items(self): 
def desc_items(self): 

...that are implemented identically. So I thought 'why?' Why can't they
just be implemented in the SquishSite class and acquired by the
postings? 

So I commented them out... bad move :( Things that used desc_items, and
a dtml-tree that used postingValues suddenly started producing infinite
recusion errors and other weirdness. I think, instead of returning the
children like postingValues is supposed to, it just returned the
children of the Site object instead. very strange. Can you help explain?

(it seemed to me like the method was being acquired alright, but the
'self' being used was that of the object the method was acquired from
rather than object the method was being called on)

The code for the two methods of any substance (the rest are just things
like 'return self' and 'return self.id') is shown below.

cheers,

Chris

# protected by 'View' permission
def desc_items(self): 
# """ return latest list of replies """ 
mlist = [] 
mstack = Stack() 
if self.has_items(): 
plist = [] 
for id in self.ids: 
plist.append(id) 
plist.reverse() 
for id in plist: 
mstack.push(id) 
while not mstack.isEmpty(): 
item_id = mstack.pop() 
item = self.data[item_id] 
mlist.append(item) 
if item.has_items(): 
plist = [] 
for id in item.ids: 
plist.append(id) 
plist.reverse() 
for id in plist: 
mstack.push(id) 
return map((lambda x, p=self: x.__of__(p)), mlist) 

# protected by 'Manage Postings' permission
def postingValues(self): 
# """ return all replies """ 
return map(lambda x, p=self: x.__of__(p),
self.data.map(self.ids)) 

self.data is an IOBtree in the SquishSite object.
self.ids is an intSet in the SquishSite object.
(I think both are acquired by Posting objects)

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




[Zope-dev] aq_inContextOf/can anyone explain this zmonitor log?

2000-08-21 Thread Bob Pepin

Hi,
I just experienced some very weird behaviour from aq_inContextOf while I was
trying to get Cut and Paste to work (I had to trace to the whole security stuff
to do this, and read the C source for the acquisition stuff the figure out what
aq_inContextOf does of course... thanks for having such a great, consistent,
mature and well-documented design Zope-guys...)
oh, btw, Copy  Paste seems to work only for objects that have their User
Source at the / level because of the behaviour of inContextOf.

well, here's the log:

Python 1.5.2 (#5, Aug 10 2000, 15:45:20)  [GCC 2.95.2 19991024 (release)]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Welcome to secure_monitor_channel connected 127.0.0.1:2625 at 859f680
 import Zope
import Zope
 app=Zope.app()
app=Zope.app()
 iee=app.iee
iee=app.iee
 doc1=app.iee.doc1
doc1=app.iee.doc1
 doc1.aq_inContextOf(iee)
doc1.aq_inContextOf(iee)
0
 doc1.aq_inContextOf(app)
doc1.aq_inContextOf(app)
1
 doc1.aq_inContextOf(app.iee)
doc1.aq_inContextOf(app.iee)
0
 iee.doc1.aq_inContextOf(app.iee)
iee.doc1.aq_inContextOf(app.iee)
0
 iee.doc1.aq_inContextOf(iee)
iee.doc1.aq_inContextOf(iee)
1
 app.iee.doc1.aq_inContextOf(iee)
app.iee.doc1.aq_inContextOf(iee)
0
 app.iee.doc1.aq_inContextOf(app.iee)
app.iee.doc1.aq_inContextOf(app.iee)
0
 doc1.aq_inContextOf(iee)
doc1.aq_inContextOf(iee)
0
 doc1=iee.doc1
doc1=iee.doc1
 doc1.aq_inContextOf(iee)
doc1.aq_inContextOf(iee)
1
 doc1.aq_inContextOf(app.iee)
doc1.aq_inContextOf(app.iee)
0
 doc1=app.iee.doc1
doc1=app.iee.doc1
 doc1.aq_inContextOf(app.iee)
doc1.aq_inContextOf(app.iee)

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




[Zope-dev] __ac_permissions__ question

2000-08-21 Thread Chris Withers

If I define the following in an Article class (which subclasses
Posting):

__ac_permissions__ = Posting.__ac_permissions__ + (
('View', ['prev_item','next_item','showSummary','desc_items'],
('Anonymous', 'Manager')),
)

and Posting.__ac_permissions__ also defines a 'View' permission, which
methods are covered?

(the ones from Posting, the ones from Article or (hopefully) the union
of the two sets of methods)

cheers,

Chris

PS: If it's nto the union, how can I achieve this effect?

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




[Zope-dev] Re: __ac_permissions__ question

2000-08-21 Thread Shane Hathaway

Chris Withers wrote:
 
 If I define the following in an Article class (which subclasses
 Posting):
 
 __ac_permissions__ = Posting.__ac_permissions__ + (
 ('View', ['prev_item','next_item','showSummary','desc_items'],
 ('Anonymous', 'Manager')),
 )

You don't need to concatenate the permissions of the base classes. 
default__class_init__ will pick them up.

 
 and Posting.__ac_permissions__ also defines a 'View' permission, which
 methods are covered?

Assertions made on a method in a subclass override the assertions made
in the base class.

I hope that's clear enough...

Shane

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




Re: [Zope-dev] Re: __ac_permissions__ question

2000-08-21 Thread Chris Withers

Shane Hathaway wrote:
  __ac_permissions__ = Posting.__ac_permissions__ + (
  ('View', ['prev_item','next_item','showSummary','desc_items'],
  ('Anonymous', 'Manager')),
  )
 
 You don't need to concatenate the permissions of the base classes.
 default__class_init__ will pick them up.

Now that I've got it in there ;-)

  and Posting.__ac_permissions__ also defines a 'View' permission, which
  methods are covered?
 
 Assertions made on a method in a subclass override the assertions made
 in the base class.

Okay, Posting has the following list of methods for the 'view'
permission:
['date_posted','body_len','date_created','time_created','attachment','thread_path','index_html','showBody',
 
'desc_items','dupString','striptags','tpId','tpURL','this','has_items','thread','title','author','body',
  'email','subject']

Now, what I want to do is add the following methods to this list for the
Article class which subclasses Posting:
['prev_item','next_item','showSummary','desc_items']

How do I do that? 

cheers,

Chris

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




[Zope-dev] intSet and the new security model

2000-08-21 Thread Chris Withers

Hi,

Squishdot uses an intSet called 'thread' to store some information.
Items in this intSet are used in several DTML methods, for example:

A HREF="dtml-var site_url /dtml-var expr="thread[0]"
/index_html#dtml-var id "Return to main thread/A

Now, in Zope 2.2 this throws an unauthorized error as show in the PS.

How can I make this go away in a non-hacky fashion?

cheers,

Chris

PS:

!--
Traceback (innermost last):
  File E:\Zope\227194~1.0\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
  File E:\Zope\227194~1.0\lib\python\ZPublisher\Publish.py, line 187, in
publish
  File E:\Zope\227194~1.0\lib\python\ZPublisher\Publish.py, line 171, in
publish
  File E:\Zope\227194~1.0\lib\python\ZPublisher\mapply.py, line 160, in
mapply
(Object: addPostingForm)
  File E:\Zope\227194~1.0\lib\python\ZPublisher\Publish.py, line 112, in
call_object
(Object: addPostingForm)
  File E:\Zope\227194~1.0\lib\python\OFS\DTMLMethod.py, line 167, in
__call__
(Object: addPostingForm)
  File E:\Zope\227194~1.0\lib\python\DocumentTemplate\DT_String.py, line
502, in __call__
(Object: addPostingForm)
  File E:\Zope\227194~1.0\lib\python\DocumentTemplate\DT_Util.py, line
337, in eval
(Object: thread[0])
(Info: thread)
  File lt;stringgt;, line 0, in ?
  File E:\Zope\227194~1.0\lib\python\DocumentTemplate\DT_Util.py, line
168, in careful_getitem
  File E:\Zope\227194~1.0\lib\python\OFS\DTMLMethod.py, line 189, in
validate
(Object: addPostingForm)
  File E:\Zope\227194~1.0\lib\python\AccessControl\SecurityManager.py,
line 139, in validate
  File
E:\Zope\227194~1.0\lib\python\AccessControl\ZopeSecurityPolicy.py, line
159, in validate
Unauthorized

--

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




[Zope-dev] intSet and the new security model: solved with hack :(

2000-08-21 Thread Chris Withers

Chris Withers wrote:
 Squishdot uses an intSet called 'thread' to store some information.
 Items in this intSet are used in several DTML methods, for example:
 
 A HREF="dtml-var site_url /dtml-var expr="thread[0]"
 /index_html#dtml-var id "Return to main thread/A
 
 Now, in Zope 2.2 this throws an unauthorized error as show in the PS.

I'ev solved this

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




[Zope-dev] Re: intSet and the new security model: solved with hack :(

2000-08-21 Thread Chris Withers

Chris Withers wrote:
  Squishdot uses an intSet called 'thread' to store some information.
  Items in this intSet are used in several DTML methods, for example:
 
  A HREF="dtml-var site_url /dtml-var expr="thread[0]"
  /index_html#dtml-var id "Return to main thread/A
 
  Now, in Zope 2.2 this throws an unauthorized error as show in the PS.

I've solved this now by adding a method to SquishSite:

def getThread(self, index):
"""A nasty hack since intSet's became protected in Zope 2.2.0"""
return self.thread[index]

This is nasty 'cos it means everyone with old Squish Sites will haveto
change them :(

Anyone got anything better?

cheers,

Chris

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




Re: [Zope-dev] Re: __ac_permissions__ question

2000-08-21 Thread Shane Hathaway

Chris Withers wrote:
 Okay, Posting has the following list of methods for the 'view'
 permission:
 
['date_posted','body_len','date_created','time_created','attachment','thread_path','index_html','showBody',
 
 
'desc_items','dupString','striptags','tpId','tpURL','this','has_items','thread','title','author','body',
   'email','subject']
 
 Now, what I want to do is add the following methods to this list for the
 Article class which subclasses Posting:
 ['prev_item','next_item','showSummary','desc_items']
 
 How do I do that?

class Article:

  __ac_permissions__ = (
('View', ('prev_item', 'next_item', 'showSummary', 'desc_items')),
)

  ... etc ...

Globals.default__class_init__(Article)

This should work as expected.  Security assertions are inherited except
when overridden.

BTW did getSubject() solve your other problem?  I'm not sure irc is
going to work again.  "irc.openprojects.net" seems to be too busy.

Shane

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




RE: [Zope-dev] attribute protection question

2000-08-21 Thread Brian Lloyd

 Hmmm. Hence the problem with properties that meant OFS.Item.SimpleItem
 had to have __allow_access_to_unprotected_subobjects__=1?
 
 Can you not just assign roles to properties as they're created or am I
 missing something else?

That's one way to do it - but it will require some thought 
to make sure we do it right. Having the "=1" assertion is 
a short-term solution intended to avoid breaking everyone's 
code for 2.2 while taking a step on the road to changing 
the default policy. I expect that it will soon make a 
distinction between properties and attributes that are not 
properties, which will be the next step on the road. I'd 
like to see this for 2.3, but I don't promise specific 
features for particular release numbers anymore :) 

I do want it to be Soon. My hope is that we'll release a 
2.x beta where:

  o far less things are available via the __allow_... hack

  o product authors and app builders will have auth problems 
because they're using attrs formerly covered by the hack

  o the new security assertion spelling from dev.zope.org will 
be available and make it much easier for people to go in 
and protect the problem attrs correctly :)

  o most if not all of the Zope core will be using the new 
assertion style, which will help the product authors along 
with the "guide" to making security assertions that will 
be a deliverable of that dev.zope.org project

  o we'll be one more step closer to where we want to be


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 



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




[Zope-dev] Squishdot and Zope 2.2

2000-08-21 Thread Chris Withers

Shane Hathaway wrote:
  How do I do that?
 
 class Article:
 
   __ac_permissions__ = (
 ('View', ('prev_item', 'next_item', 'showSummary', 'desc_items')),
 )
 
   ... etc ...
 
 Globals.default__class_init__(Article)

Okay, I've changed it to that now :-)

 BTW did getSubject() solve your other problem?  

I don't think I got that bit ;-)

The subject issue was solved by mixing RoleManager into posting.
Does everything have to have RoleManager mixed in now? :S

Then there was the thread[0] intSet issue which was solved with a hacky
getThread() method.
*grumble* *grumble* why aren't intSet's done properly?!

cheers,

Chris

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




[Zope-dev] Fighting with ZServer

2000-08-21 Thread Dieter Maurer

Since this afternoon, I am fighting with ZServer.
Currently, it seems Zserver is winning 
I do not understand, what I see...

At work: Zope 2.1.6, Sparc Solaris 2.7, Linux Netscape 4.51

  Sometimes, images are not shown by Netscape (broken image).
  No "simple" reload is able to change this, however a "forced" reload
  lets Netscape show the image correctly.
  From then on, the image is always shown correctly: by "simple" reload,
  "forced" reload or directly (served from cache).

  The strange thing, inside "Image.index_html" the failing
  "simple" reload and the succeeding "forced" reload look
  completely identical.


At home: Zope 2.1.6, Intel Linux 2, Linux Netscape 4.5

  All images are always shown correctly.
  However, there is no log entry in "var/Z2.log" for
  about 50 % of the requests that are answered by
  a 304 response. It is non-deterministic whether
  a log entry is written or not.


Did you ever see something like this?


Dieter

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




[Zope-dev] ZServer logging bug (was: Fighting with ZServer)

2000-08-21 Thread Dieter Maurer

Dieter Maurer writes:
  Since this afternoon, I am fighting with ZServer.
  
  
  At home: Zope 2.1.6, Intel Linux 2, Linux Netscape 4.5
  
All images are always shown correctly.
However, there is no log entry in "var/Z2.log" for
about 50 % of the requests that are answered by
a 304 response. It is non-deterministic whether
a log entry is written or not.

This is partially analysed:

 ZServer looses log entries, when its client closes the
 connection too fast.

 On my linux machine, ZServer looses all log entries, when 
 it answers requests with code 304 to a local httplib
 client that immediately deletes the reply after
 "getreply".

 ZServer uses a "producers.hooked_producer" for logging.
 Such a producer calls its hook function when the primary
 producer runs out of data. The hook function performs
 the logging.

 When the client closes its socket immediately, then,
 probably, not all data of the producer is consumed and
 the hook function is not called -- no log entry.


The problem occurs in Zope 2.1.6 and Zope 2.2.1b1 (CVS 2000-8-19).

Apparently, the problem is not restricted to code 304.
Requests answered with code 404 (not found) seem to be
affected, too.


Dieter

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




Re: [Zope-dev] LoginManager.

2000-08-21 Thread Bill Anderson

Terje Malmedal wrote:
 
 Can anybody please provide a simple example of a working usersource
 written in python?


Look at the UserSource source for LoginManager and Membership.

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

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




[Zope-dev] Re: [Zope] Looping through a folder's contents...

2000-08-21 Thread Andrew Kenneth Milton

+---[ [EMAIL PROTECTED] ]--
| What would the "Recurse_Subfolder" method do?
| 
|  dtml-in "root.objectValues('Folder')"
|  dtml-in "_.range(depth)"nbsp;/dtml-indtml-var title
|  dtml-var "Recurse_SubFolder(root=this(),depth=depth+1)"
|  /dtml-in

That *is* Recruse_Subfolder :-)

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

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




[Zope-dev] Re: [Zope] Looping through a folder's contents...

2000-08-21 Thread jiva

What would the "Recurse_Subfolder" method do?

On Mon, Aug 21, 2000 at 04:12:05PM +1000, Andrew Kenneth Milton wrote:
 +---[ [EMAIL PROTECTED] ]--
 | I would like to loop through the contents of a folder, and the
 | contents of the subfolders of that folder.  I know I can do this to a
 | singular level by doing something like:
 | 
 | dtml-in "subfolder.objectValues('Folder')"
 | dtml-var title
 | /dtml-in
 | 
 | Should give me a list of the titles of all the subfolders of the
 | folder called "subfolder".  So, once I get there, how do I loop
 | through the subobjects of each of those folders?
 | 
 | In other words, I have a subfolder inside of the folder called
 | "subfolder" and I want to see the contents of that folder.  How do I
 | do it?
 
 I'll give you the general case for 'all' folders:-
 
 Make a Method...  Recurse_SubFolder.
 
 dtml-in "root.objectValues('Folder')"
 dtml-in "_.range(depth)"nbsp;/dtml-indtml-var title
 dtml-var "Recurse_SubFolder(root=this(),depth=depth+1)"
 /dtml-in
 
 
 dtml-var "Recurse_SubFolder(root=subfolder, depth=0)"
 
 
 You can obviously expand this to also take a 'type' for objectValues,
 and pass the namespace etc.
 

-- 
A homeowner's reach should exceed his grasp, or what's a weekend for?

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




RE: [Zope] Strange behaviour on authorization

2000-08-21 Thread Jarkko Veijalainen

now, i have defined same owner to every document in that folder, but it
did'nt help me.

I cranked litle bit my pages and discovered little more where is the
problem. Problem isn't POSTING data, it's the return value that Zope doesn't
want to publish.

clip

font face="Verdana, Arial" color="#ff"
dtml-let resDTML="Imap('Authentication',REQUEST,1)"
h2User dtml-var "resDTML.cn" dtml-var title_or_id/h2
/font

FORM ACTION="email_headers" METHOD="POST" 

/TDTDfont color="#00" face="Verdana, Arial, Helvetica"
size="1"dtml-var "resDTML.account"nbsp; /TD

/clip


Problem tag is dtml-var "resDTML.cn" that that causes following traceback,
when i remove this tag. Traceback bugs me about Unauthorized: account, which
is 2nd value from external methods returned object resDTML.
So problem is publishing contest of resDTML called in DTML-LET-tags. This
don't make any sense if i have to validate every return value from external
method, it's just unacceptable. In external method, i have simple class and
instance of that class is return value of method. I repeat this again, ALL
THIS THINGS DID work with Zope 2.1.6. How can i fix this?


Traceback (innermost last):
File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 222,
in publish_module
File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 187,
in publish
File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 171,
in publish
File /usr/local/Zope-2.2.0/lib/python/ZPublisher/mapply.py, line 160, in
mapply
  (Object: email_accounts)
File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 112,
in call_object
  (Object: email_accounts)
File /usr/local/Zope-2.2.0/lib/python/OFS/DTMLDocument.py, line 171, in
__call__
  (Object: email_accounts)
File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
  (Object: email_accounts)
File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Let.py, line
147, in render
  (Object: resDTML="Imap('Authentication',REQUEST,1)")
File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Util.py, line
337, in eval
  (Object: resDTML.cn)
  (Info: resDTML)
File string, line 0, in ?
File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Util.py, line
142, in careful_getattr
File /usr/local/Zope-2.2.0/lib/python/OFS/DTMLMethod.py, line 194, in
validate
  (Object: email_accounts)
File /usr/local/Zope-2.2.0/lib/python/AccessControl/SecurityManager.py,
line 139, in validate
File
/usr/local/Zope-2.2.0/lib/python/AccessControl/ZopeSecurityPolicy.py, line
159, in validate
  Unauthorized: cn

jarkkov


 try so POST data to email_headers with login form, popups Authorization
 failed window. I have tried to use my manager and superuser name and same
 values that i submitted, but nothing is accepted to auth. window.
...
 so i have authenticated user and i still can't login. All these documents
 work like they're supposed to in Zope 2.1.6, but not anymore when i
 installed Zope 2.2.0 on Solaris. Why is Zopesecurity trying to validate
 'cn', which is value that i submit to another document.

 What went wrong here and how i fix this problem?

Aha, it worked in 2.1.6 eh? That's the tip off. A *major* change between
2.1.x and 2.2.x is in the security dept. 2.2.x runs all methods using the
security level of the _owner_ of the method, regardless of whether this is a
lower or higher level than the currently authenticated user. My guess is
that your method has no owner (which is what pre-2.2.x objects default to
when run under 2.2.x). This means it is running as anonymous which does not
have rights to do what you want. Specify an owner for the method that has
sufficient rights to do what you want and try it again.


___
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] [Fwd: My problem or tree tag bug?]

2000-08-21 Thread Chris Withers

Dieter Maurer wrote:
 The message seemed to be sent only to me.

whoops... Reply/Reply All user error bug ;-)

cheers,

Chris

 
 Chris Withers writes:
   Dieter Maurer wrote:
  (Info: ([None, (['966520543', []],)], ['966520928', '966520893',
  --state  -
  '966520543']))
Somehow, your state became a tuple. It should be a list.
  
   Is there anything in postingValues that could cause this? I'm trying to
   decide whether it's something my code is doing wrong or whether it's a
   bug in dtml-tree..
 I think, I found a bug in "TreeTag".
 If your "branches" method produces an empty tree,
 then the state is generated as a tuple and not as a list.
 However, it does not look as in your example.
 
 The code is near line 249:
 state= state or ([id],)
 
 If you change this to a list, this may help (though chances are
 not too great).
 
After looking at the code, I fear, your many trees on one
page will not work, unless they have the "single" argument.
  
   What's the 'single' argument?
 I tells the tree to have at most one branch unfolded.
 If you klick at one branch, any other open branch
 is coalesced.
 This tree mode does not require a cookie.
 
   ... Tree Tag rewrite 
   What do people think?
 
 I think:
 
   *  rewriting the tree tag would be a good idea.
 
   *  I would complain, if the DTML features would be
  restricted.
 
  I would like to have structured variable
  names, e.g. "x/y/z". It will, however,
  lead to more problems with URL references
  in text included in this way.
  These problems exist today, but people that
  understand the nested with are more likely
  able to understand the URL problems then
  those that use "x/y/z".
 
  I like your proposal to have a calling feature
  direct in DTML without the need to go via
  "expr" (and therefore Python).
 
 Dieter

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




[Zope] Newbie's ZWiki patch

2000-08-21 Thread Jean Jordaan

Hi all 

I've overreached myself and patched ManagedMode ZWiki (love it,
by the way), 'cause I couldn't stand the tag-abuse of the 
annotations, involving a table with explicit border- and color-
specifications, all in the face of users editing the source of 
zwikipages. I've changed it to::

  p class="wiki_edited"/p
  p class="wiki_approved"/p
  p class="wiki_rejected"/p

Of course, this presupposes a couple of CSS specs in the 
'standard_zwiki_header' or someplace .. 

My changes to 'ZWikiPage.py' are marked 'njj:' in the following::

  ###
  # If edit marker hasn't already been filled in by approval activity
  # then append one
  if s  '':  
# njj: this is blatantly abusing 'bgc'. I could have changed
# njj: 'bgc' everywhere to, for example, 'edit_class', assigning
# njj: it the values 'wiki_edit', 'wiki_approved', and 
# njj: 'wiki_rejected' in the first place.
text = text + '\np class="'
if bgc == '#f0f0f0':# njj: light silver = 'Contributed by ' or
'Edited by '.
  text = text + 'wiki_edited"' + s + '/p\n'
if bgc == '#99ff66':# njj: light green = 'Approved by '.
  text = text + 'wiki_approved"' + s + '/p\n'
if bgc == '#ffcc33':# njj: light red = 'Rejected by '.
  text = text + 'wiki_rejected"' + s + '/p\n'
# njj: text = text + '\nptable class=mm width="100%" bgcolor=' 
# njj: text = text + bgc 
# njj: text = text + ' cellspacing="0" frame="box" border="1"trtd'
# njj: text = text + s + '/td/tr/table/p\n'

Do any of you know of anyplace this is going to break? Does 
anyone think it's worthy of proper integration? I don't know
if legacy browser support is an overriding issue here, since
Lynx and W3, for example, certainly wouldn't do any better with 
the table than with the CSS .. AFAIK .. 

-- 
Jean Jordaan   --technical writer--
Mosaic Sofware --Zope 2.1.6 on WinNT and W2K

___
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] Anyone tried Tomahawk

2000-08-21 Thread Steve Alexander

Anyone tried Tomahawk yet?

  http://freshmeat.net/projects/tomahawk/

Tomahawk is an Apache-based Web server with integrated Squid object
cache capabilities running on an intuitive Web-based UI. As well as
dramatically increasing server performance, Tomahawk simplifies the
operation of maintaining an object-cache accelerated Web server.

There's also http://anemone.electricc.com/ for real-time reporting.

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

___
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] Tracker and Zope 2.2

2000-08-21 Thread Hanno Schulz


It is from CVS, i think from friday.

We first tried it with an old version (round 
about two month) and got the same error.


Hanno Schulz


Am Fre, 18 Aug 2000 schrieb Ken Manheimer:
 Is the tracker you're using a recent checkout from the CVS repository,
 or something else?  Where did you get it and how recently?

 Ken Manheimer
 [EMAIL PROTECTED]
 
 -Original Message-
 From: Hanno Schulz [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 18, 2000 6:03 AM
 To: [EMAIL PROTECTED]
 Subject: [Zope] Tracker and Zope 2.2
 
 
 Hi!
 
 I tried to add Tracker on my Zope 2.2 and get following error after
 inserting
 id an title and press the add button.
 
 --
 Zope Error
 Zope has encountered an error while publishing this resource. 
 Error Type: TypeError
 Error Value: string, None
 
 Troubleshooting Suggestions
 
 The URL may be incorrect. 
 The parameters passed to this resource may be incorrect. 
 A resource that this resource relies on may be encountering an error. 
 
 Traceback (innermost last):
   File
 /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line
 222, in publish_module
   File
 /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line
 187, in publish
   File /usr/local/Zope-2.2.0-linux2-x86/lib/python/Zope/__init__.py,
 line 221, in zpublisher_exception_hook
 (Object: RoleManager)
   File
 /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line
 171, in publish
   File /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/mapply.py,
 line 160, in mapply
 (Object: addTracker)
   File
 /usr/local/Zope-2.2.0-linux2-x86/lib/python/ZPublisher/Publish.py, line
 112, in call_object
 (Object: addTracker)
   File
 /usr/local/Zope-2.2.0-linux2-x86/lib/python/Products/ExternalMethod/Exte
 rnalMethod.py, line 251, in __call__
 (Object: addTracker)
 TypeError: (see above)
 
 --
 
 
 
 Thanks for any help
 
 Hanno Schulz
 
 catWorkX GmbH
 Stresemannstr. 364
 22761 Hambug
 http://www.catworkx.de
 http://www.catbridge.de
 
 Tel.: +49 40 890 646 0
 Fax:  +49 40 890 646 66
 
 ___
 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 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] My problem or tree tag bug?

2000-08-21 Thread Chris Withers

Dieter Maurer wrote:
   (Info: ([None, (['966520543', []],)], ['966520928', '966520893',
   --state  -
   '966520543']))
 Somehow, your state became a tuple. It should be a list.

Is there anything in postingValues that could cause this? I'm trying to
decide whether it's something my code is doing wrong or whether it's a
bug in dtml-tree..

 The state is read from the namespace under the name 'tree-s'.
 Usually, this is a cookie.

AFAIK, I'm not playing with tree-s or anything else that I shouldn't be.
Is there anything else I could be doing to cause this problem?

 After looking at the code, I fear, your many trees on one
 page will not work, unless they have the "single" argument.

What's the 'single' argument?

   Otherwise, at the end of "TreeTag.tpRender" each tree
   will set the "tree-s" cookies killing the previous tree's
   state.

Several times I've considered re-writing the tree tag from scratch since
the cookie-state thing often seems to break down unless used in simple
circumstances and the code in Treetag.py does seem a bit of a crufty
mess (branches, branches expr, having to specify expr instead of just
using "", no _ in expr, state in cookies (which can really go badly
wrong :S), hard coded formatting of trees, etc) but the last time I put
it off because I thought a major overhaul of DTML was imminent. (in that
instance, I just used an external method to generate my tree since it
was quicker and easier than making dtml-tree behave like I wanted...)

I still think DTML needs a major overhaul but there seems to be a lot of
resitence to this (maybe rightly so?) Perhaps it's time to just redo the
tree tag in isolation then?

What do people think?

cheers,

Chris

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




Re: [Zope] My problem or tree tag bug?

2000-08-21 Thread Phil Harris

Chris,

goad-mode

Go on rewrite that tree-tag, go on I dare you.  Make it better, go on, I bet
you can't.

/goad-mode

8^)

Phil
[EMAIL PROTECTED]

- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 21, 2000 9:47 AM
Subject: [Zope] My problem or tree tag bug?


 Dieter Maurer wrote:
(Info: ([None, (['966520543', []],)], ['966520928', '966520893',
--state  -
'966520543']))
  Somehow, your state became a tuple. It should be a list.

 Is there anything in postingValues that could cause this? I'm trying to
 decide whether it's something my code is doing wrong or whether it's a
 bug in dtml-tree..

  The state is read from the namespace under the name 'tree-s'.
  Usually, this is a cookie.

 AFAIK, I'm not playing with tree-s or anything else that I shouldn't be.
 Is there anything else I could be doing to cause this problem?

  After looking at the code, I fear, your many trees on one
  page will not work, unless they have the "single" argument.

 What's the 'single' argument?

Otherwise, at the end of "TreeTag.tpRender" each tree
will set the "tree-s" cookies killing the previous tree's
state.

 Several times I've considered re-writing the tree tag from scratch since
 the cookie-state thing often seems to break down unless used in simple
 circumstances and the code in Treetag.py does seem a bit of a crufty
 mess (branches, branches expr, having to specify expr instead of just
 using "", no _ in expr, state in cookies (which can really go badly
 wrong :S), hard coded formatting of trees, etc) but the last time I put
 it off because I thought a major overhaul of DTML was imminent. (in that
 instance, I just used an external method to generate my tree since it
 was quicker and easier than making dtml-tree behave like I wanted...)

 I still think DTML needs a major overhaul but there seems to be a lot of
 resitence to this (maybe rightly so?) Perhaps it's time to just redo the
 tree tag in isolation then?

 What do people think?

 cheers,

 Chris

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


___
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] Looping through a folder's contents...

2000-08-21 Thread jiva

I would like to loop through the contents of a folder, and the
contents of the subfolders of that folder.  I know I can do this to a
singular level by doing something like:

dtml-in "subfolder.objectValues('Folder')"
dtml-var title
/dtml-in

Should give me a list of the titles of all the subfolders of the
folder called "subfolder".  So, once I get there, how do I loop
through the subobjects of each of those folders?

In other words, I have a subfolder inside of the folder called
"subfolder" and I want to see the contents of that folder.  How do I
do it?
-- 
IBM Pollyanna Principle:
Machines should work.  People should think.

___
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] Looping through a folder's contents...

2000-08-21 Thread Andrew Kenneth Milton

+---[ [EMAIL PROTECTED] ]--
| I would like to loop through the contents of a folder, and the
| contents of the subfolders of that folder.  I know I can do this to a
| singular level by doing something like:
| 
| dtml-in "subfolder.objectValues('Folder')"
| dtml-var title
| /dtml-in
| 
| Should give me a list of the titles of all the subfolders of the
| folder called "subfolder".  So, once I get there, how do I loop
| through the subobjects of each of those folders?
| 
| In other words, I have a subfolder inside of the folder called
| "subfolder" and I want to see the contents of that folder.  How do I
| do it?

I'll give you the general case for 'all' folders:-

Make a Method...  Recurse_SubFolder.

dtml-in "root.objectValues('Folder')"
dtml-in "_.range(depth)"nbsp;/dtml-indtml-var title
dtml-var "Recurse_SubFolder(root=this(),depth=depth+1)"
/dtml-in

-

dtml-var "Recurse_SubFolder(root=subfolder, depth=0)"


You can obviously expand this to also take a 'type' for objectValues,
and pass the namespace etc.

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

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




Re: [Zope] My problem or tree tag bug?

2000-08-21 Thread Chris Withers

Phil Harris wrote:
 Go on rewrite that tree-tag, go on I dare you.  Make it better, go on, I bet
 you can't.

Yeah, maybe, once Squishdot PTK is finished ;-)

cheers,

Chris

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




[Zope] Compare Zope, IPS, Vignette

2000-08-21 Thread SKarthik


Hi,

Iam trying to evaluate few Content Management softwares. I have IPS Content
Center, Zope and Vignette. Could some one hilight me with the pros and cons
of these softwares.

Thanks,
- Karthik
--
S.Karthikeyan
LG Soft India Private Limited, Bangalore.
Tel Nos: +91-80-299 6890/7361/7362
E-Mail: '[EMAIL PROTECTED]'


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




[Zope] ZCatalog and Traversable questions

2000-08-21 Thread Chris Withers

Hi :-)

1. Are the paths you supply to catalog_object() supposed to start with a
   '/'? I think they should but I'd like some sort of confirmation :S

2. Why isn't there a Traversal Interface method to allow you to actually 
   get the physical path of an object? (for use in cataloging them, 
   for example ;-) I'd assumed getPhysicalPath() would do this but I see 
   it returns a tuple :(

Any ideas?

cheers,

Chris

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




Re: [Zope] tree plus/minus url

2000-08-21 Thread Tino Wildenhain

Hi,

Ragnar Beer wrote:
 
 Too late, I already posted it before I went on holiday :(

May be its possible to update the posting?
 
 Ragnar
 
 Ragnar Beer wrote:
 
   I found quite an easy solution for Zope 2.1.6:
 
   In lib/python/TreeDisplay/TreeTag.py you have to replace the "old
   code" with the "new code". (Blame me - I forgot to make a copy
   beforehands which keeps me from using diff.)
 
   The idea is to "export" the piece of code that puts together the url
   to treeData['tree-item-clickurl'] so that you can access it with
   dtml-var tree-item-clickurl within your tree-tag. I haven't checked
   this for unwanted side effects. Perhaps someone more familiar with
   the zope code could do that? For me it works fine!
 
 Would you mind including an alias for tree-item-clickurl which reads
 tree_item_clickurl before posting it to the collector?
 
 I hope we can make all this ugly hypenation variables go away someday...
 
 Regards
 Tino Wildenhain
 _[_['sequence-item']] avoidance taskforce.

___
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] Broken ZDiscussions-0.5.3 on 2.2.1b1: missing comma...

2000-08-21 Thread J M Cerqueira Esteves


I tried to install ZDiscussions (ZUBB) 0.5.3 it on a Zope 2.2.1b1 and got 
a broken product. The traceback I got at Zope startup was:

2000-08-21T01:44:09 ERROR(200) Zope Couldn't import Products.ZDBase
Traceback (innermost last):
  File /usr/local/lib/Zope-2.2.1b1/lib/python/OFS/Application.py, line 396, 
  in import_products (Object: string)
  File /var/lib/zope/an/Products/ZDBase/__init__.py, line 86, in ?
  File /var/lib/zope/an/Products/ZDBase/ZDiscussions.py, line 106, in ?
  File /usr/local/lib/Zope-2.2.1b1/lib/python/App/class_init.py, line 109, 
  in default__class_init__  (Object: ZDItem)
  File /usr/local/lib/Zope-2.2.1b1/lib/python/AccessControl/Permission.py, 
  line 204, in registerPermissions
ValueError: unpack sequence of wrong size


The problem seems to be a missing comma in the definition of__ac_permissions__
in class ZDItem (file ZDiscussions.py):

__ac_permissions__ = (
('Manage properties', ('manage_addProperty',
   'manage_editProperties',
   'manage_delProperties',
   'manage_changeProperties',))
)

Since this is lacking a comma before the last parenthesis, 
outer parentheses are "dropped" and it becomes as a two-element tuple:
  ((X,methods))  -  (X,methods)
that is, a "naked" permission, instead of the intended one-element (one
permission) tuple ((X,methods),).

In fact, ac_permissions_ was already defined like this in ZDiscussions-0.2.0...

I wonder if this was clearly noticed before 2.2.1b1, since line 204 of
Permission.py (see traceback above) belongs to a new function called
`registerPermissions'.  This function begins with

for setting in permissions:
if _registerdPermission(setting[0]): continue
if len(setting)==2:
perm, methods = setting
default = defaultDefault
else:
perm, methods, default = setting
_registeredPermissions[perm]=1

and with the bug above, its easy to see the mess resulting when `permissions'
has the above __ac_permissions__ value.


Apart from this, is ZDiscussions (ZUBB) 0.5.3 fully compatible with
Zope 2.2.1?  I just restarted Zope after adding the comma and the
product is no longer broken.  Perhaps I can do some testing now...

Best regards
-- 
 jmce: +351 919838775 ~ http://artenumerica.com/ ~ http://artenumerica.org/

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




Re: [Zope] Broken Site Access and domain name capitalization?

2000-08-21 Thread J. Atwood

That is what I thought (believe it or not). I was wondering if anyone had
done it or figured out another solution. Will try it this morning (tough to
do since can't deal with versions).

J

 From: Chris Withers [EMAIL PROTECTED]
 Organization: New Information Paradigms
 Date: Sun, 20 Aug 2000 17:18:20 +0100
 To: "J. Atwood" [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Zope] Broken Site Access and domain name capitalization?
 
 "J. Atwood" wrote:
 So my question is to I have to add all the variants of the domain
 name to the virtual_host method or is there a way to simply lowercase
 the HTTP_HOST before checking it?
 
 string.lower()? ;-)
 
 cheers,
 
 Chris
 


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




Re: [Zope] Broken Site Access and domain name capitalization?

2000-08-21 Thread Chris Withers

"J. Atwood" wrote:
 
 That is what I thought (believe it or not). I was wondering if anyone had
 done it or figured out another solution. Will try it this morning (tough to
 do since can't deal with versions).

Our access rules use this AFAIK, adn it works fine :-)

cheers,

Chris

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




Re: [Zope] Yihaw- adding HTML files - newbie questions?

2000-08-21 Thread Soren Roug

Hello Sean,

I sounds like you're trying to use Yihaw in a manner it was not
intended. A better approach would be to create a new object subclass it
off "Object Manager" and then provide an index_html for the new object,
that lists the content of the folder.

/Soren Roug

Sean Kelley wrote:
 
 I want to add HTML files to the Yihaw directory but when I use "add file" it
 creates its own header thereby cancelling out my header in the file.  If I use the
 add text note or other methods for adding objects you can paste HTML into a form
 but cannot select from the OS (upload).  Am I missing something here or is it a
 little difficult to add these types of items?  I may want to edit an HTML file but
 there is no mechanism for doing this with add file.
 
 All I am trying to provide an easy way to display/manage hierarchical html files in
 folders.  I may want to add a squishdot object on some folders and would like to
 incorporate banner ads, etc.  Am I better of with straight Zope?  Is there another
 product that will do this?  If I use straight Zope, is there an easy way to show a
 folders dtml documents via DTML?
 
 --Sean
 
 ___
 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] dtml-let and quoting(?) or forcing to string

2000-08-21 Thread Mayers, Philip J

All,

I've just setup a test Zope installation. So far, very impressive.

I'm using a Postgresql database containing a network hierarchy (basically, a
table with a "network" column, and a "parentnet" column). I'm trying to
display this with a tree view, using the following DTML:

dtml-let network="0/0"
dtml-tree id=network branches_expr="network_children(parentnet=network)"
 bdtml-var network/b dtml-var descr
/dtml-tree
/dtml-let

Where the network "0/0" is the pseudo-parent of every other network. The
problem is, python (or DTML, I don't know) interprets this as a divide by
zero, and it fails. The other alternative "0.0.0.0/0" also fails:

Expression (Python) Syntax error: 
invalid syntax

, for tag dtml-let network="0.0.0.0/0", on line 15 of test_html

(I'm doing all this through the web management interface). I'm not familiar
with Python (yet - the book is on it's way) but in the command-line
interpreter, this works fine:

 "0.0.0.0/0"
'0.0.0.0/0'
 "0/0"
'0/0'


I need to cast the value to dtml-let to a string. How? I know how to do this
in Perl/C/Java/Pascal, but it's not obvious to me why this isn't working.

Yours, dumbly

Regards,
Phil

+--+
| Phil Mayers, Network Support |
| Centre for Computing Services|
| Imperial College |
+--+ 

___
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] GUF and crypt

2000-08-21 Thread Brad Mabe

Greetings,
I am following the directions in hippy's GenericUserFolder with an SQL
database how to, and ran into a snag.  When I call crypt, zope returns the
following:

Error Type: AttributeError
Error Value: crypt

Traceback (innermost last):
  File /home/segments/ZOPE/zope/lib/python/ZPublisher/Publish.py, line 214,
in publish_module
  File /home/segments/ZOPE/zope/lib/python/ZPublisher/Publish.py, line 179,
in publish
  File /home/segments/ZOPE/zope/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File /home/segments/ZOPE/zope/lib/python/ZPublisher/Publish.py, line 165,
in publish
  File /home/segments/ZOPE/zope/lib/python/ZPublisher/mapply.py, line 160,
in mapply
(Object: adduser_action.dtml)
  File /home/segments/ZOPE/zope/lib/python/ZPublisher/Publish.py, line 102,
in call_object
(Object: adduser_action.dtml)
  File /home/segments/ZOPE/zope/lib/python/OFS/DTMLDocument.py, line 166, in
__call__
(Object: adduser_action.dtml)
  File /home/segments/ZOPE/zope/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: adduser_action.dtml)
  File /home/segments/ZOPE/zope/lib/python/DocumentTemplate/DT_Util.py, line
338, in eval
(Object: REQUEST.set('password',_.crypt.crypt(fpassword,'ab')))
(Info: REQUEST)
  File string, line 0, in ?
  File /home/segments/ZOPE/zope/lib/python/DocumentTemplate/DT_Util.py, line
127, in careful_getattr
AttributeError: (see above)

I'm running Zope 2.1.6 on HPUX 10.2

Any help will be greatly appreciated.

   -=Brad=-


___
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] dtml-let and quoting(?) or forcing to string

2000-08-21 Thread Chris Withers

"Mayers, Philip J" wrote:
 dtml-let network="0/0"
 dtml-tree id=network branches_expr="network_children(parentnet=network)"
  bdtml-var network/b dtml-var descr
 /dtml-tree
 /dtml-let

Anything in a DTML tag that's inside "" is python, usually ;-)

So, your dtml-let should be:
dtml-let network="'0/0'"

which is kinda yucky, don't you think?

cheers,

Chris

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




Re: [Zope] Looping through a folder's contents...

2000-08-21 Thread Andrew Kenneth Milton

+---[ Jason Cunliffe ]--
| Hello
| 
| oops!.. I just tried this and now I am getting error messages saying "not
| authorized" to access 'objectValues' - stranger yet seems to have broken my
| login to Zope - so I am locked out from even getting back into the site to
| fix ..hmm this can't be right.

It's probably real busy traversing your entire site right now...
Control Panel, acl_users, *everything*

| I had put the Recurse_SubFolder method at top level, hoping to use it
| liberally through the site. I then made a call to it from my site's root
| index_html

Yep see above. You kamikaze you. You are a bad bad puppy.

| Any ideas how to restore my Zope?

Probably just restarting it will do the trick nicely.

Then you will be modifying the method to return if the depth exceeds say 5.

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

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




Re: [Zope] Looping through a folder's contents...

2000-08-21 Thread Jason Cunliffe

Hello

oops!.. I just tried this and now I am getting error messages saying "not
authorized" to access 'objectValues' - stranger yet seems to have broken my
login to Zope - so I am locked out from even getting back into the site to
fix ..hmm this can't be right.
I had put the Recurse_SubFolder method at top level, hoping to use it
liberally through the site. I then made a call to it from my site's root
index_html

Any ideas how to restore my Zope?

TIA
- Jason

- Original Message -
From: Andrew Kenneth Milton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, August 21, 2000 2:12 AM
Subject: Re: [Zope] Looping through a folder's contents...


 +---[ [EMAIL PROTECTED] ]--
 | I would like to loop through the contents of a folder, and the
 | contents of the subfolders of that folder.  I know I can do this to a
 | singular level by doing something like:
 |
 | dtml-in "subfolder.objectValues('Folder')"
 | dtml-var title
 | /dtml-in
 |
 | Should give me a list of the titles of all the subfolders of the
 | folder called "subfolder".  So, once I get there, how do I loop
 | through the subobjects of each of those folders?
 |
 | In other words, I have a subfolder inside of the folder called
 | "subfolder" and I want to see the contents of that folder.  How do I
 | do it?

 I'll give you the general case for 'all' folders:-

 Make a Method...  Recurse_SubFolder.

 dtml-in "root.objectValues('Folder')"
 dtml-in "_.range(depth)"nbsp;/dtml-indtml-var title
 dtml-var "Recurse_SubFolder(root=this(),depth=depth+1)"
 /dtml-in

 -

 dtml-var "Recurse_SubFolder(root=subfolder, depth=0)"


 You can obviously expand this to also take a 'type' for objectValues,
 and pass the namespace etc.

 --
 Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew
Milton
 The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   |
 ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
 PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]|

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




___
Zope 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] Pages Half Rendering :(

2000-08-21 Thread T.J. Mannos

Chris,

You know, I've seen that problem before on sites like Microsoft and E-Trade.
The page will be really slow to load, and I will only get part of the HTML
source.  But it affects images, too, so my guess is it's a web server
problem rather than an application server problem.  Anyone else have any
ideas?

- T.J.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Chris
Withers
Sent: Saturday, August 19, 2000 9:04 AM
To: [EMAIL PROTECTED]
Subject: [Zope] Pages Half Rendering :(


Hi,

I experienced the same weird intermittent problem yesterday that I have
had on odd ocassions over the last eight months.

Basically, Zope 2.1.6 returns only half a page. By that I mean if I view
source, the HTML just stops at some point through the page. The point
depends on the actual time, it varies... clicking reload means you get
more or less of the page than last time.

All very odd... what makes it worse is that it happens intermittently
under certain cirumstances that I can't pin down.
Yesterday was on a page that performed a ZCatalog search and returned a
table of the results. It worked fine from here at NIP, but when I tried
at home over dialup I got the problem.

That said, I've had the same thing happen a few times in the past here
at NIP, mainly where pages were raising exceptions and the error wasn't
getting displayed, just some half-rendered HTML... all very confusing :S

Also, totally bizarely, one of our clients had problems on the same
page. Searching works fine here from NIP and at home over DSL for some
NIP employees. I was trying over dialup from home but had the problem I
already metnioned. However, whatever the client searched for, he got no
results. The page rendered fine but it was the paeg saying 'no results
could be found matching youur query'.

If anyone else has experienced anything liek either of these problems,
or has any idea as to what may be going on, I'd love to hear it :S

cheers,

Chris

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


___
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] Looping through a folder's contents...

2000-08-21 Thread Phil Harris

Andrew,

You *almost* seem to be enjoying this ;)


- Original Message -
From: "Andrew Kenneth Milton" [EMAIL PROTECTED]
To: "Jason Cunliffe" [EMAIL PROTECTED]
Cc: "Andrew Kenneth Milton" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, August 21, 2000 3:26 PM
Subject: Re: [Zope] Looping through a folder's contents...


 +---[ Jason Cunliffe ]--
 | Hello
 |
 | oops!.. I just tried this and now I am getting error messages saying
"not
 | authorized" to access 'objectValues' - stranger yet seems to have broken
my
 | login to Zope - so I am locked out from even getting back into the site
to
 | fix ..hmm this can't be right.

 It's probably real busy traversing your entire site right now...
 Control Panel, acl_users, *everything*

 | I had put the Recurse_SubFolder method at top level, hoping to use it
 | liberally through the site. I then made a call to it from my site's root
 | index_html

 Yep see above. You kamikaze you. You are a bad bad puppy.

 | Any ideas how to restore my Zope?

 Probably just restarting it will do the trick nicely.

 Then you will be modifying the method to return if the depth exceeds say
5.

 --
 Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew
Milton
 The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   |
 ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
 PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]|

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


___
Zope 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] Looping through a folder's contents...

2000-08-21 Thread Andrew Kenneth Milton

+---[ Phil Harris ]--
| Andrew,
| 
| You *almost* seem to be enjoying this ;)

Until I get sued for code I paste to a mailing list d8)

The day will come, mark my words, that someone will get sued for 
trying to help.

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

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




Re: [Zope] Cannot uncheck boolean properties in 2.2b3

2000-08-21 Thread Wolfgang Strobl

On 3 Jul 2000, 1:55  Ron Bickers wrote:

 In 2.2b3, after setting a boolean property to "checked", it will not
 save when trying to "uncheck" it.  I reported this to the Collector
 already (751).
 
 As a workaround, you can just delete it and readd it since it defaults
 to unchecked.

I tried that, by modifying yihaw, but in vain. "Cannot delete 
property".



--
  o  ( [EMAIL PROTECTED] (+49 2241) 14-2394
 /\*   GMD mbH   #include 
   _`\ `_===  Schloss Birlinghoven, std.disclaimer
__(_)/_(_)___.-._  53754 Sankt Augustin, Germany 

___
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] Yihaw on 2.2.1b1, boolean properties

2000-08-21 Thread Wolfgang Strobl

I just tried installing a freshly downloaded copy of 
YihawDirectory.zexp into a relatively new 2.2.1b1, but in vain.

snip
Error Type: Permission mapping error
Error Value: Attempted to map a permission to a permission, 
Add Yihaw Objects, that is not valid. This should never happen. (Waaa). 
snip

I'm still looking for a way to get rid of the "checked" state of
some boolean properties, i.e. "toplevel" or "highlight" and such. 
Once it is set, it sticks.



--
  o  ( [EMAIL PROTECTED] (+49 2241) 14-2394
 /\*   GMD mbH   #include 
   _`\ `_===  Schloss Birlinghoven, std.disclaimer
__(_)/_(_)___.-._  53754 Sankt Augustin, Germany 

___
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] Strange behaviour on authorization

2000-08-21 Thread Casey Duncan

The fact that your external method returns a class instance explains why it
fails where it does instead of in the dtml-let statement. It looks as though
Zope is allowing the object to be returned, but balking when you try to
access it. I think I will need to see exactly what your external method and
the returned object are doing before I can try explaining this behavior.

-Casey Duncan

-Original Message-
From: Jarkko Veijalainen [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 21, 2000 1:17 AM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: [Zope] Strange behaviour on authorization


now, i have defined same owner to every document in that folder, but it
did'nt help me.

I cranked litle bit my pages and discovered little more where is the
problem. Problem isn't POSTING data, it's the return value that Zope doesn't
want to publish.

clip

font face="Verdana, Arial" color="#ff"
dtml-let resDTML="Imap('Authentication',REQUEST,1)"
h2User dtml-var "resDTML.cn" dtml-var title_or_id/h2
/font

FORM ACTION="email_headers" METHOD="POST" 

/TDTDfont color="#00" face="Verdana, Arial, Helvetica"
size="1"dtml-var "resDTML.account"nbsp; /TD

/clip


Problem tag is dtml-var "resDTML.cn" that that causes following traceback,
when i remove this tag. Traceback bugs me about Unauthorized: account, which
is 2nd value from external methods returned object resDTML.
So problem is publishing contest of resDTML called in DTML-LET-tags. This
don't make any sense if i have to validate every return value from external
method, it's just unacceptable. In external method, i have simple class and
instance of that class is return value of method. I repeat this again, ALL
THIS THINGS DID work with Zope 2.1.6. How can i fix this?


Traceback (innermost last):
File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 222,
in publish_module
File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 187,
in publish
File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 171,
in publish
File /usr/local/Zope-2.2.0/lib/python/ZPublisher/mapply.py, line 160, in
mapply
  (Object: email_accounts)
File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 112,
in call_object
  (Object: email_accounts)
File /usr/local/Zope-2.2.0/lib/python/OFS/DTMLDocument.py, line 171, in
__call__
  (Object: email_accounts)
File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
  (Object: email_accounts)
File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Let.py, line
147, in render
  (Object: resDTML="Imap('Authentication',REQUEST,1)")
File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Util.py, line
337, in eval
  (Object: resDTML.cn)
  (Info: resDTML)
File string, line 0, in ?
File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Util.py, line
142, in careful_getattr
File /usr/local/Zope-2.2.0/lib/python/OFS/DTMLMethod.py, line 194, in
validate
  (Object: email_accounts)
File /usr/local/Zope-2.2.0/lib/python/AccessControl/SecurityManager.py,
line 139, in validate
File
/usr/local/Zope-2.2.0/lib/python/AccessControl/ZopeSecurityPolicy.py, line
159, in validate
  Unauthorized: cn

jarkkov


 try so POST data to email_headers with login form, popups Authorization
 failed window. I have tried to use my manager and superuser name and same
 values that i submitted, but nothing is accepted to auth. window.
...
 so i have authenticated user and i still can't login. All these documents
 work like they're supposed to in Zope 2.1.6, but not anymore when i
 installed Zope 2.2.0 on Solaris. Why is Zopesecurity trying to validate
 'cn', which is value that i submit to another document.

 What went wrong here and how i fix this problem?

Aha, it worked in 2.1.6 eh? That's the tip off. A *major* change between
2.1.x and 2.2.x is in the security dept. 2.2.x runs all methods using the
security level of the _owner_ of the method, regardless of whether this is a
lower or higher level than the currently authenticated user. My guess is
that your method has no owner (which is what pre-2.2.x objects default to
when run under 2.2.x). This means it is running as anonymous which does not
have rights to do what you want. Specify an owner for the method that has
sufficient rights to do what you want and try it again.



___
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] Newbie Question (Content Manager Tutorial)

2000-08-21 Thread Chris McDonough

There is a proposal something like this in the works.

 -Original Message-
 From: Steve Drees [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 21, 2000 11:11 AM
 To: Chris McDonough
 Cc: Zope User Maillist
 Subject: RE: [Zope] Newbie Question (Content Manager Tutorial)
 
 
  With the advent of Zope 2.2, the first thing you need to do 
 is to create a
  management user.  You cannot use the 'superuser' to manage 
 content.  I
  know this is a little unfamiliar, but, for now, just 
 suspend disbelief and
  create another user with the 'Manager' role (by visiting 
 the acl_users
  User Folder and adding a user).  Then quit the browser, and 
 log in as the
  user you created.  You'll then be able to follow the cmg.
 
 
 Couldn't the zope install be modified to prompt for a 
 'Manager' username and
 password
 and then create that account from the outset?
 

___
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] Newbie Question (Content Manager Tutorial)

2000-08-21 Thread Steve Drees

 With the advent of Zope 2.2, the first thing you need to do is to create a
 management user.  You cannot use the 'superuser' to manage content.  I
 know this is a little unfamiliar, but, for now, just suspend disbelief and
 create another user with the 'Manager' role (by visiting the acl_users
 User Folder and adding a user).  Then quit the browser, and log in as the
 user you created.  You'll then be able to follow the cmg.


Couldn't the zope install be modified to prompt for a 'Manager' username and
password
and then create that account from the outset?


___
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] Another permission mapping error... [still ZDiscussions 0.5.3]

2000-08-21 Thread J M Cerqueira Esteves

On Mon, Aug 21, 2000 at 05:03:37PM +0200, Wolfgang Strobl wrote:
 I just tried installing a freshly downloaded copy of 
 YihawDirectory.zexp into a relatively new 2.2.1b1, but in vain.
 
 snip
 Error Type: Permission mapping error
 Error Value: Attempted to map a permission to a permission, 
 Add Yihaw Objects, that is not valid. This should never happen. (Waaa). 
 snip

I've also met a "permission mapping error" in 2.2.1b1... After correcting the
ZDiscussions comma bug mentioned before, I tried to import
ZDiscussions.zexp, continuing the installation process, and got:

Error Type: Permission mapping error
Error Value: Attempted to map a permission to a permission, Add
ZDiscussions Items, that is not valid. This should never happen.
(Waaa). 

with the following traceback:

Traceback (innermost last):
  File /usr/local/lib/Zope-2.2.1b1/lib/python/ZPublisher/Publish.py, line 222, i
n publish_module
  File /usr/local/lib/Zope-2.2.1b1/lib/python/ZPublisher/Publish.py, line 187, i
n publish
  File /usr/local/lib/Zope-2.2.1b1/lib/python/Zope/__init__.py, line 221, in zpu
blisher_exception_hook
(Object: Traversable)
  File /usr/local/lib/Zope-2.2.1b1/lib/python/ZPublisher/Publish.py, line 171, i
n publish
  File /usr/local/lib/Zope-2.2.1b1/lib/python/ZPublisher/mapply.py, line 160, in
 mapply
(Object: manage_importObject)
  File /usr/local/lib/Zope-2.2.1b1/lib/python/ZPublisher/Publish.py, line 112, i
n call_object
(Object: manage_importObject)
  File /usr/local/lib/Zope-2.2.1b1/lib/python/OFS/ObjectManager.py, line 508, in
 manage_importObject
(Object: Traversable)
  File /usr/local/lib/Zope-2.2.1b1/lib/python/OFS/ObjectManager.py, line 263, in
 _setObject
(Object: Traversable)
  File /usr/local/lib/Zope-2.2.1b1/lib/python/OFS/ObjectManager.py, line 271, in
 manage_afterAdd
(Object: Traversable)
  File /usr/local/lib/Zope-2.2.1b1/lib/python/ZClasses/ZClass.py, line 422, in m
anage_afterAdd
(Object: ZDTopic)
  File /usr/local/lib/Zope-2.2.1b1/lib/python/OFS/ObjectManager.py, line 271, in
 manage_afterAdd
(Object: Traversable)
  File /usr/local/lib/Zope-2.2.1b1/lib/python/App/Factory.py, line 144, in manag
e_afterAdd
(Object: RoleManager)
  File /usr/local/lib/Zope-2.2.1b1/lib/python/AccessControl/PermissionMapping.py
, line 137, in manage_setPermissionMapping
(Object: RoleManager)
(Info: (['Access contents information', 'Add BTree Folders', 'Add Database M
ethods', 'Add Documents, Files, and Images', 'Add Documents, Images, and Files',
 'Add External Methods', 'Add Folders', 'Add MailHost objects', 'Add SiteRoots',
 'Add User Folders', 'Add Versions', 'Add Vocabularies', 'Add Z Gadfly Database 
Connections', 'Add ZCatalogs', 'Add Zope Tutorials', 'Change DTML Documents', 'C
hange DTML Methods', 'Change Database Connections', 'Change Database Methods', '
Change External Methods', 'Change Images and Files', 'Change Versions', 'Change 
configuration', 'Change permissions', 'Change proxy roles', 'Create class instan
ces', 'Delete objects', 'Edit Factories', 'FTP access', 'Import/Export objects',
 'Join/leave Versions', 'Manage Vocabulary', 'Manage Z Classes', 'Manage ZCatalo
g Entries', 'Manage properties', 'Manage users', 'Open/Close Database Connection
', 'Open/Close Database Connections', 'Query Vocabulary', 'Save/discard Version 
changes', 'Search ZCatalog', 'Set Access Rule', 'Take ownership', 'Test Database
 Connections', 'Undo changes', 'Use Database Methods', 'Use Factories', 'Use mai
lhost services', 'View', 'View History', 'View management screens'], 'Add ZDiscu
ssions Items', 0))
Permission mapping error: (see above)

-- 
 jmce: +351 919838775 ~ http://artenumerica.com/ ~ http://artenumerica.org/

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




[Zope] Builing DynPersist.c - LoginManager / ZPatterns ..

2000-08-21 Thread Jørgen Skogstad

Kindest .. 

I've been trying to implement LoginManager with ZPatters today,
but have failed so far. Can anyone give me some input with this.
Would really like to have some pointers in the correct direction.

DynPersist.c

It is the file above it fails on .. and I think I saw a message
that this is a "common" problem others have experienced. Is this
correct? And does anyone have the shared lib for RH v6.2??

.. would really apriciate it if someone would contribute 5 mins
of their time!

Have a real nice day.. and thanks in advance. ;) 

-- 


Med vennlig hilsen,
Jørgen Skogstad

___
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] SQL trees...

2000-08-21 Thread Mayers, Philip J

Excellent. That answers that.

I'm loath to ask this, since it's supposedly a FAQ, but I'm having trouble
with the tree...

Following:

http://www.zope.org/Members/anthony/tree-coding-tricks

I've got:

dtml-let network="'0/0'"
dtml-tree id=network branches_expr="network_children(parentnet=network)"
 bdtml-var network/b dtml-var descr
/dtml-tree
/dtml-let

The SQL query is working - "test"ing network_children will give the correct
hierarchy. However, the tree generated looks like this:

192.168/16
  192.168/16
192.168/16
10/8
172.20/16
  10/8
192.168/16
10/8
172.20/16
  172.20/16
192.168/16
10/8
172.20/16
10/8
  etc

Basically, the tree only seems to ever contain the top-level (children of
the root of the tree).  The children of all the nodes is... another copy of
the root top-level nodes! Whu?!? A search for several variations of "SQL
tree" in all the relevant list/site archives didn't seem to help. Any ideas?

Regards,
Phil

+--+
| Phil Mayers, Network Support |
| Centre for Computing Services|
| Imperial College |
+--+ 

-Original Message-
From: Chris Withers [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2000 15:23
To: Mayers, Philip J
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Zope] dtml-let and quoting(?) or forcing to string


"Mayers, Philip J" wrote:
 dtml-let network="0/0"
 dtml-tree id=network branches_expr="network_children(parentnet=network)"
  bdtml-var network/b dtml-var descr
 /dtml-tree
 /dtml-let

Anything in a DTML tag that's inside "" is python, usually ;-)

So, your dtml-let should be:
dtml-let network="'0/0'"

which is kinda yucky, don't you think?

cheers,

Chris

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

___
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] Renderable-ZClass-0.2 enquiry

2000-08-21 Thread Jean Jordaan

Hi all

Is 'Renderable-ZClass-0.2' (aka "Lalo's excellent
RenderableZClass" [1]) from 1999/11/04 the latest version
of this? Are there any reports from people using it? Does 
anyone out there perhaps have a private homegrown 0.99 version? 

-- 
Jean Jordaan   --technical writer--
Mosaic Software--Zope 2.1.6 on WinNT and W2K

.. [1] http://www.zope.org/Members/tseaver/STX_Document/README 

___
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] Security Problems upgrading to Zope 2.2.0

2000-08-21 Thread Stefan Bambach

Hello zope-users,

I upgraded my Zope application from version 2.1.3 to 2.2.0 . Now I
have problems with the new security system.

e.g. 'test.py' in Extensions directory:

class test:
  def __init__(self):
pass
  def sayhello(self):
return "hello"

def initialize(self):
  return test()

Now I created an external method that is named 'test', it's function
name is 'initialize' and the module's name is 'test'.

The code
dtml-with "test()"
dtml-var "sayhello()"
/dtml-with
produces an 'Unauthorized: sayhello' after I canceled the requester.

Of course this is only a test function, because my real functions
didn't work, too.

All checkboxes of the external method 'test' are checked. So all users
should have the rights to access this method. Right ?

What's wrong with this code ?



bye.
Stefan Bambach



___
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] Indirect method lookup?

2000-08-21 Thread Jeff Hoffman

Hello,

I am trying to build a simple framework that is going to use "events" to
callback into higher level logic. Specifically, I am creating a "Text
Field" that represents an HTML form field. Its validate() method needs to
call whatever method is specified in its validateHandler property (which
is a string).

My validate() method is a PythonMethod. Before I can call the event
handler, I need to get ahold of the method object. I have tried all of
the following and gotten nothing but KeyErrors/AttributeErrors:

  _.getitem(self.validationHandler)
  _[self.validationHandler]
  self[self.validationHandler]
  self.getitem(self.validationHandler)
  getattr(self, self.validationHandler)
  etc.

It is important to note that the method I am looking for, the one named by
the string property, is not defined in the field class itself. I need to
rely on acquisition to find it; it is defined in one of the containers of
the field object.

I know this has to be simple; I must be missing something.

Anyone care to share some clue?

--Jeff

---
Jeff K. Hoffman   704.849.0731 x108
Chief Technology Officer  mailto:[EMAIL PROTECTED]
Going Virtual, L.L.C. http://www.goingv.com/


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




Re: [Zope] SQL trees...

2000-08-21 Thread Philipp Auersperg

Which Zope version do you use ?

When I read your message I have a deja-vu:
I encountered the same output when I use SQL based trees under Zope 2.1.6,
it is a bug somewhere in the SQL method handling that appeared in 2.1.6 and is 
fixed in 2.2.0.

Solution:
switch back to 2.1.4 or forward to 2.2.0 or patch the existing 2.1.6 

Philipp Auersperg (zwork)

*** REPLY SEPARATOR  ***

On 21.08.2000 at 16:43 Mayers, Philip J wrote:

Excellent. That answers that.

I'm loath to ask this, since it's supposedly a FAQ, but I'm having trouble
with the tree...

Following:

http://www.zope.org/Members/anthony/tree-coding-tricks

I've got:

dtml-let network="'0/0'"
dtml-tree id=network branches_expr="network_children(parentnet=network)"
 bdtml-var network/b dtml-var descr
/dtml-tree
/dtml-let

The SQL query is working - "test"ing network_children will give the correct
hierarchy. However, the tree generated looks like this:

192.168/16
  192.168/16
192.168/16
10/8
172.20/16
  10/8
192.168/16
10/8
172.20/16
  172.20/16
192.168/16
10/8
172.20/16
10/8
  etc

Basically, the tree only seems to ever contain the top-level (children of
the root of the tree).  The children of all the nodes is... another copy of
the root top-level nodes! Whu?!? A search for several variations of "SQL
tree" in all the relevant list/site archives didn't seem to help. Any ideas?

Regards,
Phil

+--+
| Phil Mayers, Network Support |
| Centre for Computing Services|
| Imperial College |
+--+ 

-Original Message-
From: Chris Withers [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2000 15:23
To: Mayers, Philip J
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Zope] dtml-let and quoting(?) or forcing to string


"Mayers, Philip J" wrote:
 dtml-let network="0/0"
 dtml-tree id=network branches_expr="network_children(parentnet=network)"
  bdtml-var network/b dtml-var descr
 /dtml-tree
 /dtml-let

Anything in a DTML tag that's inside "" is python, usually ;-)

So, your dtml-let should be:
dtml-let network="'0/0'"

which is kinda yucky, don't you think?

cheers,

Chris

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

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




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




Re: [Zope] calling (SQL) methods dynamically from External methods

2000-08-21 Thread Philipp Auersperg

Thanks for the answer, it helped me, 
but you missed what I really wanted.

I don't want to call SQL queries by query string, what I want is to
use Z SQL Methods, but I need to identify them by their name as string, because 
in this project we have many complicated queries with parameters.

But finally I am happy because that works:

m1=getattr(self,'dbTest')   #dbTest is a ZSQL method
rs=m1(self)   

for r in rs:
...

Thanks

Philipp Auersperg(zwork)

*** REPLY SEPARATOR  ***

On 21.08.2000 at 13:32 Andrew Kenneth Milton wrote:

+---[ Philipp Auersperg ]--
| 
| What I want to do is calling a SQL method given its
| name as string, so I first have to get the method out of
| the self.__dict__ and then call it. I need that for calling
| the SQL methods dynamically for example out of an URL
| string.

realConnection=getattr(self,connectionId)
realConnection().query(query_in_a_string)

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]|




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




Re: [Zope] calling (SQL) methods dynamically from External methods

2000-08-21 Thread R. David Murray

On Mon, 21 Aug 2000, Philipp Auersperg wrote:
 Interesting fact:
 When retrieving the method object with "m=self.dbTest" and then with 
"m1=self.__dict__['dbTest']" 
 "print m,m1" show the same string but "m==m1" results to false!
 
 What am I doing wrong? There seems something mixed up with namespaces, but I am too 
solly to solve it :(

I *think* what you are running into here is the difference between
an context-wrapped object and the unwrapped object.  I think __dict__
gets you the latter, but self.dbTest calls __getattr__ and the Zope
hook for that returns a wrapped object.  The wrapped object can
use acquisition to find the db connection, the unwrapped object can't.

As you found, getattr is the way to do what you want.

--RDM


___
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] Strange behaviour on authorization

2000-08-21 Thread R. David Murray

On Mon, 21 Aug 2000, Casey Duncan wrote:
 The fact that your external method returns a class instance explains why it
 fails where it does instead of in the dtml-let statement. It looks as though
 Zope is allowing the object to be returned, but balking when you try to
 access it. I think I will need to see exactly what your external method and
 the returned object are doing before I can try explaining this behavior.

In 2.2 the security model is tightened.  To use returned objects of 
your special-purpose classes from dtml, you have to tell Zope that it is
OK to do so.  Check out Brian's new-security-model guide at

  http://www.zope.org/Documentation/How-To/ProductAuthorUpdateGuide

(I think he also has newer stuff in the security chapter of the book
but I haven't looked at it yet).

I think what you want to do is add

__allow_access_to_unprotected_subobjects__=1

as a class variable to the class in your external method.  But read the
guide so you understand the security consquences of doing that.

--RDM


___
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] Creating an object from within another

2000-08-21 Thread Daniel Rusch

Thanks for the help gentlemen, but I still get the same error mesage:

   Zope Error

  Zope has encountered an error while publishing this resource.

  AttributeError

  Sorry, a Zope error occurred.

  Traceback (innermost last):
File /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
File /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line 179, in
publish
File /home/Zope-2.1.6-linux2-x86/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
File /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line 165, in
publish
File /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/mapply.py, line 160, in
mapply
  (Object: manage_addSimpleSite)
File /home/Zope-2.1.6-linux2-x86/lib/python/ZPublisher/Publish.py, line 102, in
call_object
  (Object: manage_addSimpleSite)
File /home/zope/lib/python/Products/SimpleSite/SimpleSite.py, line 72, in
manage_addSimpleSite
  AttributeError: manage_addBasicDocument

Any thoughts,

DR



Chris McDonough wrote:

 I think he meant ob.__of__(self) which wraps ob into the context of
 self.  Useful for returning unwrapped Python objects while you're in
 Python.

 On Fri, 18 Aug 2000, Kapil Thangavelu wrote:

  Dieter Maurer wrote:
  
   Daniel Rusch writes:
 So far so good,

 Next hurdle, at least the problems have been cut down to hurdles from walls.

 I have a folderish product say myFolder, in the manage_addMyFolder function I
 want to create an object of my product B. so I do this:

 def manage_addmyFolder(self, id, title='',
  REQUEST=None):
 """Add a new myFolder object with id *id*.
 """
 ob=myFolder()
 ob.id=id
 ob.title=title
 self._setObject(id, ob)
 try: user=REQUEST['AUTHENTICATED_USER']
 except: user=None
 ob.manage_addB(id='index_html', title='') -- if I change this to
   Try:   (ob __of__ self).manage_addB()
 
  whats is  ob__of__self ???
 
  acquisition at its best?
 
  attribute access to get a reference to the ob attr of self?
 
  kapil
 
  ___
  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 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] Fourth Posting, is this really that difficult or have I been blackballed :)balled :)

2000-08-21 Thread Daniel Rusch

not sure what you mean by "subobject adding in your __init__ method"

Dan

Kapil Thangavelu wrote:

 btw daniel,

 i've looked at some your postings for the day and i thought i should
 tell you that most of your problems would go away if you did subobject
 adding in your __init__ method within your class or in the hook method
 manage_afterAdd within your class. for future reference. You'd get all
 the benefits of inheritance. Let manage_add to do just that, instantiate
 and set a instance of your class.

 Kapil

 Kapil Thangavelu wrote:
 
  Daniel wrote
 
   I've created a folderish product. When I select that product from the
   available objects list, thus creating an instance of that product, I can
  
   create objects like dtml document and dtml method in the new folderish
   object (very similar to what happens when you instantiate a folder
   object, you can have a dtml method created in the new folder).
  
   The question is why can't I create objects from the Products directory,
   such as Local File System?
  
   The code below works great, I get a dtml document, two folders each with
  
   a dtml method in them
   HOW CAN I CREATE A LOCAL FILE SYSTEM OR ANY OTHER OBJECT FROM THE
   PRODUCTS DIRECTORY IN THIS MANAGE_ADD FUNCTION???
  
   def manage_addSimpleSite(self, id, title='',
createNewFolder=0,
createEditFolder=0,
REQUEST=None):
   """Add a new SimpleSite object with id *id*.
  
   If the 'createNewFolder' and 'createEditFolder' parameters are set
   to any true
   value, an 'New sub Folder' and an 'edit sub Folder' objects are
   created respectively
   in the new SimpleSite.
   """
   ob=SimpleSite()
   ob.id=id
   ob.title=title
   self._setObject(id, ob)
   try: user=REQUEST['AUTHENTICATED_USER']
   except: user=None
   ob.manage_addDTMLDocument(id='index_html', title='')
   if createNewFolder:
   if (user is not None) and not (
   user.has_permission('Add User SimpleSites', self)):
   raise 'Unauthorized', (
 'You are not authorized to add User SimpleSites.'
 )
   ob.manage_addFolder(id='New'+id, title='', createPublic=1)
   if createEditFolder:
   if (user is not None) and not (
   user.has_permission('Add Documents, Images, and Files',
   self)):
   raise 'Unauthorized', (
 'You are not authorized to add DTML Documents.'
 )
   ob.manage_addFolder(id='Edit'+id, title='', createPublic=1)
   if REQUEST is not None:
   return self.manage_main(self, REQUEST, update_menu=1)
  
 
  a couple of things.
 
  A. you're not being blackballed. when you're posting to the list its
  hard to help without specifics. you're posting above, would be better
  with a traceback of code that does attempt to instantiate a product.
  which leads to
 
  B. how are you attempting to instantiate your other products. example
  code of what you're trying to do would be helpful. are you doing it the
  same as adding folders like above... i have no idea...
 
  C. seems like you're doing this in python. the code below should work
  fine.
 
  from Products import LocalFS
 
  in manage_add:
 
  id = 'foo'
  ob2 = LocalFS.LocalFS(id) # check the exact calls to __init__ in
  LocalFS
  id2 = 'foo2'
 
  ob = yourproduct(id2)
  ob._setObject(id , ob2)
 
  in  __init__ or manage_afterAdd
 
  id ='foo'
  ob = LocalFS.LocalFS(id)
  self._setObject(id, ob)
 
  ___
  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 maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] I'm really confused: Creating an object from within another

2000-08-21 Thread Daniel Rusch

I really appreciate the help I've been getting, but I'm really confused as to why I can
create a DTMLMethod or DTMLDocument, but not any product from the products directory.
Granted I don't have many installed, but whats the difference between a Product that
lives in the OFS directory and a Product that lives in the Product directory, and why
can't I create them the same

Dan

Chris McDonough wrote:

 I think he meant ob.__of__(self) which wraps ob into the context of
 self.  Useful for returning unwrapped Python objects while you're in
 Python.

 On Fri, 18 Aug 2000, Kapil Thangavelu wrote:

  Dieter Maurer wrote:
  
   Daniel Rusch writes:
 So far so good,

 Next hurdle, at least the problems have been cut down to hurdles from walls.

 I have a folderish product say myFolder, in the manage_addMyFolder function I
 want to create an object of my product B. so I do this:

 def manage_addmyFolder(self, id, title='',
  REQUEST=None):
 """Add a new myFolder object with id *id*.
 """
 ob=myFolder()
 ob.id=id
 ob.title=title
 self._setObject(id, ob)
 try: user=REQUEST['AUTHENTICATED_USER']
 except: user=None
 ob.manage_addB(id='index_html', title='') -- if I change this to
   Try:   (ob __of__ self).manage_addB()
 
  whats is  ob__of__self ???
 
  acquisition at its best?
 
  attribute access to get a reference to the ob attr of self?
 
  kapil
 
  ___
  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 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] Builing DynPersist.c - LoginManager / ZPatterns ..

2000-08-21 Thread R. David Murray

On Mon, 21 Aug 2000, [iso-8859-1] Jørgen Skogstad wrote:
 DynPersist.c
 
 It is the file above it fails on .. and I think I saw a message
 that this is a "common" problem others have experienced. Is this
 correct? And does anyone have the shared lib for RH v6.2??

If RH, probably RPMs. If RPMs, probably not the source/deveopment
RPMs.  I thnk you need the development RPM for Python, and maybe the
source RPM for Zope, in order to get this to compile.  

--RDM


___
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] Security Problems upgrading to Zope 2.2.0

2000-08-21 Thread Aleksander Salwa


On Mon, 21 Aug 2000, Stefan Bambach wrote:

 class test:
   def __init__(self):
 pass
   def sayhello(self):
 return "hello"
 
 def initialize(self):
   return test()
 

 
 What's wrong with this code ?

Try to add this attribute to your class 'test':

__allow_access_to_unprotected_subobjects__ = 1



[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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] Squishdot and ZCatalog, Zope 2.2

2000-08-21 Thread Chris Withers

[EMAIL PROTECTED] wrote:
 I checked out the latest CVS source, and noticed you called
 self.catalog_object() like this:
 
 
self.catalog_object(obj,'/'+join(self.getPhysicalPath(),'/')+'/'+obj.thread_path()+'/'+`id`)
 
 When I went to look at the catalog entries after adding a new site within
 a folder called myfolder, I noticed the new entries showed up as:
 
 /newsquish/id
 
 When I clicked on the link, I received an error saying it can't find the
 object. I don't think a leading '/' should be supplied to
 catalog_object(). I tried to update the catalog, which promptly removed
 all the postings from the catalog. When I re-cataloged the postings, the
 entries were now showing up as:
 
 //myfolder/newsquish//id

Sounds like Zope 2.1.6 to me

If you try it on Zope 2.2.0 it works fine, for me anyway :S

 Also, the setItem() method in the Squishsite class (different from the
 setItem() method in the Posting class) is the only place where using the
 absolute_url() method doesn't work.

It's cos the 2.2.0 implementation of absolute_url requiers a REQUEST,
which it doesn't get in setItem(). This is fixed in 2.2.1 apparently...

 I've noticed in all the other methods
 it's called from, it returns the proper result. The same actually goes for
 the getPhysicalPath() method, all the double slashes aside. Notice in the
 above examples, when the postings were initially loaded,
 getPhysicalPath() returns only newsquish, whereas everywhere else, it
 returns /myfolder/newsquish .

haven't noticed this at all... what version of Zope are you using?

 Let me know if you need any help,

Oh, I need help alright, for trying to move Squishdot to Zope 2.2 in the
first place :(
My current fun is with dtml-in attachment which works fine in the edit
form on the management interface but throws a KeyError on 'file_name'
when I try and use it in the posting_html DTML method...

Any ideas/solutions greatly recieved :S

cheers,

Chris

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




RE: [Zope] Another permission mapping error... [still ZDiscussions 0.5.3]

2000-08-21 Thread Brian Lloyd

I just wanted to let you know that this is fixed for 
2.2.1 final. I expect it to be out tomorrow or Wed. 



Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 




 -Original Message-
 From: J M Cerqueira Esteves [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 21, 2000 11:24 AM
 To: [EMAIL PROTECTED]
 Subject: [Zope] Another permission mapping error... [still 
 ZDiscussions
 0.5.3]
 
 
 On Mon, Aug 21, 2000 at 05:03:37PM +0200, Wolfgang Strobl wrote:
  I just tried installing a freshly downloaded copy of 
  YihawDirectory.zexp into a relatively new 2.2.1b1, but in vain.
  
  snip
  Error Type: Permission mapping error
  Error Value: Attempted to map a permission to a permission, 
  Add Yihaw Objects, that is not valid. This should never 
 happen. (Waaa). 
  snip
 
 I've also met a "permission mapping error" in 2.2.1b1... 
 After correcting the
 ZDiscussions comma bug mentioned before, I tried to import
 ZDiscussions.zexp, continuing the installation process, and got:
 
 Error Type: Permission mapping error
 Error Value: Attempted to map a permission to a 
 permission, Add
 ZDiscussions Items, that is not valid. This should 
 never happen.
 (Waaa). 
 
 with the following traceback:
 
 Traceback (innermost last):
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/ZPublisher/Publish.py, 
 line 222, i
 n publish_module
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/ZPublisher/Publish.py, 
 line 187, i
 n publish
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/Zope/__init__.py, line 
 221, in zpu
 blisher_exception_hook
 (Object: Traversable)
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/ZPublisher/Publish.py, 
 line 171, i
 n publish
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/ZPublisher/mapply.py, 
 line 160, in
  mapply
 (Object: manage_importObject)
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/ZPublisher/Publish.py, 
 line 112, i
 n call_object
 (Object: manage_importObject)
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/OFS/ObjectManager.py, 
 line 508, in
  manage_importObject
 (Object: Traversable)
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/OFS/ObjectManager.py, 
 line 263, in
  _setObject
 (Object: Traversable)
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/OFS/ObjectManager.py, 
 line 271, in
  manage_afterAdd
 (Object: Traversable)
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/ZClasses/ZClass.py, 
 line 422, in m
 anage_afterAdd
 (Object: ZDTopic)
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/OFS/ObjectManager.py, 
 line 271, in
  manage_afterAdd
 (Object: Traversable)
   File /usr/local/lib/Zope-2.2.1b1/lib/python/App/Factory.py, 
 line 144, in manag
 e_afterAdd
 (Object: RoleManager)
   File 
 /usr/local/lib/Zope-2.2.1b1/lib/python/AccessControl/Permissio
 nMapping.py
 , line 137, in manage_setPermissionMapping
 (Object: RoleManager)
 (Info: (['Access contents information', 'Add BTree 
 Folders', 'Add Database M
 ethods', 'Add Documents, Files, and Images', 'Add Documents, 
 Images, and Files',
  'Add External Methods', 'Add Folders', 'Add MailHost 
 objects', 'Add SiteRoots',
  'Add User Folders', 'Add Versions', 'Add Vocabularies', 'Add 
 Z Gadfly Database 
 Connections', 'Add ZCatalogs', 'Add Zope Tutorials', 'Change 
 DTML Documents', 'C
 hange DTML Methods', 'Change Database Connections', 'Change 
 Database Methods', '
 Change External Methods', 'Change Images and Files', 'Change 
 Versions', 'Change 
 configuration', 'Change permissions', 'Change proxy roles', 
 'Create class instan
 ces', 'Delete objects', 'Edit Factories', 'FTP access', 
 'Import/Export objects',
  'Join/leave Versions', 'Manage Vocabulary', 'Manage Z 
 Classes', 'Manage ZCatalo
 g Entries', 'Manage properties', 'Manage users', 'Open/Close 
 Database Connection
 ', 'Open/Close Database Connections', 'Query Vocabulary', 
 'Save/discard Version 
 changes', 'Search ZCatalog', 'Set Access Rule', 'Take 
 ownership', 'Test Database
  Connections', 'Undo changes', 'Use Database Methods', 'Use 
 Factories', 'Use mai
 lhost services', 'View', 'View History', 'View management 
 screens'], 'Add ZDiscu
 ssions Items', 0))
 Permission mapping error: (see above)
 
 -- 
  jmce: +351 919838775 ~ http://artenumerica.com/ ~ 
http://artenumerica.org/

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

___
Zope 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] Zope on HPUX

2000-08-21 Thread Michael Maul
Title: Zope on HPUX






Does any one have zope running on hpux 10.20?
It needs a thread enabled python, which I have not been able to build
(Using pthread 1.3.7)
each time I try to run the python Interpeter it core dumps..with..
pthread_mutex_init: Invalid argument





[Zope] RE[2]: [Zope] Product inheritance question (similar question)

2000-08-21 Thread NABETH Thierry
Title: RE[2]: [Zope] Product inheritance question (similar question)






 from PA import A, . whatever you need


I am only using dtml and not writing directly python code !
So I do not believe this is possible.


 Almost unbelievable.


But true.
But I will have again to do some test. 
(I do not have the time right now, and I did most of my
test with the previous version of Zope)


What I will have to do:
- create a Package (Zope product).
- create a class in this package, and a method (my_method)
- create another package.
- create a class in this package that inherits the class of the other package.


- check that the method my_method is visible from within the second package.


Thierry Nabeth
Research Fellow
INSEAD CALT (the Centre for Advanced Learning Technologies)
http://www.insead.fr/CALT/




-Original Message-
From: Dieter Maurer [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 18, 2000 9:49 PM
To: NABETH Thierry
Cc: '[EMAIL PROTECTED]'
Subject: RE: [Zope] Product inhetitance question (similar question)



NABETH Thierry writes:
 And what happen if the Class A is in a package PA.
 Clabb B is in a package PB.
 
 How do you access the namespace of PA from PB ?
from PA import A, . whatever you need


class B(A): 


 When I have tried, the inherited methods from A where not visible
 from B, and I and to recreate a copie of the method.
 (which is ugly !!!).
Almost unbelievable.



Dieter





Re: [Zope] Yihaw- adding HTML files - newbie questions?

2000-08-21 Thread sean

Thanks for the response Soren,
It sounds like Yihaw is the wrong way to do this.  Being a new 
Zope user, I am not sure what the rest of this message means 
however.  When I create a new opject, would that be creating a 
folder for example?  What does "subclass it off "Object Manager"" 
mean?  The creattion of an index_html file I can do.

--Sean

On 21 Aug 2000, at 15:42, Soren Roug wrote:

 Hello Sean,
 
 I sounds like you're trying to use Yihaw in a manner it was not
 intended. A better approach would be to create a new object subclass it
 off "Object Manager" and then provide an index_html for the new object,
 that lists the content of the folder.
 
 /Soren Roug
 
 Sean Kelley wrote:
  
  I want to add HTML files to the Yihaw directory but when I use "add file" it
  creates its own header thereby cancelling out my header in the file.  If I use the
  add text note or other methods for adding objects you can paste HTML into a form
  but cannot select from the OS (upload).  Am I missing something here or is it a
  little difficult to add these types of items?  I may want to edit an HTML file but
  there is no mechanism for doing this with add file.
  
  All I am trying to provide an easy way to display/manage hierarchical html files in
  folders.  I may want to add a squishdot object on some folders and would like to
  incorporate banner ads, etc.  Am I better of with straight Zope?  Is there another
  product that will do this?  If I use straight Zope, is there an easy way to show a
  folders dtml documents via DTML?
  
  --Sean
  
  ___
  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] Re: [squishdot] Squishdot and ZCatalog, Zope 2.2

2000-08-21 Thread odysseus

On Mon, 21 Aug 2000, Chris Withers wrote:

 [EMAIL PROTECTED] wrote:
  I checked out the latest CVS source, and noticed you called
  self.catalog_object() like this:
  
  
self.catalog_object(obj,'/'+join(self.getPhysicalPath(),'/')+'/'+obj.thread_path()+'/'+`id`)
  
  When I went to look at the catalog entries after adding a new site within
  a folder called myfolder, I noticed the new entries showed up as:
  
  /newsquish/id
  
  When I clicked on the link, I received an error saying it can't find the
  object. I don't think a leading '/' should be supplied to
  catalog_object(). I tried to update the catalog, which promptly removed
  all the postings from the catalog. When I re-cataloged the postings, the
  entries were now showing up as:
  
  //myfolder/newsquish//id
 
 Sounds like Zope 2.1.6 to me
 
 If you try it on Zope 2.2.0 it works fine, for me anyway :S

I'm running 2.2.0 (I swear!), with the latest Hotfix. I create a Squishdot
Site named groucho at the root. When I go to the Options tab and hit
re-catalog button, then go to the Cataloged Objects tab (which I had to
uncomment in the source to access), the catalog entries are listed as:

//groucho//966886273
//groucho// ...and so on.

I also create another squishdot site under the folder /myfolder , called
harpo . When I go to the Cataloged Objects tab, the articles are listed
as:

/harpo/966886570
/harpo/ ...and so on.

This isn't right. So I go to the Options tab, hit the re-catalog button,
then go back to the Cataloged Objects tab, and they're now listed as:

//newfolder/harpo//966886570
//newfolder/harpo// ...whatever.

This hasn't happened to you? Is there anyone out there who can test this
out as well, with the Squishdot from CVS?

 
  Also, the setItem() method in the Squishsite class (different from the
  setItem() method in the Posting class) is the only place where using the
  absolute_url() method doesn't work.
 
 It's cos the 2.2.0 implementation of absolute_url requiers a REQUEST,
 which it doesn't get in setItem(). This is fixed in 2.2.1 apparently...

Had I known that REQUEST requirement was a bug, I would've reported it
earlier. Which is the preferred method then, absolute_url() or
getPhysicalPath() ?

 
  I've noticed in all the other methods
  it's called from, it returns the proper result. The same actually goes for
  the getPhysicalPath() method, all the double slashes aside. Notice in the
  above examples, when the postings were initially loaded,
  getPhysicalPath() returns only newsquish, whereas everywhere else, it
  returns /myfolder/newsquish .
 
 haven't noticed this at all... what version of Zope are you using?

Zope 2.2.0, I swear!!

-Lance


___
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] Indirect method lookup? (Update)

2000-08-21 Thread Jeff Hoffman

Ok, knowing more about what's going on, now, I figured I would send an
update to the list and hope it jars someone's memory.

Here's what I am trying to do:

I have a ZClass, MyTestClass. MyTestClass has two methods: method1, and
method2. There are two other methods, showMethods and showMethods2, but
they are only needed for the purpose of demonstration.

I created an instance of MyTestClass with an id of 'test'.

showMethods (a DTMLMethod) is defined as:

  dtml-var standard_html_header
  p
  method1 = dtml-var "_.hasattr(this(), 'method1')"br
  method2 = dtml-var "_.hasattr(this(), 'method2')"br
  nullmethod = dtml-var "_.hasattr(this(), 'nullmethod')"
  /p

  dtml-var standard_html_footer

and, when invoked on my 'test' instance, returns:

  method1 = 1
  method2 = 1
  nullmethod = 0

We're cookin'. Now, I need to get the same results with a PythonMethod.
showMethods2 (a PythonMethod) is defined as:

  print _.hasattr(self, 'method1')
  print _.hasattr(self, 'method2')
  print _.hasattr(self, 'nullmethod')
  return printed

which, when invoked on my 'test' instance, returns:

  0
  0
  0

I have tried every permutation of Python code I can, and none work as the
DTML Method does. Somebody? Anybody? :-)

--Jeff

---
Jeff K. Hoffman   704.849.0731 x108
Chief Technology Officer  mailto:[EMAIL PROTECTED]
Going Virtual, L.L.C. http://www.goingv.com/


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




[Zope] Re: [squishdot] Squishdot and ZCatalog, Zope 2.2

2000-08-21 Thread Chris Withers

[EMAIL PROTECTED] wrote:
 I'm running 2.2.0 (I swear!), with the latest Hotfix.

This is the only possible difference I can see :S

Can you try The Squishdot CVS on a plain, boring, stock Zope 2.2.0
install?

(no other patching, no hotfixes, hopefully not even any other products
installed...)

cheers,

Chris

 Had I known that REQUEST requirement was a bug, I would've reported it
 earlier. Which is the preferred method then, absolute_url() or
 getPhysicalPath() ?

getPhysicalPath should be used for cataloging, AFAIK, since it's not
affected by virtual hosting...

cheers,

Chris

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




Re: [Zope] Zope is very slow!

2000-08-21 Thread ethan mindlace fremen

Christiano Anderson wrote:

 Do you have any example of the best Apache and ProxyCache configuration to
 running zope?
 
 My configuration looks like this:
 
 IfModule mod_proxy.c
 ProxyRequests On
 #ProxyReceiveBufferSize 65536
 ProxyReceiveBufferSize 0
 CacheRoot "/www/proxycache"
 CacheSize 5000
 CacheGcInterval 1
 CacheMaxExpire 48
 CacheLastModifiedFactor 0.1
 CacheDefaultExpire 5
 ProxyPass /paginas/ http://200.xxx.xxx.xxx:8080/
 ProxyPass /p_/ http://200.xxx.xxx.xxx:8080/p_/
 ProxyPass /misc_/ http://200.xxx.xxx.xxx:8080/misc_/
 ProxyPassReverse /paginas/ http://200.xxx.xxx.xxx:8080/
 ProxyPassReverse /p_/ http://200.xxx.xxx.xxx:8080/p_/
 ProxyPassReverse /misc_/ http://200.xxx.xxx.xxx:8080/misc_/


afaik this is far larger than you need.  First, i've started using
rewrite rules as i find it far more flexible.  For Zope.org, in lieu of
ProxyPass  ProxyPassReverse I just use:

RewriteRule / http://www.zope.org: [L,P]

If you've got the SiteAccess set up correctly (i.e. it reads
http://xxx.xxx.xxx/paginas/ ) then you should have no problems.

ProxyPassReverse is, as far as I can discern from the apache docs,
completely superfluous for Zope.

Hope that helps,
-- 
ethan mindlace fremen
Zopatista Community Liason
Abnegate I!


___
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] anyone got a foolproof 2.1.6 - 2.2.0 via import schema?

2000-08-21 Thread ethan mindlace fremen

Tony McDonald wrote:
 
 I get KeyErrors from 2.2.0 with an Error value of a rubbish character
 when trying to import a folder of various objects. This also happens
 when trying to import the XML version, except the Error Value is 'id'
 (but with no idea of where the error is in the XML file ...
 irritating).
 
 any ideas? this is driving me up the bloody wall.
 ta
 tone

Hi, Tony.  2.2.0 had some problems with the ZDOM that prevented XML
documents from functioning properly.  This should be fixed in more
recent versions.

Hope that helps,

-- 
ethan mindlace fremen
Zopatista Community Liason
Abnegate I!

___
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] Zope on HPUX

2000-08-21 Thread R. David Murray

On Mon, 21 Aug 2000, Michael Maul wrote:
 Does any one have zope running on hpux 10.20?
 It needs a thread enabled python, which I have not been able to build
 (Using pthread 1.3.7)
 each time I try to run the python Interpeter it core dumps..with..
 pthread_mutex_init: Invalid argument

For help on getting an HPux thread enabled python, you might try
www.python.org and/or the Python specific mailing lists and newsgroups.

--RDM


___
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] proxy roles in 2.2

2000-08-21 Thread ethan mindlace fremen

Sven Hohage wrote:
 
 Hi,
 I've got two questions.
 1.Is Zope 2.2.0 masking the length of the passwords?
 2. the more important-
 I'm using a method to change properties by form. The user i.e. Tim has
 the role manager in the highest user_folder and acquisition is kept but
 Zope tells me that the user is not authorized.  Why???
  Thanks!

in 2.2 proxy roles are that of the object owner.  Therefore, the role(s)
of the user that calls the object aren't relevant.  If you need it to
execute with higher permissions you need to give ownership of it to
someone with the proper permissions.  you may then restrict access to
the method according to the authenticated user.

hope that helps,
-- 
ethan mindlace fremen
Zopatista Community Liason
Abnegate I!

___
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] SQL trees...

2000-08-21 Thread Mayers, Philip J

Confirmed. Downgrading to 2.1.4 fixed it. How annoying...

Thanks a lot!

Regards,
Phil

+--+
| Phil Mayers, Network Support |
| Centre for Computing Services|
| Imperial College |
+--+ 

-Original Message-
From: Philipp Auersperg [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2000 18:31
To: Mayers, Philip J; [EMAIL PROTECTED]
Subject: Re: [Zope] SQL trees...


Which Zope version do you use ?

When I read your message I have a deja-vu:
I encountered the same output when I use SQL based trees under Zope 2.1.6,
it is a bug somewhere in the SQL method handling that appeared in 2.1.6 and
is 
fixed in 2.2.0.

Solution:
switch back to 2.1.4 or forward to 2.2.0 or patch the existing 2.1.6 

Philipp Auersperg (zwork)

___
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] File size errors for manage_addFile

2000-08-21 Thread Satheesh Babu

Hi all,

I've a form using which files need to be uploaded
to Zope's database. The processing method has
Proxy of Manager. However, if the uploaded
file is more than 150KB, manage_addFile
which is called from inside my processing method
gives an error which says 
  Zope error: in commit_sub

If I upload using normal Zope interface, there
is no problem with any size file. There is no
problem with my form+processor for files less
than this size either.

I've the same error for manage_addImage too,
but the file size limit there is 50KB.

Platform: WinNT4.0, SP6
Zope 2.1.6

Any help is greatly appreciated.

Many thanks in advance

vsb
[EMAIL PROTECTED]
http://www.mamlegault.com/~vsbabu/


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




[Zope] RE: [Zope-dev] Fighting with ZServer

2000-08-21 Thread weboats

To your image in properites add a string property called

Last-Modified 

with value

Wed, 15 Mar 2002 19:02:17 GMT

And your broken image problem will disappear.  


This is not zope specific, I think it's apache since 
I've had the problem with PHP4 using a fusebox 
architecture.

-Kevin Smith



Since this afternoon, I am fighting with ZServer.
Currently, it seems Zserver is winning 
I do not understand, what I see...

At work: Zope 2.1.6, Sparc Solaris 2.7, Linux Netscape 
4.51

  Sometimes, images are not shown by Netscape (broken 
image).
  No "simple" reload is able to change this, however 
a "forced" reload
  lets Netscape show the image correctly.
  From then on, the image is always shown correctly: 
by "simple" reload,
  "forced" reload or directly (served from cache).

  The strange thing, inside "Image.index_html" the 
failing
  "simple" reload and the succeeding "forced" reload 
look
  completely identical.


At home: Zope 2.1.6, Intel Linux 2, Linux Netscape 4.5

  All images are always shown correctly.
  However, there is no log entry in "var/Z2.log" for
  about 50 % of the requests that are answered by
  a 304 response. It is non-deterministic whether
  a log entry is written or not.


Did you ever see something like this?


Dieter



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




[Zope] Squishdot and Traversal Interface, take 2

2000-08-21 Thread Chris Withers

[EMAIL PROTECTED] wrote:
 
self.catalog_object(obj,'/'+join(self.getPhysicalPath(),'/')+'/'+obj.thread_path()+'/'+`id`)

This is very bad for many reasons :(

 When I went to look at the catalog entries after adding a new site within
 a folder called myfolder, I noticed the new entries showed up as:
 
 /newsquish/id
 
 When I clicked on the link, I received an error saying it can't find the
 object. I don't think a leading '/' should be supplied to
 catalog_object(). 

You are quite correct, but the problem in this case was more serious.
getPhysicalPath(), AFAIK, is a recursive method that goes up the
acquisition tree. Unfortunately, in __init__, where the sample articles
are created, self isn't acquisition wrapped and so you:

a) don't get your leading '/' for free

b) don't get path info for further up the tree from the SquishSite
(hence the manage_catalogView page is broken)

This was the major thing to be fixed with some judicious use of a
'parent' argument to the __init__ method and a bit of
wrapped=self.__of__(parent) magic.

 I tried to update the catalog, which promptly removed
 all the postings from the catalog.

That I never experienced...

 When I re-cataloged the postings, the
 entries were now showing up as:
 
 //myfolder/newsquish//id

My second mistake :(

thread_path returns the thread path with a '/' prepended, so mine was
redundant. d'oh!

So there ya go, all fixed now though (allegedly) and checked into CVS.

Lance, thanks for all the testing, it's very much appreciated :-)

cheers,

Chris

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




[Zope] dtml-in attachment Was Re: Squishdot and ZCatalog, Zope 2.2

2000-08-21 Thread Lance


 Oh, I need help alright, for trying to move Squishdot to Zope 2.2 in the
 first place :(
 My current fun is with dtml-in attachment which works fine in the edit
 form on the management interface but throws a KeyError on 'file_name'
 when I try and use it in the posting_html DTML method...

 Any ideas/solutions greatly recieved :S

Did you figure this one out yet? I started taking a look at it now, and I 
think it's a security issue. If I put Squishfile.py into cheat mode 
(__allow_access_to) It works fine.

-- 
--Lance

___
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] calling (SQL) methods dynamically from External methods

2000-08-21 Thread Andrew Kenneth Milton

+---[ Philipp Auersperg ]--
| Thanks for the answer, it helped me, 
| but you missed what I really wanted.

Sorry. d8)

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

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




Re: [Zope] Zope on HPUX

2000-08-21 Thread Bill Anderson

"R. David Murray" wrote:
 
 On Mon, 21 Aug 2000, Michael Maul wrote:
  Does any one have zope running on hpux 10.20?
  It needs a thread enabled python, which I have not been able to build
  (Using pthread 1.3.7)
  each time I try to run the python Interpeter it core dumps..with..
  pthread_mutex_init: Invalid argument
 
 For help on getting an HPux thread enabled python, you might try
 www.python.org and/or the Python specific mailing lists and newsgroups.

And once you have done that, yes Zope runs fine on it.

:)


--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

___
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] Zope.Org Style Developers Portal Question

2000-08-21 Thread Tim Bass


Hi. One of my clients needs to build a portal for developers
to share information.  Showed them www.zope.org and they
liked it.  Home much time would it take for a novice to
go from a raw zope distribution to put in place the core
functionality/look/feel of the zope.org portal?

-Tim

Tim Bass, Silk Road
http://www.silkroad.com/

Network-Centric Subject Matter Expert, AFCIC/SYN
Network-Centric Subject Matter Expert, DOE/CIO

http://calendar.yahoo.com/public/timothy_james_bass

Voice: 703 222 4243
Fax:   703 222 7320

___
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] How do I use etcUserFolder

2000-08-21 Thread Meaghan Aldridge

Hi,

I have downloaded and installed the etcUserFolder files, but I can't
seem to get it to work.

Could someone please give me some step by step instructions about how to
install and use this product?

Thanks,

Meaghan


begin:vcard 
n:Aldridge;Meaghan
tel;fax:9518-7620
tel;work:9518-7011
x-mozilla-html:FALSE
adr:;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Meaghan Aldridge
end:vcard



Re: [Zope] Looping through a folder's contents...

2000-08-21 Thread Andrew Kenneth Milton

+---[ [EMAIL PROTECTED] ]--
| What would the "Recurse_Subfolder" method do?
| 
|  dtml-in "root.objectValues('Folder')"
|  dtml-in "_.range(depth)"nbsp;/dtml-indtml-var title
|  dtml-var "Recurse_SubFolder(root=this(),depth=depth+1)"
|  /dtml-in

That *is* Recruse_Subfolder :-)

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

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




Re: [Zope] Looping through a folder's contents...

2000-08-21 Thread jiva

What would the "Recurse_Subfolder" method do?

On Mon, Aug 21, 2000 at 04:12:05PM +1000, Andrew Kenneth Milton wrote:
 +---[ [EMAIL PROTECTED] ]--
 | I would like to loop through the contents of a folder, and the
 | contents of the subfolders of that folder.  I know I can do this to a
 | singular level by doing something like:
 | 
 | dtml-in "subfolder.objectValues('Folder')"
 | dtml-var title
 | /dtml-in
 | 
 | Should give me a list of the titles of all the subfolders of the
 | folder called "subfolder".  So, once I get there, how do I loop
 | through the subobjects of each of those folders?
 | 
 | In other words, I have a subfolder inside of the folder called
 | "subfolder" and I want to see the contents of that folder.  How do I
 | do it?
 
 I'll give you the general case for 'all' folders:-
 
 Make a Method...  Recurse_SubFolder.
 
 dtml-in "root.objectValues('Folder')"
 dtml-in "_.range(depth)"nbsp;/dtml-indtml-var title
 dtml-var "Recurse_SubFolder(root=this(),depth=depth+1)"
 /dtml-in
 
 
 dtml-var "Recurse_SubFolder(root=subfolder, depth=0)"
 
 
 You can obviously expand this to also take a 'type' for objectValues,
 and pass the namespace etc.
 

-- 
A homeowner's reach should exceed his grasp, or what's a weekend for?

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