[Zope-dev] Dataskin with no persistence.

2001-04-12 Thread Godefroid Chapelle

Hi,

I am trying to build a specialist which gives me access to a facade
ZClass in front of a XML file.

As the XML is already stored, I do not want to store the facade ZClass.
Actually, I would like it to be a base on which
the skinscript of the specialist's rack can add attributes.

So I created a ZClass (HumanClass) with no properties inheriting from
ZObject and _ZClass_for_DataSkin.

I create a specialist in which the default rack has the following
properties :

data plug-in : a skinscript computing attributes based on an id and the
xml.

storage :
   Class to use for stored items: HumanClass
   Objects are: loaded by accessing attribute nom  (which is defined in
the skinscript)

Store 'persistent' data: Directly in this object


I store no HumanClass instance and try to get an instance :

specialist.getItem(anId)

I always get None.


Am I trying to do something impossible because of lack of understanding
or am I just wrong in one property of ZClass, Specialist, Rack ?


Thanks a lot


--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 30
1348 Louvain-la-Neuve
Belgium

Tel 010 457490
Mob 0477 363942

TVA 467 093 008
RC Niv 49849



___
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] Database indexing using Z Catalogs

2001-04-12 Thread Honey George

Hello,
I am not able to find a way to index and external
database say PostgreSQL using Z Catalogs and search
the contents. Can anybody help me in this. I couldn't
find a complete documentation in the zope site. It
will be helpfull to me if somebody can explain to me
using an example.

Regards,
   Honey

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.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] Custom dtml tag ... parameters not evaluated

2001-04-12 Thread Romain Slootmaekers

Yo,
I'm trying to create a custom dtml tag, and after the How-to on this
(http://www.zope.org/Members/z113/1) that in itself posed no problem: easy
as pie. The problem I'm having with the tag is that parameters are not
evaluated. for instance (my tag's name is 'aa')

dtml-let y="someValue"
dmlt-aa role="y" ... /dtml-aa 
/dtml-let


gives me in the code:  role=="y" 
while I want it to be "someValue", playing with the quotes
doesn't help either. I think that, in the python code I need to do some
extra call to some routine that do the evaluation/substitution... but I
don't know which.

Anyway, I uncluded a code thingy below, (basically the code  from
the How-to)

Can anyone help me on this ?

TIA,

Sloot.

 code thingy  20 lines ---
from DocumentTemplate.DT_Util import *
from DocumentTemplate.DT_String import String

TAGNAME = 'aa'

class AATag:
name = TAGNAME
blockContinuations = ()
def __init__(self, blocks):
tagname, args, section = blocks[0]
args = parse_params(args,
role="dont-know",
property=None,
id="no-id-given")
self.args, self.section = args, section

def render(self, md):
# some code here...


__call__ = render

String.commands[TAGNAME] = AATag





___
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] Security Management

2001-04-12 Thread Andre Schubert

Hi all,

I have a question on the security system of zope.

First i have a folder called foo in the root with acl_users and a doc
called foo_doc:

root/
bar_doc
foo/
acl_users/
joe
foo_doc

If Anonymous users could'nt view the foo_doc. This means only logged in
users like joe could wie the foo_doc.
Now my question is: When joe is logged in in foo to view the foo_doc,
and after that he view bar_doc he is authenticated as Anonymous in the
bar_doc REQUEST (right??).
But is there a way to find out that the current REQUEST comes from joe
and joe has no user object in the root acl_users.
I played with getSecurityManager, but it doesn't work
Can anybody help please

as


___
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] memory leak

2001-04-12 Thread Marco Nova

 In either case, it seems like you shouldn't be using ParsedXML's
 ExpatBuilder, which is an interface to PyExpat which is made to create
 ParsedXML's DOM objects.  You should be using your own PyExpat
 interface to parse this information from your XML input, without the
 overhead of generating a DOM tree that you're just going to throw
 away.  The interface is documented in the XML-SIG topic area on
 python.org, and our ExpatBuilder should be a good example on how to
 interface with our PyExpat installation - just don't build the DOM if
 you don't use it.
 
 Regardless of what you *should* be doing :), or if I'm misreading you,
 if you aren't keeping references to the DOM objects being created,
 then they should be reclaimed by the GC, and you do seem to have DOM
 objects lying around.  I'd like to see your code, is it short enough
 to post?  Or you can chuck it into the collector or ParsedXML tracker.
 
 For debugging purporses, I'd suggest simplifying by supplying an XML
 string directly, rather than from an external server.

I've replaced ParsedXML's ExpatBuilder with the pyXML package and I used the
sax parser without modifing the code (except for the import), this is the
refcounts results.

Class  April 12, 2001 11:55 am  April 12, 2001 12:00

xml.dom.NodeList.NodeList   2103  3678  +1575  
xml.dom.Text.Text   1263  2208  +945  
xml.dom.NamedNodeMap.NamedNodeMap507   885  +378  
xml.dom.Element.Element  499   871  +372  
xml.dom.Attr.Attr339   591  +252  
xml.dom.DocumentType.DocumentType  710  +3  
xml.dom.Document.Document  710  +3

xml.dom.Document.Document increments by 1 each time an xml is procesed (I
tried to add a del doc at the end but it's ineffective).

So the problem is not ParsedXML but Zope itself or my bad methods.

Regards,

- mn

___
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] Dataskin with no persistence.

2001-04-12 Thread Steve Alexander

Godefroid Chapelle wrote:


 data plug-in : a skinscript computing attributes based on an id and the
 xml.
 
 storage :
Class to use for stored items: HumanClass
Objects are: loaded by accessing attribute nom  (which is defined in
 the skinscript)
 
 Store 'persistent' data: Directly in this object
 
 
 I store no HumanClass instance and try to get an instance :
 
 specialist.getItem(anId)
 
 I always get None.
 
 
 Am I trying to do something impossible because of lack of understanding
 or am I just wrong in one property of ZClass, Specialist, Rack ?


What you're doing sounds about right.

What does your SkinScript look like?

In the ScinScript, you need to determine what data to use based on 
self.id. Here's the SkinScript I use for a similar function; I'm 
creating "virtual" instances of one ZClass, based on instances of a 
different ZClass from another Specialist. In this case, the other 
specialist is "Responses".

WITH Responses.get_data_for_code(code=self.id) COMPUTE
   subject_name,
   rater_name,
   relationship_name,
   response_code,
   process_step


--
Steve Alexander
Software Engineer
Cat-Box limited


___
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] turn off proxying TTW

2001-04-12 Thread Tim McLaughlin

How in the heck do I do this?  (also, does anybody know how to make an owned
object "unowned").  It seems that once I select a proxy role, I can't turn
it off...

TIA,
Tim

___
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] un-own an object

2001-04-12 Thread Tim McLaughlin

Ok, so imagine a DTML method has an owner, and as the docs say the method
can do no more than the authenticated user and the owner's permissions
combined.  So, now delete the owner.

The DTML method will no longer be functional, since the owner does not
exist, and has no permissions.  I found this to be true with ZClass
constructors at least.  I believe that the method should take the
permissions of the authenticated_user only in this scenario, but it does
not.

Any ideas?
___
Tim McLaughlin  BCSwebservices.net
Director, Technical Group   1950 Old Gallows Road
tel:  (703) 790.8081 x111   Suite 201
[EMAIL PROTECTED]  Vienna, VA 22182
www .bcswebservices. 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 )



[Zope-dev] Re: RackImage

2001-04-12 Thread Michael R. Bernstein

Itai Tavor wrote:
 
 Could I get a copy of this product? I'm trying to create a
 Rack-mountable Image class but I'm having a lot of trouble getting a
 class subclassed from Image and DataSkin to work. Having some working
 code could save me some trouble.
 
 I only need the basic RackImage, without all the later stuff you
 added relating to Renderings.

Itai,

I am attaching a tar file that needs to be untarred in the
Products directory.

RackImage is a little rough around the edges, and still has
some cruft left over from Photo.

It is dependent on PIL, which may be unneccessary at this
point.

Please send me any modifications you make. (this will be
released GPL).

Michael.
 rackimage.tar.gz


RE: [Zope-dev] ActiveState / DC Collaboration

2001-04-12 Thread Brian Lloyd

  Someone with enough knowledge about how Python windows
  installs work and a rudimentary knowledge of WISE should 
  be able to work it out so that the win32 distribution is 
  willing to let you pick which Python to use if it sniffs 
  one (or more) out on the target system. 
 
 What about compiling all the extension modules for the right 
 version of python?

Realistically, we would have to require a certain version of 
Python be installed in order to use an existing installation. 

I think the real goal is to make it easier to use your own 
(correct version) Python install rather than to work 
magically with any Python that happens to be around. We 
should also make it easier for win32 to compile the 
extensions if they want to do something fancier than 
our installer supports.



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 )



RE: [Zope-dev] Using Python script to create ZClass instances

2001-04-12 Thread Bjorn Stabell

After hours of fiddling around, I've already given up Python methods,
but I can't even instantiate MySubZclass via External Methods?!?!?

MyProduct . MyZClass . MySubZClass


1. folder.manage_addProduct['MyProduct'].MyZClass.MySubZClass_add(id)
- AttributeError for MySubZClass_add

2.
folder.manage_addProduct['MyProduct'].propertysheets.methods['MySubZClas
s_add'](id)
- NameError on MySubZClass (at least it gets to the constructor
method)

I really think one of the major pains of Zope is just instantiating
objects...  It's HELL hard, and NOT intuitive.

-Original Message-
From: Bjorn Stabell 
Posted At: Thursday, April 12, 2001 12:02
Posted To: Zope Developer
Conversation: [Zope-dev] How do I call an HTMLFile in context provided
by apath?
Subject: [Zope-dev] Using Python script to create ZClass instances


Hi there,

Im having problems using Python script to create a ZClass instance from
a ZClass that's inside of another ZClass.  I have this addMyObject
Python script as constructor script for "Scriptable Type Information"
type object (CMF):

## Script (Python) "addMyObject"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=folder, id
##title=
##

folder.Control_Panel.Products.MyProducts.MyObjects.MyObject_add(id)

# folder.manage_addProduct('MyProduct')... doesn't work either

item = getattr(folder, id)

return item

MyObjects is a ZClass that contains MyObject.  The error I get is:

Zope error
Error type AttributeError 
Error value MyObjects

There should be some explanation somewhere how to access resources
inside of Control_Panel, but I fail to find it.  Creating objects is
very confusing and difficult at times...

Bye,
-- 
Bjorn Stabell [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 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] Virtual DataSkins

2001-04-12 Thread Michael R. Bernstein

Steve Alexander wrote:
 
 In the ScinScript, you need to determine what data to use based on
 self.id. Here's the SkinScript I use for a similar function; I'm
 creating "virtual" instances of one ZClass, based on instances of a
 different ZClass from another Specialist. In this case, the other
 specialist is "Responses".
 
 WITH Responses.get_data_for_code(code=self.id) COMPUTE
subject_name,
rater_name,
relationship_name,
response_code,
process_step

Steve,

Is it possible to have a Specialist that is entirely
'virtual'? Can a Specialist be set up to use a generic
DataSkin that stores attributes persistently, without having
to define a ZClass at all?

If so, can you describe a procedure for accomplishing this?

TIA,

Michael Bernstein

___
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] ZCatalog waaaagh!

2001-04-12 Thread Chris Withers

Hi Chris (and anyone else who can help),

Hopefully you may be able to save my sanity. Querying a ZCatalog(2.3.1, running
update thing made no difference), I'm getting the following error:

type:  exceptions.TypeError
value:  len() of unsized object

sr = self.searchResults(kw)
  File "E:\Zope\2379A4~1.1\lib\python\Products\ZCatalog\ZCatalog.py", line 535,
in searchResults
(REQUEST,used, query_map), kw)
  File "E:\Zope\2379A4~1.1\lib\python\Products\ZCatalog\Catalog.py", line 651, i
n searchResults
used=self._indexedSearch(kw, sort_index, r.append, used)
  File "E:\Zope\2379A4~1.1\lib\python\Products\ZCatalog\Catalog.py", line 558, i
n _indexedSearch
append((k,LazyMap(self.__getitem__, intset)))
  File "E:\Zope\2.3.1\lib\python\Products\ZCatalog\Lazy.py", line 205, in __init
__
self._len = len(seq)

I inserted a print `seq` before that line, and the situations where it barfs,
seq is either 461695167 or 0, rather than the list it should be.

Has anyone else seen this? Anyone got a cleu what's going on or how I can find
out what's going on?

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] getattr'ing proxy object's methods

2001-04-12 Thread Kent Polk

I have a product with a proxy class for building objects which
manage data for other objects. The proxy clients locate their proxy
via meta_type, similar to a sql connection_id and use acquisition
to establish parameters for each call.  I want to pass method calls
made to the clients directly to the proxy, but in the context of
the client.

Right now, my clients have a method:

def Proxy(self):
"""Return the proxy associated with this object"""
return getattr(self, self.proxy_id)

which is used in conjunction with dtml-with to establish the
context:

dtml-with Proxy
dtml-in "getTable(project=Project, [...])"

This works fine, however, I would like for the clients to automatically
pass method calls that they don't have on to the proxy. __setattr__
is not called for the proxy clients because the final URL component
specifies an acquired folder method, not the proxy client. I tried
__bobo_traverse__, but again, the final URL component is passed as
the argument instead of the method, so it's not clear exactly how
__bobo_traverse__ could make sense out of what needs to be done,
much less know what method was to have been called.

Is there a proper way to call a proxy object's method in this
context, directly in the product class, without using dtml-with?

Thanks!


___
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] Custom dtml tag ... parameters not evaluated

2001-04-12 Thread Randall F. Kern

Try adding something like this in your render method (haven't tried
this, but from a poking around the code in the DocumentTemplate
directory in the past this seems about right):

import VSEval
expr = VSEval.Eval(variable_you_want_to_evaluate)
value = expr.eval(md)

-Randy

 -Original Message-
 From: Romain Slootmaekers [mailto:[EMAIL PROTECTED]]
 
 I'm trying to create a custom dtml tag, and after the How-to on this
 (http://www.zope.org/Members/z113/1) that in itself posed no 
 problem: easy
 as pie. The problem I'm having with the tag is that parameters are not
 evaluated. for instance (my tag's name is 'aa')

___
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] Database indexing using Z Catalogs

2001-04-12 Thread Loren Stafford

http://www.zope.org/Members/rbickers/cataloganything

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
 Of Honey George
 Sent: Thursday, April 12, 2001 00:46
 To: [EMAIL PROTECTED]
 Subject: [Zope-dev] Database indexing using Z Catalogs
 
 
 Hello,
   I am not able to find a way to index and external
 database say PostgreSQL using Z Catalogs and search
 the contents. Can anybody help me in this. I couldn't
 find a complete documentation in the zope site. It
 will be helpfull to me if somebody can explain to me
 using an example.
 
 Regards,
Honey
 
 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail. 
 http://personal.mail.yahoo.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 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] ZCatalog waaaagh!

2001-04-12 Thread Chris McDonough

What's the query?

- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: "Chris McDonough" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 12, 2001 12:13 PM
Subject: [Zope-dev] ZCatalog wgh!


 Hi Chris (and anyone else who can help),

 Hopefully you may be able to save my sanity. Querying a ZCatalog(2.3.1,
running
 update thing made no difference), I'm getting the following error:

 type:  exceptions.TypeError
 value:  len() of unsized object




___
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] More errors :(

2001-04-12 Thread Andy McKay

Sigh perhaps I should stop monitoring the error log. This is just a log of
time, error type, error value. ... anyway I get a lot of errors like this:

Tue Apr 10 12:32:46 2001: [NotFound] [img GET]

Why is this different from a more standard error msg:

Tue Apr 10 12:32:46 2001: [NotFound] [/foo]

Which is actually the url. Anyone know where this slightly different error
message occurs so I can do some hunting?

Still working on finding the point where the SQL memory leak occurs Chris...

Cheers.
--
  Andy McKay.




___
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] un-own an object

2001-04-12 Thread R. David Murray

On Thu, 12 Apr 2001, Tim McLaughlin wrote:
 Ok, so imagine a DTML method has an owner, and as the docs say the method
 can do no more than the authenticated user and the owner's permissions
 combined.  So, now delete the owner.

No, it is the *intersection* of the two ownership sets, not the union
("combined").

 The DTML method will no longer be functional, since the owner does not
 exist, and has no permissions.  I found this to be true with ZClass

Not quite.  It will execute as if it were owned by nobody (the anonymous
user).  So it has very minimal privileges.

 constructors at least.  I believe that the method should take the
 permissions of the authenticated_user only in this scenario, but it does
 not.

Like I said (and the docs say), it is the interesection of the two
sets of privileges, so it is effectively just the permissions of
user nobody.

--RDM


___
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] **Important Notice** for Zope public CVS users

2001-04-12 Thread Brian Lloyd


Hello all - 

[I'm intentionally cross-posting this because there are a number 
 of folks using CVS that may read only one or the other]

If you've looked at the dev.zope.org site lately, you have 
probably noticed a preliminary Zope 2.4 plan:

http://dev.zope.org/Resources/zope_240_plan.html

The major goal of Zope 2.4 will be to make Python 2.1 the 
officially supported (and required) Zope platform. A 
project dedicated to assessing what that involves has 
been started at:

http://dev.zope.org/Wikis/DevSite/Projects/SupportPython21/FrontPage

Enough progress has been made on identifying tasks that we 
want to start getting some things done. However, this will 
have an effect on those of you that are currently running 
from the Zope CVS.

We are soon going to begin checking in changes to the head of 
the Zope CVS that will require the use of Python 2.1. Once we 
start on the 2.4 tasks, you will not be able to use a public 
CVS checkout of Zope with older Pythons.

We are not going to start this until after Python 2.1 final 
is out (expected next monday), but wanted to give CVS'ers 
fair warning. If you are using the current public CVS and 
don't want to start using Python 2.1, you should either 
avoid doing any CVS updates until you're ready to migrate 
or move off of CVS to a current (2.3.1) release.


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 )



Re: [Zope-dev] Dataskin with no persistence.

2001-04-12 Thread Godefroid Chapelle



Steve Alexander a crit :

 Godefroid Chapelle wrote:

 
  data plug-in : a skinscript computing attributes based on an id and the
  xml.
 

I just want to stress that I deleted every prebuilt other data plugins...

My ZClass has only an empty dataskin property sheet.


  storage :
 Class to use for stored items: HumanClass
 Objects are: loaded by accessing attribute nom  (which is defined in
  the skinscript)
 

I have changed the load attribute to id.

This helps a little : with dtml-var "getItem(REQUEST.id)" in the
specialist, I get a HumanClass Instance at xxx in the HTML code.

But when trying to access any attribute of the instance I get an
authorization error.

I remembered having seen somewhere to put a proxy role on the skinscript so I
tried.

With manager, I keep the same authorization error...

With owner or anonymous, I get a NameError on the first name mentioned in the
skinscript...


  Store 'persistent' data: Directly in this object
 
 
  I store no HumanClass instance and try to get an instance :
 
  specialist.getItem(anId)
 
  I always get None.
 
 
  Am I trying to do something impossible because of lack of understanding
  or am I just wrong in one property of ZClass, Specialist, Rack ?

 What you're doing sounds about right.

 What does your SkinScript look like?

 In the ScinScript, you need to determine what data to use based on
 self.id. Here's the SkinScript I use for a similar function; I'm
 creating "virtual" instances of one ZClass, based on instances of a
 different ZClass from another Specialist. In this case, the other
 specialist is "Responses".

 WITH Responses.get_data_for_code(code=self.id) COMPUTE
subject_name,
rater_name,
relationship_name,
response_code,
process_step

 --
 Steve Alexander
 Software Engineer
 Cat-Box limited

BTW Has there been a patch for an error I get when using copy or cut buttons
in ZPatterns containers :

Zope Error

   Zope has encountered an error while publishing this resource.

   Error Type: KeyError
   Error Value: manage_tabs


--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 30
1348 Louvain-la-Neuve
Belgium

Tel 010 457490
Mob 0477 363942

TVA 467 093 008
RC Niv 49849



___
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] Custom dtml tag ... parameters not evaluated

2001-04-12 Thread Dieter Maurer

Romain Slootmaekers writes:
  I'm trying to create a custom dtml tag
  ... evaluating attribute valued ...
Look at the attribute "branches_expr" in
"TreeDisplay.TreeTag" as an example...


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] Security Management

2001-04-12 Thread Dieter Maurer

Andre Schubert writes:
  ... direct access to authentication credentials ...
You cannot ask Zope about the user identity because
it does not visit the authenticating user folder
in the described case.

If you use basic authentication (the Zope default), then
you can read "REQUEST._auth" to get the AUTHENTICATION
header content which in turn tells you the user (after
base64 decoding). The leading "_" tells you that there
is no way to access it from DTML or Python Script.
You will need an external method.

If you use cookie authentication, you can look at the cookie.
It may show the username in a readable form.


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] How do I call an HTMLFile in context provided by a path?

2001-04-12 Thread Dieter Maurer

Itai Tavor writes:
  P.S Now that aq_parent is working... why can't I do absolute_url() on 
  DTMLFiles :-(
"absolute_url" is provided by the class "OFS.Traverable".
Apparently, "DTMLFile" is not derived from it.


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] **Important Notice** for Zope public CVS users

2001-04-12 Thread ender

On Thursday 12 April 2001 12:46, Brian Lloyd wrote:

We are soon going to begin checking in changes to the head of
the Zope CVS that will require the use of Python 2.1. Once we
start on the 2.4 tasks, you will not be able to use a public
CVS checkout of Zope with older Pythons.

We are not going to start this until after Python 2.1 final
is out (expected next monday), but wanted to give CVS'ers
fair warning. If you are using the current public CVS and
don't want to start using Python 2.1, you should either
avoid doing any CVS updates until you're ready to migrate
or move off of CVS to a current (2.3.1) release.

will there be a 2.3 maintenance branch or will all development stop on 2.3?

curious,

kapil

___
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] Two new proposals: InstallationAndConfiguration and PrefixedTagVariables

2001-04-12 Thread Evan Simpson

http://dev.zope.org/Wikis/DevSite/Proposals/InstallationAndConfiguration
outlines a new process for installing and configuring Zope.

http://dev.zope.org/Wikis/DevSite/Proposals/PrefixedTagVariables describes a
variant of Tino's fix for sequence-item variables.

Cheers,

Evan @ digicool


___
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] ZCatalog waaaagh!

2001-04-12 Thread Chris McDonough

Ugh.  I know why this is.  Ugh. Ugh Ugh.

Give me an hour.


- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: "Chris McDonough" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 12, 2001 12:13 PM
Subject: [Zope-dev] ZCatalog wgh!


 Hi Chris (and anyone else who can help),

 Hopefully you may be able to save my sanity. Querying a ZCatalog(2.3.1,
running
 update thing made no difference), I'm getting the following error:

 type:  exceptions.TypeError
 value:  len() of unsized object

 sr = self.searchResults(kw)
   File "E:\Zope\2379A4~1.1\lib\python\Products\ZCatalog\ZCatalog.py", line
535,
 in searchResults
 (REQUEST,used, query_map), kw)
   File "E:\Zope\2379A4~1.1\lib\python\Products\ZCatalog\Catalog.py", line
651, i
 n searchResults
 used=self._indexedSearch(kw, sort_index, r.append, used)
   File "E:\Zope\2379A4~1.1\lib\python\Products\ZCatalog\Catalog.py", line
558, i
 n _indexedSearch
 append((k,LazyMap(self.__getitem__, intset)))
   File "E:\Zope\2.3.1\lib\python\Products\ZCatalog\Lazy.py", line 205, in
__init
 __
 self._len = len(seq)

 I inserted a print `seq` before that line, and the situations where it
barfs,
 seq is either 461695167 or 0, rather than the list it should be.

 Has anyone else seen this? Anyone got a cleu what's going on or how I can
find
 out what's going on?

 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 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] New Proposal: ExtendedDTMLSorting

2001-04-12 Thread Andreas Jung

http://dev.zope.org/Wikis/DevSite/Proposals/ExtendedDTMLSorting

Cheers,
Andreas


___
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] How do I call an HTMLFile in context provided by apath?

2001-04-12 Thread Itai Tavor

Dieter Maurer wrote:

Itai Tavor writes:
   P.S Now that aq_parent is working... why can't I do absolute_url() on
   DTMLFiles :-(
"absolute_url" is provided by the class "OFS.Traverable".
Apparently, "DTMLFile" is not derived from it.


Dieter

Well, obviously... the question is why nobody saw the need to add 
Traversable to DTMLFiles...
-- 
--
Itai Tavor  -- "Je sautille, donc je suis."--
[EMAIL PROTECTED]--   - Kermit the Frog --
-- --
-- "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 )



RE: [Zope-dev] **Important Notice** for Zope public CVS users

2001-04-12 Thread Brian Lloyd

 We are soon going to begin checking in changes to the head of
 the Zope CVS that will require the use of Python 2.1. Once we
 start on the 2.4 tasks, you will not be able to use a public
 CVS checkout of Zope with older Pythons.
 
 We are not going to start this until after Python 2.1 final
 is out (expected next monday), but wanted to give CVS'ers
 fair warning. If you are using the current public CVS and
 don't want to start using Python 2.1, you should either
 avoid doing any CVS updates until you're ready to migrate
 or move off of CVS to a current (2.3.1) release.
 
 will there be a 2.3 maintenance branch or will all development 
 stop on 2.3?

Sorry, I should have been more clear.

There is (and will continue to be) a "current release branch", 
which is the branch that stable (bug-fix) releases are made 
from. Currently the release branch name is 'zope-2_3-branch'.

This is probably the branch that most CVS users actually want 
to be using anyway. Running from the trunk you get all of the 
latest bugfixes, but you also get all of the latest half-baked 
work for the next feature release - which might be worse than 
the bugs you were trying to avoid in the first place :)

So if you are running from CVS (but are not running from the 
current release branch) you can go into your local copy and 
do: 'cvs up -d -P -r zope-2_3-branch' to update to the release 
branch checkout.

The warning is mostly aimed at the bleeding-edge people who 
use the CVS trunk. If you are running the release branch you 
will continue to get bug fixes and will not need to upgrade to 
Python 2.1, as the changes in preparation for 2.1 will only 
go into the trunk.


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] Re: RackImage

2001-04-12 Thread Itai Tavor

Michael R. Bernstein wrote:

Itai Tavor wrote:

  Could I get a copy of this product? I'm trying to create a
  Rack-mountable Image class but I'm having a lot of trouble getting a
  class subclassed from Image and DataSkin to work. Having some working
  code could save me some trouble.

  I only need the basic RackImage, without all the later stuff you
  added relating to Renderings.

Itai,

I am attaching a tar file that needs to be untarred in the
Products directory.

RackImage is a little rough around the edges, and still has
some cruft left over from Photo.

It is dependent on PIL, which may be unneccessary at this
point.

Please send me any modifications you make. (this will be
released GPL).

Michael.

Thanks, Michael! Turns out I just had to make a few small changes in 
my product to get it to work, which I discovered looking at yours.

Don't know if anything in my product that it would be interesting to 
add to yours... it's aimed at storing photos for a product catalog, 
most of what it adds to Image is methods for creating a photo based 
on another photo, used for creating a thumbnail.

Itai
-- 
--
Itai Tavor  -- "Je sautille, donc je suis."--
[EMAIL PROTECTED]--   - Kermit the Frog --
-- --
-- "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 )