Re: [Zope-dev] Feedback requested on SkinnableAndLocalizableObjects

2000-08-08 Thread Toby Dickenson

On Tue, 8 Aug 2000 20:46:59 +0200, Martijn Pieters <[EMAIL PROTECTED]>
wrote:

>A few days ago, I requested for some feedback on the
>SkinnableAndLocalizableObjects project, and got exactly none! I cannot believe
>that I put down a flawless design here that nobody has anything to add to. A
>few days more, and the implementation I'll have will be much harder to fit
>your ideas.

This is the pain of Wikis. Overlook one tiny email and you never know
its there :-(



Toby Dickenson
[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 )




Re: [Zope-dev] Weird Data.fs corruption...

2000-08-08 Thread Martijn Pieters

On Wed, Aug 09, 2000 at 05:52:10AM +, Carl Robitaille wrote:
>   How can this happen? Any idea? My only "guess" is that it has to do
> with the Data.fs file being used by ZServer over an NFS partition on
> Linux. This is only a guess, but I really can't see any other thing I
> could have done wrong.

Ai, NFS! There is a known no-no about using NFS for Data.fs storage, it leads
to data corruptions. Zope and NFS do not mix.

-- 
Martijn Pieters
| Software Engineermailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
-

___
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] Weird Data.fs corruption...

2000-08-08 Thread Carl Robitaille

Hi everybody,

I looked around the Zope site and mailing lists, but I wasn't able to
find an answer to my problem. I'm using the CVS version of Zope2. I did
an update yesterday. Since then, there's been some commits.

I just started my web site project using Zope running with ZServer,
when I began to have problems doing Cut-Paste operations. I thought at
first that I messed the permissions or something because of my lack of
experience with Zope. Little did I know at that moment that my Data.fs
was corrupted very badly. So I tried to restart Zope, but it refused
giving me this backtrace:

[zope@petechie ~/Zope2]$ ./start
Traceback (innermost last):
  File "/home/zope/Zope2/z2.py", line 554, in ?
exec "import "+MODULE in {}
  File "", line 1, in ?
  File "/home/zope/Zope2/lib/python/Zope/__init__.py", line 110, in ?
DB=ZODB.FileStorage.FileStorage(Globals.BobobaseName)
  File "/home/zope/Zope2/lib/python/ZODB/FileStorage.py", line 303, in
__init__
self._pos, self._oid, tid = read_index(
  File "/home/zope/Zope2/lib/python/ZODB/FileStorage.py", line 1515, in
read_index
if read(4) != packed_version: raise FileStorageFormatError, name
ZODB.FileStorage.FileStorageFormatError:
/home/zope/Zope2/var/Data.fs   

I then logged to Zope web site to get information on how to get my
Data.fs fixed. I read the
http://www.zope.org/Members/itamar/CorruptedZODB document and downloaded
the tranalyzer.py python program. I then understood what the backtrace
already told me. The first 4 bytes of any ZODB files should be something
like "FS21". Instead, I have garbage in my Data.fs:

[zope@petechie var]$ python tranalyzer.py Data.fs | more
Traceback (innermost last):
error: Not a .fs file (at least, not a kind I know about)
magic = 
6TÆ

Just for the record, Data.fs.in is read easily by tranalyzer.py.

How can this happen? Any idea? My only "guess" is that it has to do
with the Data.fs file being used by ZServer over an NFS partition on
Linux. This is only a guess, but I really can't see any other thing I
could have done wrong.

This doesn't really bug me for the moment as I only had a couple of
hours put in my site, but I would like to prevent it from happening
again yes I do backups, but only once a day ;-)

Thanks for your help/comments.

Carl

Carl Robitaille
[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] remote procedure calls to manage functions

2000-08-08 Thread andrew


Have been delving into ZPublisher.Client to make remote procedure calls
under Zope 2.2.1. Many of the manage_... functions work just fine
through this interface (once the obvious bug on line 212 of Client.py is
fixed, anyway ;-). Check out the example utilities/load_site.py if you
want to get started in this very productive use of Zope.

However, manage_addZSQLMethod refuses to work, always returning a 404
not found error. Don't have time at the moment to find out why, but I
wondered if there was a simple reason for it (nothing seems simple at
3am does it)? In the meantime, calling it via an external method to act
as glue is working fine.



___
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] RE: [Zope] ZPatterns Question

2000-08-08 Thread Peter Toneby

Hi guys,
I'm trying to make a simple guestbook using ZClasses and ZPatterns, I
suppose this is somewhat overkill, and would be alot easier to do using
SQL, but it's for the sake of knowledge (as is everything I do). So I
read the IRC-log and  asked a question regarding storing a
ZClass in a  Specialist/Rack, and I suppose that is what I should do
too. Also note that I have not done anything with ZClasses or ZPatterns
and take this as an oppotunity to learn booth ;). So I have done the
following:

I created a product and put 2 ZClasses in it, Guestbook and
Guestbook_entry. Guestbook_entry was created with Dataskin as baseclass
and holds a propertysheet called entry_data.

Guestbook has 2 methods that handles the adding of entries, one is
the form, the other is the actual dataadder (the forms action) and it's
called entry_addProcessor.

I then added a specialist to Guestbook, and told it to store
Guestbook_entrys, it's called entry_storage.

entry_addProcessor contains the following code:


  
Code is supposed to go here... I just have to figure out how to add
the data sent to newobj...
  


But when I try to run this I get "Unauthorized" for newItem, and I don't
know what settings to set for anonymous to be able to use it, since I
can't seem to get it to work even with my user that has created
everything.

Now, am I correct to put the properties in the ZClass, or should they go
into a PersistentSheet or a PersitentSheetProvider plugin? And if I
should put it into PersistenSheets should I change anything in the
Sheet_Names and Sheet_Namespaces boxes or just att my properties?

And what about the Unauthorized error, should I change something in the
define permissions tab?

Now, if I could get this little question answered in english (not
ZPatternish), I would be very happy, and if you get me to grasp these
things I think quite a few others will grasp it too, and you will get
less requests for basic dokumentation, and everyone will be happy and
live long and prosper forever after.

/Peter Toneby, who really should go to bed now.
-- 
Alpha Test Version:  Too buggy to be released to the paying public. 
Beta Test Version:  Still too buggy to be released. 
Release Version:  Alternate pronunciation of "Beta Test Version". 

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

2000-08-08 Thread Phillip J. Eby

At 06:07 PM 8/8/00 +0100, Steve Alexander wrote:
>"Phillip J. Eby" wrote:
>> 
>> Actually, neither relates.  Property sheets created on ZClasses always have
>> their data stored in attributes of the object itself, so if you want to
>> control those property sheets you would not use a sheet provider at all.
>
>> Sheet providers are only used to provide property sheets whose data is
>> stored external to the object.
>
>I'm confused here. Please excuse me if these questions seem silly.
>
>
>What does "Property sheets created on ZClasses" mean, exactly?

I mean, if you go into the management screens for a ZClass, and add a
property sheet to the *class*, the sheet's definition is stored in the
class, and its contents are stored as attributes on the instances.  Sheet
providers have no effect on such property sheets, as they are defined in
the class.  However, if you use a "DataSkin Property Sheet", the attributes
of the sheet are stored in the instance in a way that is compatible with
attribute providers.  Thus, you can use attribute providers to provide the
content of the sheet.  But you cannot provide the sheet object itself.
This may seem a subtle distinction, but it is an important one for some
applications.  Sheet providers are primarily intended to add sheets outside
the scope of the class of object being used.


>If I use some DataSkin-derived ZClass instances inside a Customizer
>folder, and if I want to store the data in the ZODB, do the
>propertysheets for one of these ZClass instances come from
>PersistentAttributeProviders or PersistentSheetProviders?

If you create the sheets *in* the ZClass itself, then the *data* for the
sheets comes from an AttributeProvider (actually, it's just stored in the
instance, but the storage is controlled by an AttributeProvider).  The
sheet *itself* would come from the class.

If you create the sheet with
object.propertysheets.manage_addPropertySheet(), then the sheet will be
created and managed by a SheetProvider.


>What is the difference between a Common Instance Propertysheet and a
>Dataskin Attribute Propertysheet when added to a Dataskin-derived
>ZClass?

The difference is that a Common Instance property sheet stores default
values in the class under the original attribute name, which makes
__getattr__ unusable on the instances.  A DataSkin property sheet stores
default values in the class under the name "class_default_for_X" where "X"
is the attribute name.  This lets the DataSkin instances give an
AttributeProvider a chance to supply the value of an attribute before
falling back to a class-level default.


>Is the following true, part true, false, or irrelevant?
>
>If I want to add a propertysheet that contains information from an SQL
>database query to a ZClass-dataskin instance, I have to :
>
>* Declare in my Product that the ZClass has that propertysheet (unless I
>do clever stuff with triggers to add the sheet if it isn't there
>already)
>
>* Use a custom SQL SheetProvider? Or an AttributeProvider? Or some
>skinscript that calls various methods in my specialist?

You can do any of the above.  Currently, the easiest way to do it would
probably be to add the sheet to the class, and then use attribute providers
to supply the data.  If you needed to add this atop a class which needed to
be "final" (in the Java sense, i.e. no modifications allowed), then the
best route would be a custom SQL sheet provider.


___
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] Acquisition Confusion :S

2000-08-08 Thread Evan Simpson

From: Chris Withers <[EMAIL PROTECTED]>
> Who would be best to ask why it was set up the way it is?
>
> I'm sure there are very good reasons for it but the search order in all
> but the simple cases is very confusing and not as useful as it could be.
>
> How much more work would it be to implement the following algorithm,
> regardless of how the actual containment is?
[snip]

I haven't got the whole reason, but here are some of the pieces:

- never expose a "bare" object, or even one with an incomplete context
- allow the user to backtrack along the context chain

These two together give you the part about aq_parent always being the
previous acquisition result.

- allow recovery of containment information
- base security on containment

These two motivate the simplification of raw acquisition.  With the
simplification, you get containment-first search and aq_inner.aq_parent
gives you your fully-wrapped container.

The current acquisition implementation is thus a weird hybrid of containment
and context.  It retains both sorts of information while providing the
search semantics we want security to have.

It isn't hard to convert a standard acquisition wrapper into either of the
other sort.  I'm going to propose adding something like the following
functions:

def aq_context(ob):
context = []
while ob is not None:
context.append(ob.aq_base)
ob = ob.aq_parent
ob = context.pop()
while context:
ob = context.pop().__of__(ob)
return ob

def aq_containment(ob):
context = []
while ob is not None:
context.append(ob.aq_base)
ob = ob.aq_inner.aq_parent
ob = context.pop()
while context:
ob = context.pop().__of__(ob)
return ob

... so that you could write something like  or &dtml-bar;.  In the meantime, they make fine External
Methods.

Cheers,

Evan @ digicool & 4-am


___
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] DB Connection Question

2000-08-08 Thread Dieter Maurer

Andre Schubert writes:
 > I have written a Product 
 > and now i want
 > to use a Zope DatabaseConnection added to the same folder.
Unless you are in a constructor, your product's "self"
has an acquisition context.
It usually contains the folder containing your product instance.
Therefore, if "DC" is the name of your database connection,
you can access it by "self.DC" or "getattr(self,'DC')".


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 )




[Zope-dev] Feedback requested on SkinnableAndLocalizableObjects

2000-08-08 Thread Martijn Pieters

A few days ago, I requested for some feedback on the
SkinnableAndLocalizableObjects project, and got exactly none! I cannot believe
that I put down a flawless design here that nobody has anything to add to. A
few days more, and the implementation I'll have will be much harder to fit
your ideas.

To summarise, when this project is done, all of Zope's management interface
will support full language switching (like zzLocale, but built in), and on top
of that, it will be very, very easy to create new and radically different
versions of the interface and tie different versions (called Skins) to
different browsers.

  http://dev.zope.org/Wikis/DevSite/Projects/SkinnableAndLocalizableObjects

-- 
Martijn Pieters
| Software Engineermailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
-

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

2000-08-08 Thread Steve Alexander

"Phillip J. Eby" wrote:
> 
> Actually, neither relates.  Property sheets created on ZClasses always have
> their data stored in attributes of the object itself, so if you want to
> control those property sheets you would not use a sheet provider at all.

> Sheet providers are only used to provide property sheets whose data is
> stored external to the object.

I'm confused here. Please excuse me if these questions seem silly.


What does "Property sheets created on ZClasses" mean, exactly?


If I use some DataSkin-derived ZClass instances inside a Customizer
folder, and if I want to store the data in the ZODB, do the
propertysheets for one of these ZClass instances come from
PersistentAttributeProviders or PersistentSheetProviders?


What is the difference between a Common Instance Propertysheet and a
Dataskin Attribute Propertysheet when added to a Dataskin-derived
ZClass?


Is the following true, part true, false, or irrelevant?

If I want to add a propertysheet that contains information from an SQL
database query to a ZClass-dataskin instance, I have to :

* Declare in my Product that the ZClass has that propertysheet (unless I
do clever stuff with triggers to add the sheet if it isn't there
already)

* Use a custom SQL SheetProvider? Or an AttributeProvider? Or some
skinscript that calls various methods in my specialist?


Thanks.

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




[Zope-dev] Bug in DT_In.py, still using collector? Here's a patch

2000-08-08 Thread Brad Clements

In Zope 2.2.0 

If you have a bug in your DTML in a  block, you don't 
see the bug. DT_In assumes that you just don't have more records to 
see.

DT_In.py, around line 545

This code:

elif next:
try:
# The following line is a sneaky way to test whether
# there are more items, without actually
# computing a length:
sequence[end]
pstart,pend,psize=opt(end+1-overlap,0,
  sz,orphan,sequence)
kw['next-sequence']=1
kw['next-sequence-start-index']=pstart-1
kw['next-sequence-end-index']=pend-1
kw['next-sequence-size']=pend+1-pstart
result=render(section,md)
except:
if self.elses: result=render(self.elses, md)
else: result=''

SHOULD BE:

elif next:
try:
# The following line is a sneaky way to test whether
# there are more items, without actually
# computing a length:
sequence[end]
pstart,pend,psize=opt(end+1-overlap,0,
  sz,orphan,sequence)
kw['next-sequence']=1
kw['next-sequence-start-index']=pstart-1
kw['next-sequence-end-index']=pend-1
kw['next-sequence-size']=pend+1-pstart
except:
if self.elses: result=render(self.elses, md)
else: result=''
else:
result=render(section,md)


Brad Clements,[EMAIL PROTECTED]   (315)268-1000
http://www.murkworks.com  (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com   AOL-IM: BKClements

___
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] RE: [Zope] ZPatterns Question

2000-08-08 Thread Phillip J. Eby

At 01:57 PM 8/8/00 +0200, RC Compaan wrote:
>I've added a propertysheet called "properties" to my ZClass and i notice
>there is Persistent Sheetprovider under the default rack already.  The
>Sheetprovider has properties Sheet_Names and Sheet_Namespaces.  I guess
>Sheet_Names should refer to the sheetname i created for my ZClass??? but how
>do Sheet_Namespaces come into play.

Actually, neither relates.  Property sheets created on ZClasses always have
their data stored in attributes of the object itself, so if you want to
control those property sheets you would not use a sheet provider at all.
Sheet providers are only used to provide property sheets whose data is
stored external to the object.

The "name" refers to sheet names, yes, although again these are not ones
created on the ZClass, which will be handled by the ZClass.  The
"namespaces" refers to the XML namespaces of the property sheets, which is
a WebDAV thing.  In the WebDAV protocol, "property sets" are added/changed
using URLs as XML namespaces.  So you could have a property sheet whose XML
namespace is "http://www.zope.org/PTK/MemberProperties" and whose name is
just "MemberProperties" or "MemberInfo" or something else altogether.
ZPatterns supports WebDAV, and WebDAV requires the ability to add arbitrary
property sets with arbitrary properties to an object.  Also, the XML
namespaces concept can be useful as a way of avoiding name collisions
between frameworks.


>>From the IRC_Chatlog:
>"Call "getItem(key)" to retrieve an item from the Specialist, and
>"newItem(key)" to create a new item in the specialist."
>
>Does this imply that I can simply call "newItem(key)" from a dtml-method
>inside the specialist to create a new instance of my object?

Yes.



>I think I understand ZPattern architecture somewhat but get lost on the
>implementation side, particularly at that place where  attributes are
>retrieved from storage or more clearly how a specialist(datamanager) links
>up/communicates with a sheetprovider (data-plugin) and how the sheetprovider
>in turn communicates with the rack and how the rack retrieves from storage
>(dataskin).
>
>A very simple outline like this would help me a lot, eg:
>Specialist to Sheetprovider (handled in IDE - add a SheetProvider under
>Plugins)
>Sheetprovider to rack (handled in IDE - select Storage Class under rack)
>Rack to Dataskin ()
>Dataskin to physical storage ()
>
>Roché
>
>PS: I would be more than willing to document my enlightenment in a howto

The Specialist does not talk to the sheet provider.  The Specialist asks
its racks for an object.  The Rack which "retrieves" the object tells the
object that it belongs to the rack and should ask the rack for anything it
needs.  When the object needs a property sheet or attribute or whatever, it
asks the rack to give it a list of relevant providers for that
attribute/sheet/whatever.  It then walks the list asking those providers if
they can perform the function it desires.  If none of the providers are
successful, it performs a default behavior (such as raising an
AttributeError to indicate the attribute does not exist).  This general
pattern is followed for almost anything that can be delegated from a skin
to a provider.

When DataSkins are used outside a rack, the process is similar, except that
the DataSkin itself notices it is being retrieved from somewhere and has
not been told it belongs to a rack, so it searches its acquisition path
asking for a Customizer.  Once found, it then uses the Customizer in the
same way as it would have used the Rack (i.e. to ask for lists of providers
that might be useful for performing tasks it needs done).


___
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] .zexp Security Concerns

2000-08-08 Thread Shane Hathaway

Chris Withers wrote:
> A few people have recently been asking about the ability to import
> .zexp's into the FreeZope accounts NIP offers.
> 
> This is something we'd like to offer but need to understand the security
> risks first. IIRC, the reason why import is not available straight
> 'through the web' is that there are security implications.
> 
> Could someone run these by me again...

Simple: it's wildly unpredictable what people would be able to do.

With a .zexp it's possible to instantiate any Python class including
system classes.  But it's not possible to include actual code.  So
there would probably be a way to access any readable file from the
filesystem, shut down Zope, rewrite or remove all content from Data.fs,
and maybe even get root by restarting in some strange way, but it would
all have to be done in a *really* clever way.  That's just the kind of
challenge intruders crave.

I don't want to have to deal with that, do you?

Shane

___
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] DB Connection Question

2000-08-08 Thread Andre Schubert

Hi,

I have written a Product the uses a Databaseconnection to MySQL, that
works fine. but the connection in coded into my Product, and now i want
to use a Zope DatabaseConnection added to the same folder.
How does this works, it is very important for me, because we want to
change to another database, and because this fact it is very useful for
me to use an existing DataBaseConnection Object from Zope in my Product
to connect to a DataBase.


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

2000-08-08 Thread RC Compaan

I've added a propertysheet called "properties" to my ZClass and i notice
there is Persistent Sheetprovider under the default rack already.  The
Sheetprovider has properties Sheet_Names and Sheet_Namespaces.  I guess
Sheet_Names should refer to the sheetname i created for my ZClass??? but how
do Sheet_Namespaces come into play.

>From the IRC_Chatlog:
"Call "getItem(key)" to retrieve an item from the Specialist, and
"newItem(key)" to create a new item in the specialist."

Does this imply that I can simply call "newItem(key)" from a dtml-method
inside the specialist to create a new instance of my object?

I think I understand ZPattern architecture somewhat but get lost on the
implementation side, particularly at that place where  attributes are
retrieved from storage or more clearly how a specialist(datamanager) links
up/communicates with a sheetprovider (data-plugin) and how the sheetprovider
in turn communicates with the rack and how the rack retrieves from storage
(dataskin).

A very simple outline like this would help me a lot, eg:
Specialist to Sheetprovider (handled in IDE - add a SheetProvider under
Plugins)
Sheetprovider to rack (handled in IDE - select Storage Class under rack)
Rack to Dataskin ()
Dataskin to physical storage ()

Roché

PS: I would be more than willing to document my enlightenment in a howto

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Steve Alexander
> Sent: 07 August 2000 06:19
> To: RC Compaan; [EMAIL PROTECTED]
> Subject: Re: [Zope] ZPatterns Question
>
>
> I've moved your question to zope-dev, as that's where ZPatterns
> questions probably belong.
>
> Roche wrote:
> > 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???
>
> The easiest way is to use a couple of SheetProviders. Use a
> PersistentSheetProvider for your ZODB values. You'll have to write your
> own one for SQL values.
>
> You will need to create the appropriate propertysheets in your ZClass
> class definition in your product.
>
> > What should go into the fromexpr and attrsexprs properties of the
> > attributeprovider?  Should one add an attributeprovider for
> each attribute
> > of the product?
>
> See the IRC chat log:
>
  http://www.zope.org/Documentation/Chats/zpatt_chat_log

An attribute provider can provide multiple attributes. You can have
multiple attribute providers if you like.

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




[Zope-dev] .zexp Security Concerns

2000-08-08 Thread Chris Withers

Hi,

A few people have recently been asking about the ability to import
.zexp's into the FreeZope accounts NIP offers.

This is something we'd like to offer but need to understand the security
risks first. IIRC, the reason why import is not available straight
'through the web' is that there are security implications.

Could someone run these by me again...

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 )




Re: [Zope-dev] Acquisition Confusion :S

2000-08-08 Thread Steve Alexander

Michel Pelletier has reminded me that we need a security check by
containment at each point in the search through context.

So, in my example, the search will look like this:

/
|-Aa
| |-B  b
|
|-Xx
| |-P  p1
| |-Y  y
|
|-Pp0

  Context-first
  Acquisition  (P of (B of (A of (Y of (X of /)))

  Security p0 /  b a /  a b  y x /  x /  / 
  Checks

That makes for a lot of security checks.
There are possible optimisations, though. But this starts to get even
more complicated.

--
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-dev] Bug in DateTime.py

2000-08-08 Thread Steve Alexander

Karsten Petersen wrote:
> 
> Hi,
> 
> today I had *very* strange effects with the following code:
> 
>   
>   
>   
> 
> 
> on my system it gave me:
> 2000/08/08
> (2000, 8, 8, 0, 0, 0, 'GMT+2')
> 2000/08/07
> 
> Well - this was not quite what I expected. :)
> 
> I tracked the problem down to the timezone: When no time is given, the
> time is initialized with 00:00. So after applying gmtime in the strftime
> function (DateTime.py line 1379) it got shifted out and - hoppla - we
> have gone one day back in time. :)

Use the patch here:

  http://classic.zope.org:8080/Collector/1457/view

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