[Zope] SQL Methods

2000-08-31 Thread RC Compaan

I have a sql method and a dtml method calling the sql method.  They live in
the same folder and the dtml method's proxy roles are set.  I've tried
everything and Zope tells me I don't have permission to do view the sql
result returned by the sql method.  This worked fine in Zope 2.1.6 so I
guess it has something to do with the new security model.  I also have
explicit ownership of all objects that I'm working with - still no luck.

Any advise?

Roché


___
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: How to Delete ZClass Instances programmatically??

2000-08-28 Thread RC Compaan

Instead of directing your form to URL0 direct it back to your custom
interface.  In your form you can evaluate the value of submit to determine
the appropriate action:

 


untested.

Roché

> -Original Message-
> From: Jean Jordaan [mailto:[EMAIL PROTECTED]]
> Sent: 28 August 2000 01:43
> To: '[EMAIL PROTECTED]'
> Cc: RC Compaan (E-mail)
> Subject: How to Delete ZClass Instances programmatically??
>
>
> Hi Zopers
>
> I've found the "How-To: Adding ZClass Instances Programmatically",
> but now I'm looking for the *Deleting ZClass Instances* one!
>
> I'm trying this as a beginning (hacked from the Zope management
> interface)::
>
> 
>   
> 
>   [...]
> 
>   
> 
>   [...]
> 
>   
>   
> 
>
> Problems:
>
>  - it sends me to the management screen afterwards, and I'm
>calling it from the public interface.
>
>  - I don't necessarily want to give the 'ContentManager' rights
>to delete objects; I'd rather manage this through a delete
>method with the appropriate proxy role.
>
> Any advice or RTFM pointers?
> --
> Jean Jordaan   --technical writer--
> Mosaic Software--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] RE: About Squishdot and permissions

2000-08-08 Thread RC Compaan

Check if the proxy role for index_html is set to manager.

roché

> -Original Message-
> From: Jean Jordaan [mailto:[EMAIL PROTECTED]]
> Sent: 08 August 2000 01:02
> To: RC Compaan (E-mail); '[EMAIL PROTECTED]'
> Subject: About Squishdot and permissions
>
>
> hi Zopers,
>
> In case this is very obvious (I'm RTFM'ing meantime) ..
> while hacking Squishdot's DTML, I did something to
> make 'leftbox_items' inaccessible to 'Anonymous':
>
>   Unauthorized
>   You are not authorized to access leftbox_items.
>
> in / , Anonymous has these permissions:
>
> Access contents information
> Add Comments
> Add Newss
> Add Postings
> Add ZWiki Pages
> Change ZWiki Pages
> Search ZCatalog
> Use Database Methods
> View
>
> any clue what's up?
>
> --
> jean (running Zope 2.1.6 and Squishdot-0-4-1)
>


___
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] ZPatterns Question

2000-08-07 Thread RC Compaan

I created a ZClass called "Product" with Dataskin as baseclass.

I also added a specialist called ProductManager containing a default rack.
Under storage for the rack I selected the newly created Product ZClass.

My product ZClass needs to query both a RDBMS and the ZODB for
attributevalues.  At this point I get lost.
I guess i should add an attributeprovider plug-in???

What should go into the fromexpr and attrsexprs properties of the
attributeprovider?  Should one add an attributeprovider for each attribute
of the product?

Roché



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

2000-08-04 Thread RC Compaan

What does the "Precondition" property of the file class refer to?

Roché


___
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: How to prime a selection?

2000-08-03 Thread RC Compaan

Hi Jean

The value for a selection list can be any zope object that returns a list
eg. MyDocClass can have a property "Format" with a value "FormatList", where
FormatList is a dtml-method that returns a list.

Practically:
1.Go to the property sheet for your new class and add the property Format
with value FormatList.
2.Go to the Folder where you want to add an instance of your ZClass and
create add a property "docformats" of type "lines" and enter the initial
formats.
3.In the Folder where you want to add your instance, create a dtml-method
called "FormatList" that will return the list, containing:


Hope this helps.

For more info on selection list see
http://www.zope.org/Members/AlexR/SelectionLists

Roché

> -Original Message-
> From: Jean Jordaan [mailto:[EMAIL PROTECTED]]
> Sent: 04 August 2000 07:10
> To: '[EMAIL PROTECTED]'
> Cc: RC Compaan (E-mail)
> Subject: How to prime a selection?
>
>
> Hi all
>
> I'm making a document class for a warehouse of papers.
> It's based on ZCatalogAware and ObjectManager (to wrap
> mainly PDFs and DOCs), and has fields:
>
>   title   (string type)
>   origin  (string type)
>   format  No value for format_value.
>   typeNo value for type_value.
>
> "format" and "type" are selections --
>
> 1. where do I supply their initial values (filling in
>'format_value' and 'type_value')?
> 2. is it possible to let a field offer presets and
>previously entered values, but to allow users to
>add new ones, which are remembered and offered to
>subsequent users?
>
> A RTFM-type answer to question 1. is perfectly OK, though a
> page reference would be sorely appreciated.
>
> --
> jean
>


___
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 Components and ZPatterns

2000-07-18 Thread RC Compaan

And no source is distributed with the binary distro?  It seems harless to
include the zope components into the binary distro.

Roché

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Bill Anderson
> Sent: 18 July 2000 10:40
> To: RC Compaan
> Cc: Zope
> Subject: Re: [Zope] Zope Components and ZPatterns
>
>
> RC Compaan wrote:
> >
> > Thanks Holger
> >
> > I used the source distribution and it worked.  Why is this not
> part of the
> > binary distribution?
>
>
> Because it is source  :-)
>
> --
> 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 )




RE: [Zope] Zope Components and ZPatterns

2000-07-18 Thread RC Compaan

Thanks Holger

I used the source distribution and it worked.  Why is this not part of the
binary distribution?

Roché

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Holger Hoffmann
> Sent: 17 July 2000 05:43
> To: RC Compaan
> Subject: Re: [Zope] Zope Components and ZPatterns
>
>
> Hi,
>
> RC Compaan wrote:
> >
> > In trying to install ZPatterns on linux the install fails
> during the "make"
> > part of the install, complaining about a non-existant ExtensionClass.h,
> > which should be in the Zope Components directory (also not existent).  I
> [snip]
>
> i think you need the source distribution of zope. There the
> file ExtensionClass.h exists in lib/Components/ExtensionClass.
>
> ... Holger
>


___
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 Components and ZPatterns

2000-07-17 Thread RC Compaan

In trying to install ZPatterns on linux the install fails during the "make"
part of the install, complaining about a non-existant ExtensionClass.h,
which should be in the Zope Components directory (also not existent).  I
noticed on the mailing list that one should do a rebuild if you install from
the source.  I ran the install script that comes with the source but still
no Components directory is created and no ExtensionClass.h is to be found.
Where do I go wrong?

Waiting for ZPattern-magic
Roché


___
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] Sorting a list

2000-07-08 Thread RC Compaan

I have a list:
mylist=[('R',31),('I',80),('A',80),('S',23),('E',35),('C',21)]

I want to rebuild the list sorted from high to low on the sequence-item.

When i call   the list gets
sorted on the sequence-key not the sequence-item.  As I understand the
alphabetical characters are the sequence-keys and the float values are the
sequence-items.

Where do misunderstand?

Roché


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

2000-06-25 Thread RC Compaan

Thanks Pierre

This is a relief, I really didn't want to switch back to pcgi.  I have
worked a little bit with the rewritemodule but if anybody has an example on
how to do this it would really be helpfull.

Roché

> use the rewriterule module, with the [P] flag
> this is very powerfull (a little hard to use, but...) and u can
> do what u want
> with URLs
> (doc on Apache site), and u can use Apache as a proxy server much more
> powerfull (it looks like I like this word ;^) ).
>
> Pierre
>
> > Is there anyway to get around the fact that the remote ip is
> the server's ip
> > if you use Apache's ProxyPass directive to pass requests on to Zope?
> >
> > Roché
> >
> > ___
> > 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] DTMLTemplate in a ZClass

2000-06-24 Thread RC Compaan

I have a DTMLTemplate inside the methods of a ZClass in which I defined
blocks of text.  when I reference the DTMLTemplate from another method of
the ZClass I get a a "not authorised" error although i've set the
DTMLTemplate and the calling method's proxy roles to manager and owner.

Roché


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

2000-06-20 Thread RC Compaan

Is there anyway to get around the fact that the remote ip is the server's ip
if you use Apache's ProxyPass directive to pass requests on to Zope?

Roché



___
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] Expressing expressions

2000-06-19 Thread RC Compaan

Simple addition seems a bit tricky in zope

  

  
   <--// Here i want to
concatenate the category from the value with the word total so that i can
lookup my declared variable in the namespace.
   <--// Here i tried to
increase the declared variable with the value.
 
  

Can someone help?

Roché


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

2000-06-19 Thread RC Compaan

Very clear, thanks.  Really appreciated.

Well i guess the topic was never about propertyids, but i can only tell that
now.  Still working with properties i find the following trouble.

 returns a list of key-value pairs
[('Key1','Value1'},('Key2','Value2')]

to access the values of each key sequentially i tried:

  
  :


But this just returns "k" and "ey" resulting in a slice of the keyname.

Roché

> Thanks Rik it works.
>
> I've noticed in some cases that one puts empty brackets at the end of
> certain zope object methods.  Is that there for methods that can take
> parameters?
>
>
> [rh]Um, not quite, it has to do with the way of calling the object methods
> in question. DTML has two ways of calling: by name and through
> expressions.
>
> 1. The 'normal' Zope way of writing things is  objectValues>. This
> is shorthand for .
>
> 2. The other way is . This is shorthand for
> . Everything inside the expression
> is treated
> as a python expression. If you call it without the brackets, you're just
> referencing the method. If you try that in a DTML Method and look in the
> source of the diplayed document you'll see something like
> . If you want to _call_ the
> method, you'll
> have to add the brackets (with or without arguments).
>
> Hope this is clear.
>
>
>
> Rik
>


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

2000-06-19 Thread RC Compaan

Thanks Rik it works.

I've noticed in some cases that one puts empty brackets at the end of
certain zope object methods.  Is that there for methods that can take
parameters?

Roché

> -Original Message-
> From: Rik Hoekstra [mailto:[EMAIL PROTECTED]]
> Sent: 19 June 2000 12:54
> To: RC Compaan
> Cc: Zope
> Subject: Re: [Zope] PropertyIds
>
>
>
>
> >
> > I have a very simple documentclass in very simple structure in
> method that
> > should return the properties of the document:
> >
> > 
> >   // RESULTS is a ZClass Object Manager
> > // tmp is a
> > document with an id equal to the cookie
> >   
>
> this line should read:
>
> 
>
> Two things going wrong:
>
> 1. the dtml-return tag is for DTML Methods that should just return
> something. You want dtml-var.
> 2. you call propertyIds in an expression (the line is shorthand for
>  - in that case you have to call it
> as a function.
>
> > 
> >
> > During the application i add properties to the document and
> want to display
> > them with the above method.  The Property ids does not get shown though.
> > I've tried:
> >   
> > 
> >   
>
> this should get you a list, like ['title', 'prop1, ...]
>
>
> > and also:
> >   
> > 
> >   
>
> this doesn't work for reasons outlined above.
>
>
> Rik
>


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

2000-06-19 Thread RC Compaan

I have a very simple documentclass in very simple structure in method that
should return the properties of the document:


  // RESULTS is a ZClass Object Manager
// tmp is a
document with an id equal to the cookie
  


During the application i add properties to the document and want to display
them with the above method.  The Property ids does not get shown though.
I've tried:
  

  
and also:
  

  
But no luck.
How can this work?

Roché


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