[Zope] Where to store my data?

2000-11-13 Thread Randall Kern
I've just started playing with Zope again, and this time I'm going to spend enough time with it to actually decide if it's crazy or I am :) My project currently consists of a bunch of community "modules" written in PHP using MySQL as a data store. Each modules PHP code produces an XML

Re: [Zope] Uploading files

2000-11-15 Thread Randall Kern
make sure you set the enctype correctly in your form tag: form action="foo" method="post" enctype="multipart/form-data" -Randy - Original Message - From: "Nolan Darilek" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 15, 2000 5:07 PM Subject: [Zope] Uploading files

[Zope] ZClasses on top of my Python classes?

2000-11-15 Thread Randall Kern
I've seen several doc tidbits suggesting one create ZClasses derived from their Python classes, sticking all the biz logic in the python classes, and the presentation in the ZClasses... Could someone provide some insight into why this is better than simply writing separate python classes

Re: [Zope] modifying objectValues from an external method?

2000-11-15 Thread Randall Kern
dtml-call expr="manage_delObjects(ids=objectIds())" Place this in a DTML method, and it will remove all the sub-objects in the folder you call it on. Example: Create a folder "Test". In that folder, create a DTML method called remove_all, and put the DTML from above in it. Then create

[Zope] ZClass/DTML Document transparency

2000-11-20 Thread Randall Kern
Hi all, I have a folder (foo) which contains a set of DTML Documents, and instances of a ZClass. From another DTML document, I enumerate the contents of this folder, using a DTML-IN tag: dtml-in expr="bar.foo.objectValues()" sort="order" ... /dtml-in My problem is with ..., namely dealing

[Zope] client argument to python function calls?

2000-11-26 Thread Randall Kern
I'm trying to emulate some DTML methods with python code in my (python) product. Let's say I have two Python classes, one named Foo, the other Bar. Something like this: class Foo(Folder.Folder, Persistent, Implicit): meta_type = "Foo" def magic(self, client=None): "magic method!"

Re: [Zope] client argument to python function calls?

2000-11-27 Thread Randall Kern
Figured this out, with the zope-dev archives. In case anyone else bumps into the same thing, the FunctionTemplate class at http://www.zope.org/Members/htrd/howto/FunctionTemplate is very helpful. -Randy - Original Message - From: Randall Kern To: [EMAIL PROTECTED

[Zope] adding roles to Zope in Product.initialize()

2000-11-29 Thread Randall Kern
I wish to restrict the creation of a class (SpokeSite) to people with the "Add Spoke Site" permission, and in turn only provide that permission to people in the 'Super-manager' Role. When I call ProductContext.registerClass for my SpokeSite class, I can pass the permission argument with the

Re: [Zope] weird bug?

2000-12-03 Thread Randall Kern
- Original Message - From: "Dieter Maurer" [EMAIL PROTECTED] of the method. Moreover, proxy roles are no longer inherited to called methods. This has confused me several times, could anyone shed some light as to why proxy roles are not inherited? Thanks, -Randy

[Zope] siblings of me, rather than of parent

2000-12-03 Thread Randall Kern
My site has two main classes of objects, Modules (and their derivatives), and Categories. A normal setup might look something like this: root blab (Module) weather (Category) rain (Category) sun (Category) region (Category) I need to handle URLs like /root/blab/weather. The

Re: [Zope] siblings of me, rather than of parent

2000-12-03 Thread Randall Kern
the /category folder instead, which doesn't have header.html. Anyone understand why this is happening? Thanks again, -Randy - Original Message - From: Randall Kern To: [EMAIL PROTECTED] Sent: Sunday, December 03, 2000 8:08 PM Subject: [Zope] siblings of me, rath

Re: [Zope] siblings of me, rather than of parent

2000-12-04 Thread Randall Kern
ahahhaha!!! (sorry, been up _way_ too long.) the trick was returning ob.aq_base.__of__(self), not ob.aq_inner.__of__(self)! Seems to work great now. -Randy - Original Message - From: Randall Kern To: [EMAIL PROTECTED] Sent: Sunday, December 03, 2000 11:08 PM

Re: [Zope] How to specify to z sql methods, the connection object to use at runtime...time...

2000-12-05 Thread Randall Kern
I haven't actually tried this, but it seems it should work: / /db1- folder connection- a DB connection object to db 1 /db2- folder connection- a DB connection object to db 2 query- a ZSqlMethod, set to use the connection 'connection'. Note, you

Re: [Zope] Adding users

2000-12-06 Thread Randall Kern
Something like this should work: dtml-with acl_users dtml-call expr="manage_users(submit = 'Add')" /dtml-with It will look in the REQUEST for the following fields: name password confirm (this must match password) roles domains So either set these from an HTML form, or use dtml-call