[Zope] ZClass question?

2000-06-27 Thread Webmaster

I am running 2.2.0b2 on a RH linux and have created a simple ZClass. All of
my modified constructor objects work perfect however when I created a
separate dtml method to add instances I get some weird errors.

First when I try and create a new instance remotely I get a zope error
"unauthorized" no matter what username and password I type. If I try and
create a new instance locally on the same box (or within the internal
network) I get a KeyError and then at the bottom of the same page is a
second included page with a 404 file not found error. If I change the method
from "post" to "get" so I can see if the new_goLiveDate is being passed I
get the "unauthorized" error.

Any idea what is going on?
Here is my "add_instance_html" code.

dtml-call "REQUEST.set('goLiveDate',REQUEST.form['new_goLiveDate'])"
dtml-with "manage_addProduct['myZClass']" 
 dtml-call "myZClass_add(_.None,_, NoRedir=1)"
/dtml-with

dtml-in "objectValues(['myclass'])"
  dtml-if "(_['sequence-item'].id == 
  REQUEST.form['new_goLiveDate'])"
dtml-call "REQUEST.set('new_goLiveDate',_['sequence-item'])"
  /dtml-if
/dtml-in
dtml-call
"_['new_goLiveDate'].propertysheets.myZClass_info.manage_changeProperties({
   'title'  : REQUEST.form['title'],
   'summary': REQUEST.form['summary'],
   'text'   : REQUEST.form['text'] 
})"

Let me know if you need more info.

-Jamey

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




RE: [Zope] ZClass question?

2000-06-27 Thread Webmaster

I am using DTML methods on all.

 -Original Message-
 From: Erik Enge [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, June 27, 2000 4:37 PM
 To:   Webmaster
 Cc:   [EMAIL PROTECTED]
 Subject:  Re: [Zope] ZClass question?
 
 On Tue, 27 Jun 2000, Webmaster wrote:
 
  First when I try and create a new instance remotely I get a zope error
  "unauthorized" no matter what username and password I type. If I try and
 
 Are you using DTML Methods or Documents?  I've heard other talking
 about creating roles, but I switched from DTML Documents to DTML
 Methods and tde 'unauthorized' message went away.  Don't know why :-(.

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




[Zope] ZClass question

2000-06-05 Thread Jerome Alet

Hi,

I'm currently trying to store all of the Medicine School (I work for) 
events in Zope, using the Calendar product to store them.

I've created from my browser a Zclass which has a propertysheet and some
properties in it, and some DTML methods. I've called this class
GenericEvent. 

I want to create 4 or five other Zclasses which only differ from the first
one by their meta type and the value (not the name) of one of their
properties. For example I want to create ExamEvents, CoursesEvents, and so
on...

Then I want to give permissions to some people to add some type of events
in the database.

For example I want John to be able to add (and delete) both GenericEvents
and ExamEvents, while I want Jane to only be allowed to add CoursesEvents,
and not be allowed to delete CoursesEvents she hasn't created.

I've created my GenericEvent ZClass and it works fine, thanks to Jason
Spisak, but now when I try to create other ZClasses deriving from this
ZClass I can't choose it as the base class for the new classes.

Can I do that from my browser (How ?) or must I do it in python ?

If it's not possible I plan to add the event type as a property of
GenericEvent, but then how can I deal with the different permissions I
need ?

thanks in advance for any hint.

Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome
Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 
28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE


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