Re: [Zope-dev] Re: ZPatterns, ObjectDomain, UML and all that.....

2000-12-24 Thread Steve Spicklemire


Hi Itai,

   Good idea! I'll try to add this to the example.

thanks!
-steve

Itai P.S. I've been struggling with a problem that might get
Itai cleared up if you added it to the example:

Itai Say you want to allow a user to add a ToDo from the
Itai Deliverable screen (in addition to the existing menu for
Itai selecting existing ToDos). You could either place a 'create
Itai ToDo' form right there, using a UI snippet from ToDos, or
Itai link to ToDos.addToDoForm. The problem is how to get the id
Itai of the new ToDo into the deliverable. If you didn't store
Itai todo_ids in Deliverable, instead calling
Itai ToDos.getToDosForDeliverable(), there would be no
Itai problem. Otherwise, you'd need a addToDoInterface in
Itai Deliverable, which will call ToDos.addToDo, then add the new
Itai ToDo id to todo_ids. Or, as a third option, you could pass a
Itai method to ToDos.addToDo, and get it to call this method and
Itai give it the new id.

Itai What do you think? Want to tackle this in the example?

Itai Itai -- Itai Tavor "Je sautille, donc je suis."  C3Works
Itai [EMAIL PROTECTED] - Kermit the Frog

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


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




[Zope-dev] __bobo_traverse__, new ZCatalog and ZClasses

2000-12-24 Thread Steve Alexander

Zope 2.3, from cvs on 2000-12-24, patched with Chris P's latest ZCatalog 
stuff.

I'm getting a bad interaction between ZClasses, ZCatalog and 
__bobo_traverse__.

I have some ZClasses that are accessed via a container that implements 
__bobo_traverse__. The problem is that, although I can get to the ZClass 
instances by typing a URL into by browser, I get a security error when I 
try to get to them using restrictedTraverse.

This causes a problem, as it means these instances cannot be catalogued 
in a ZCatalog, because ZCatalog now uses restrictedTraverse to get an 
object for indexing.

The zope security validation gets stuck between not knowing for sure 
what the object's container is (according to comments from 
Traversable.py), and ZClasses not returning anything for __roles__.

ZPatterns jargon paragraph:
All this causes a problem if you want to use the ZPatterns idiom of 
ZClass DataSkins in a Specialist, catalogued using a ZCatalog. You can 
get around it by providing a __roles__ attribute using SkinScript.


Is there some bug in the ZClasses __roles__ machinery?

When does __roles__ get set on objects or classes anyway? I've found the 
description of what __roles__ are used for in the old Trinkets tutorial 
document. I think things have moved on a bit since then, though.


Some relevant code snippets:

Traversable.py

 t=get(object, '__bobo_traverse__', N)
 if t is not N:
 o=t(REQUEST, name)

 # Note we pass no container, because we have no
 # way of knowing what it is
 if (restricted and not securityManager.validate(
 object, None, name, o)):
 raise 'Unauthorized', name


ZopeSecurityPolicy.py, line 123:

 # Try to get roles
 roles=getattr(value, '__roles__', _noroles)

 if roles is _noroles:

 
 # We have an object without roles. Presumabely, it's
 # some simple object, like a string or a list.

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


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




Re: [Zope] standard_error_message woes!

2000-12-24 Thread Tino Wildenhain

Hi Chris,

Chris Withers wrote:

*snip*
 
 PS: almost related, have you noticed how there's no way you can prevent Zope
 (other than hacking the source) from tacking the error message on the end of
 the HTML stream, even in production mode? Not only does this produce badly
 formed HTML, but it gives out way more information that it should to someone
 potentially looking to hack your site...

Where was that? I got the position in the source some time... 
May be we can patch it here and there to get what we all want ;-)
And then put it in the collector (which currently lacks an upload
facility for patches). This means including the error pages for
40x. I'm also a fan of localisated error messages as well as
wap-alized ones ;)

In the meantime, have a merry x-mas :-)

Regards
Tino

PS: Chris, will you be in amsterdam?

___
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] Closer But No Cigar

2000-12-24 Thread Phil Harris

Ben,

Check the permissions on the var folder, it needs to be writable by the user
that starts Zope.

This being said if you start Zope as root then the user changes to nobody,
so var needs to be writable by nobody.

something like chmod -R nobody:nobody var works for me.
- Original Message -
From: "Ben Ocean" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 23, 2000 9:50 PM
Subject: [Zope] Closer But No Cigar


 Hi;
 Well, I've finally got python-1.5.2 installed and running and Zope
 re-installed from the source code to the point where it gives me the good
 'ol *Done!* line, but when I type
 ./start 
 it chokes. Here's the print-out:

 thor:/apache/vhosts/Zope-2.2.4-src# ./start 
 [1] 4983
 thor:/apache/vhosts/Zope-2.2.4-src# --
 2000-12-23T21:44:24 PROBLEM(100) ZServer Computing default hostname
 --
 2000-12-23T21:44:24 INFO(0) ZServer Medusa (V1.16.4.3) started at Sat Dec
23
 13:44:24 2000
 Hostname: thor.galaxynet.com
 Port:8080

 --
 2000-12-23T21:44:24 INFO(0) ZServer FTP server started at Sat Dec 23
 13:44:24 2000
 Authorizer:None
 Hostname: thor.galaxynet.com
 Port: 8021
 --
 2000-12-23T21:44:24 INFO(0) ZServer Monitor Server (V1.8.4.1) started on
 port 8099
 Traceback (innermost last):
   File "/apache/vhosts/Zope-2.2.4-src/z2.py", line 710, in ?
 pf = open(PID_FILE, 'w')
 IOError: [Errno 13] Permission denied:
 '/apache/vhosts/Zope-2.2.4-src/var/Z2.pid'

 What am I missing?
 TIA,
 BenO


 ___
 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] pb : transparent folder 0.3 and ZSQL methods

2000-12-24 Thread Stefan H. Holek

On 22 Dec 2000, Didier Georgieff wrote:

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

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

HTH,
Stefan


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




[Zope] Can't import objects ... is transparent folder still the reason ?

2000-12-24 Thread Didier Georgieff

I have a problem importing objects (Yihaw Folder derived from Object Manager) on 
2.2.4 and Transparent Folder (see traceback at the end).

Some months ago i had some similar problem with the first/removed Transparent 
Folder version.
Is this same problem still there on Transparent Folder 0.3, or do i have to search the 
problem elsewhere for a workaround ?

Any idea about a temporary workaround for importing such objects ? Because it will be 
quite difficult to transfer things from developpement server to production server.
This is what Shane respond to this earlier problem. I was not able to see if TP0.3 is 
now ObjectManager safe or not.

 The TransparentFolders product patches ObjectManager so that objects
 in transparent folders are searched.  Unfortunately, the patch causes
 the pickling mechanism to fail when ZODB pickles a class definition
 derived from ObjectManager.  
 The
 reason it fails is because the pickler doesn't recognize the new
 __getattr__ method as a Python Method and tries to pickle it, which is
 not possible.  There is actually a way to solve that bug by patching
 more Zope source, but I don't think that's the right solution.

 The better solution will involve the same method SiteAccess uses to
 change traversal behavior. Once SiteAccess has
 settled, it should be easy to create a much improved
 TransparentFolders.  But for now, I have removed TransparentFolders
 from the available products.

This is the new traceback :

{HYPERLINK "http://www.zope.org/Credits"}{PRIVATE "TYPE=PICT;ALT=Powered by 
Zope"}{HYPERLINK "http://www.zope.org/Credits"}Traceback (innermost last):
  File C:\Zope\Portal224\lib\python\ZPublisher\Publish.py, line 222, in publish_module
  File C:\Zope\Portal224\lib\python\ZPublisher\Publish.py, line 187, in publish
  File C:\Zope\Portal224\lib\python\Zope\__init__.py, line 221, in 
zpublisher_exception_hook
(Object: ApplicationDefaultPermissions)
  File C:\Zope\Portal224\lib\python\ZPublisher\Publish.py, line 171, in publish
  File C:\Zope\Portal224\lib\python\ZPublisher\mapply.py, line 160, in mapply
(Object: manage_importObject)
  File C:\Zope\Portal224\lib\python\ZPublisher\Publish.py, line 112, in call_object
(Object: manage_importObject)
  File C:\Zope\Portal224\lib\python\OFS\ObjectManager.py, line 
537, in manage_importObject
(Object: ApplicationDefaultPermissions)
  File C:\Zope\Portal224\lib\python\OFS\CopySupport.py, line 
406, in _verifyObjectPaste
(Object: ApplicationDefaultPermissions)
Copy Error: (see above)


Regards.
Didier.

___
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] Reality check PYZOMA = python / zope for Mac ?

2000-12-24 Thread Steve Spicklemire


Hi Jason,

   As far as I know there are only two ways to run Zope on MacOS7/8/9. 

1) run Virtual PC and use the Windows version.

2) run Virtual PC and use the Linux version.

sorry.
-steve

 "Jason" == Jason Cunliffe [EMAIL PROTECTED] writes:

Jason Steve

Jason Thanks very much for this encouraging news.  Indeed if it
Jason runs well, Zope could be important enough app for for soem
Jason people to upgrade to MacOSX.

Jason If one needs to install Zope __now__ on non-MacOSX
Jason machines, what is the story?

Jason cheers - Jason
Jason ___
Jason Jason CUNLIFFE = NOMADICS['Interactive Art and Technology']


Jason Steve Spicklemire [EMAIL PROTECTED] wrote:
 Have you seen: http://www.zope.org/Members/sspickle/MacOSXBHFS
 
 Zope-2.3a1 runs with Python-1.5.2. I've run Zope-2.2.x on
 MacOSX and it runs great. At some point someone with time, or a
 paying customer,
Jason ...[snip mySQL commercial/non-commercial prospects]


___
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] user property sheets

2000-12-24 Thread Maik Roeder

Hi Timothy !

Timothy Wilson wrote:
 I think I've settled on a ZClass approach. From looking through the
 ZDP-tools info (which looks great, but it probably overkill for what I'm
 trying to do), 

The ZDP-Tools are rather simple and provide a generic framework for 
content management.

 it looks like to created a folderish ZClass for
 Members.

The Members ZClass is the model, and there is also a MemberFolder Class
which is the Controller of the Member ZClass. 

 Would you mind giving a very quick sketch of the structure of your
 ZClass(es)? That would probably give me quite a jumpstart.

In fact there is some documentation on the ZDP-Tools
available here:

http://zdp.zope.org/projects/zdptools/Drafts

I have started a howto on using the ZDP-Tools for a Weblog
here:

http://zdp.zope.org/projects/zdptools/Drafts/weblog/weblogmanual

It will also help to know about the law of demeter:

http://uzopia.editthispage.com/discuss/msgReader$24

 I've been following the PTK developments from a distance, and much of that
 looks really cool. Unfotunately, however, things are developing very slowly
 and I can't really wait any longer for it.

It was the same last year in december when I started the ZDP-Tools project :-)

I have some interesting stuff on this on my weblog:

http://uzopia.editthispage.com/discuss/msgReader$9

 My site is for a K-12 school district in the States. I'd like to create
 pages for teachers and administrators so they can share links, provide
 contact information, etc.

The ZDP-Tools are just perfect for this. Don't miss this article on
Uzopia:

http://uzopia.editthispage.com/discuss/msgReader$10

 Unfortunately, I'm trying to wade through all this
 stuff essentially on my own. Thanks for any help you can provide!

Tell me what additional information you need, and I may take
some time to write it down.

Best regards,

Maik Röder
-- 
Uzopia - Digging la vida Zopa - http://uzopia.editthispage.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] Reality check PYZOMA = python / zope for Mac ?

2000-12-24 Thread Steve Spicklemire


 "Jim" == Jim Harrison [EMAIL PROTECTED] writes:

 Does anyone know what Apple's plans are for MacOSX introduction
Jim haven't found a source for a compiled 1.5.2. I've tried to
Jim follow Steve's directions for the 1.5.2 build at
Jim http://www.zope.org/Members/sspickle/MacOSXBHFS but I
Jim haven't been successful with that as yet. I also tried Zope

Hmm... as an attempt to help with this I've uploaded stuff to

http://www.zope.org/Members/sspickle/MacOSXStuff

that you can download and install python and Zope on MacOSX. There are
minimal instructions there, but all the compiling has been
done all you should need is to:

as root:

#make install

in the Python-1.5.2 directory, and edit the 'stop' file (which has a
hard coded path in it) in the Zope-2.2.4-bin directory once you've
unpacked the files with gnutar. 

Here's what I did:

gnutar -xzvf pyth152.b.mosx.tgz
su
cd Python-1.5.2
make install
exit
gnutar -xzvf Zope-2.2.4.b.mosx.tgz
cd Zope-2.2.4-bin
sed s/steve/yourname/g  stop  newstop
mv newstop stop
./start

Let me know how it goes!

-steve




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