[Zope-dev] Mapping groups of users to local roles

2001-02-18 Thread Johan Carlsson

Hi,
I have the need to make a group extension to the
permission system in Zope.
I need to make so kind of folder or acl_extender
that can know about groups of users and map
them to local roles.

As I understand the security system user get their
role mapping through a UserManager (acl_users).
But what I want is to have a central UserManager
(possibly LoginManager or using the PTK member system),
but on a branch level extend the it with user-group-role 
mapping.

Any ideas on how to solve this problem?
Maybe someone already have thought about this?

I anticipate using ZPatterns to do the mapping separating 
the storage from the logic.

Regards,
Johan Carlsson

hf–Xš)x7Š^!X+ƒšŠYšŸb~—zhr,š,+3zw(v)EZeŠl†ib3—j)fjŠb?Š^jyw†ib3—j)fjŠb?Š^


Re: [Zope-dev] Using Zope for Groupware/Messaging applications

2001-02-18 Thread Michael R. Bernstein

"R. David Murray" wrote:
 
 This means you can do things like
 have (my example) a Paradox database of books, authors, and a
 books-to-authors map, and have Author and Book objects in the system
 such that a Book has a list of its Author objects and the Author
 has a list of its Book objects, all in about 20 lines of ZSQL and
 skinscript.  Plus I have a 'long description' field that comes from
 another database table, and thumbnail and full sized images that
 are stored in Image objects in the ZODB.  All this stuff is seemlessly
 assembled into Author and Book objects by, like I said, about
 20 lines of the skinscript and zsql.

How are you entering the data into the system? Specifically,
how are you *normalizing* the Author and book information?

I'm working on a ZPatterns based book cataloging
application, and right now I'm storing 'Book' objects with
the author names as a 'lines' property in the ZClass.

I'd like to change this so 'Author' objects are created and
stored in their own Specialist when a book is added, but I'm
not sure how.

Thanks,

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] LONG int breaks mysqlUserfolder

2001-02-18 Thread francine broekhove

Hi,

i wonder if this is where i should post this message?

Anyway, i've been upgrading my zope from 2.1.6 (python 1.5.2)  to zope 2.3.0src (with 
Python 2.0). I changed my Mysqlda to the latest version (in which a long definition 
has replaced the previous int). 

I breaks any application that uses indexes (int) in a mysql database, like f.i. my 
tree tag (see previous posts) and f.i. the mysqlUserfolder product.

Can anyone tell me how to get int working again without the 'L' using mysqlUserfolder. 
Note - i use Python 2.0 but still get the same problem.
What am i doing wrong?

Greetings Francine

_
Get Your Private, Free Email at A HREF="http://www.burningmail.com" 
target="_new"http://www.BurningMail.com/A

___
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 and Book Cataloging (was: Using Zope forGroupware/Messaging applications)

2001-02-18 Thread R. David Murray

On Sun, 18 Feb 2001, Michael R. Bernstein wrote:
 How are you entering the data into the system? Specifically,
 how are you *normalizing* the Author and book information?

I don't know what you mean by normalizing, I'm afraid.

The data is stored and upated in the external Paradox database,
which I then import into PostgreSQL using a Paradox-to-SQL converter
and some bash scripts.

 I'm working on a ZPatterns based book cataloging
 application, and right now I'm storing 'Book' objects with
 the author names as a 'lines' property in the ZClass.
 
 I'd like to change this so 'Author' objects are created and
 stored in their own Specialist when a book is added, but I'm
 not sure how.

I'm not sure I understand what the issue is.  Can't you just, when
data is entered to create a Book, query the Authors specialist to
see if the Author exists and create it if it doesn't?

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



Re: [Zope-dev] Using Zope for Groupware/Messaging applications

2001-02-18 Thread Steve Alexander

Joachim Werner wrote:

 
  And, instead of switching back-ends in ZPatterns, I could as well
  just rewrite my non-ZPattern objects to work with the new back-end,
   which doesn't seem to be more work.

Well, do your first project both ways. It would make an interesting 
comparative study.


I think you're getting distracted by the flexible storage options of 
ZPatterns, and missing the main benefit to your application.
In your original message, you said:

  There should be very flexible views on the data, e.g. a message or
  document can  either be viewed on the owner's personal workspace or
  on the project portal the document was posted to.

"Flexible views on the data" is where ZPatterns really makes things 
easier. Of course there are other ways to achieve the same ends. 
However, I believe that using ZPatterns makes it easier to evolve your 
system in the face of changing requirements.

--
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] Photo Product Strangeness

2001-02-18 Thread Michael R. Bernstein

I've been messing around with the Photo product, and I've
noticed something odd about how it handles changes to the
display sizes:

When you create several Photo objects in the same folder
(not in a ZPhotoAlbumPage), they affect each others display
sizes. For example, changing one of the display sizes in one
Photo will change the corresponding display in sibling
Photo.

Can anyone suggest how to fix this?

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] Python Product as DataSkin

2001-02-18 Thread Michael R. Bernstein

I have an existing Python Product that I would like to use
as a DataSkin in a Rack.

What do I need to change (import/subclass) in order to use
it in this way?

Thanks,

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 )



Re: [Zope-dev] ZCatalog scalability

2001-02-18 Thread Michael R. Bernstein

Erik Enge wrote:
 
 [Michael Bernstein]
 
 | I need to know how far the ZCatalog will scale using this indexing
 | and search strategy. Does anyone have anectodal or benchmark data to
 | suggest if (and when) I will hit a 'wall' regarding the number of
 | objects being indexed and searched?
 
 I'm going to try to stuff 27 million objects into ZODB sometime in the
 next week or the week after that (all post addresses in England).  I
 haven't got a clue as to whether this will work or just... well not
 work.  I haven't come up with a strategy for segmenting the data, but
 that shouldn't be a problem at all.  This isn't actually much data, so
 I don't expect the Data.fs file to more than 500 MB.
 
 I'm quite confident that ZODB, ZCatalog and BTree will scale very
 nicely for this.  I have a plan ;).
 
 I'll let you know how it goes.  (And please, do poke at me if it takes
 too long.)

Ok, I'm poking :-).

How did it go?

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 )



Re: [Zope-dev] ZCatalog scalability

2001-02-18 Thread Erik Enge

[Michael R. Bernstein]

| Erik Enge wrote:
|  
|  I'll let you know how it goes.  (And please, do poke at me if it takes
|  too long.)
| 
| Ok, I'm poking :-).

Thanks.  Keep doing it till you get what you need, I truly don't
mind.  :-)
 
| How did it go?

Thanks to the speed of delivery at Royal Mail in the UK, I haven't
recieved the data yet (!).  They promised to have it too me by the
coming friday (the 23rd, I believe).  I'll try to process all 27
million records and give feeback to the community.

(I did a premature calculation of how long it would take to populate
the Zope instance, and I'm guessing somewhere between 80 to 100 hours,
meaning the feedback cannot come any sooner than Sunday, at best.)

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

2001-02-18 Thread Michael R. Bernstein

Erik Enge wrote:
 
 [Michael R. Bernstein]
 
 | Erik Enge wrote:
 | 
 |  I'll let you know how it goes.  (And please, do poke at me if it takes
 |  too long.)
 |
 | Ok, I'm poking :-).
 
 Thanks.  Keep doing it till you get what you need, I truly don't
 mind.  :-)
 
 | How did it go?
 
 Thanks to the speed of delivery at Royal Mail in the UK, I haven't
 recieved the data yet (!).  They promised to have it too me by the
 coming friday (the 23rd, I believe).  I'll try to process all 27
 million records and give feeback to the community.
 
 (I did a premature calculation of how long it would take to populate
 the Zope instance, and I'm guessing somewhere between 80 to 100 hours,
 meaning the feedback cannot come any sooner than Sunday, at best.)

What I'm looking for is any indication that object creation
time and/or indexing time goes up with the number of objects
already in the ZODB.

Will you be populating the ZODB in batches (say 100,000
objects or so)? If so, can you benchmark each batch, so we
can see if the batch proccessing time goes up as you
progress through the 270 batches?

Thanks,

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 )



Re: [Zope-dev] ZCatalog scalability

2001-02-18 Thread Erik Enge

[Michael R. Bernstein]

| What I'm looking for is any indication that object creation time
| and/or indexing time goes up with the number of objects already in
| the ZODB.

Well, one thing I've already learned - which you all probably know -
is that you do _not_ want to put index_object() in your class'
__init__() method.  That's because the CatalogAwarness class you
subclass does this for you in the manage_afterAdd() method.

If you put index_object() in __init__() you might as well go on
holliday before it's finished.  A long one.
 
| Will you be populating the ZODB in batches (say 100,000 objects or
| so)?

I'll do that as a secondary solution, if doing it in one batch is too
ineffective. 

| If so, can you benchmark each batch, so we can see if the batch
| proccessing time goes up as you progress through the 270 batches?

Yes.  No problemo, senor! :)

___
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] how to create third party Product?

2001-02-18 Thread Huayin wang

It would be great if someone can tell me how to create
a third party product in 1) dtml, 2) python method.
Does it depend on whether it is a ZClass product?

Where's the documentation that I can read to get a
clue?

thanks!

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  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 )



Re: [Zope-dev] Python Product as DataSkin

2001-02-18 Thread Phillip J. Eby

At 12:51 PM 2/18/01 -0800, Michael R. Bernstein wrote:
I have an existing Python Product that I would like to use
as a DataSkin in a Rack.

What do I need to change (import/subclass) in order to use
it in this way?


from ZPatterns.DataSkins import DataSkin

class MyClass(DataSkin,...all other bases...):
...


___
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] how to create third party Product?

2001-02-18 Thread Huayin wang

It would be great if someone can tell me how to create
a third party product in 1) dtml, 2) python method.
Does it depend on whether it is a ZClass product?

Where's the documentation that I can read to get a
clue?

thanks!

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  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] Fiber Optic cable connectors needed !!!

2001-02-18 Thread pmilea


This message is being sent only to those who have requested our offers and to those 
who wish to receive them.
If you have received this in error or no longer wish to receive our offers, please 
click here [EMAIL PROTECTED] and mark REMOVE  in message header subject.
Also be sure to include any other name or names you wish to be removed from our future 
mailings in a separate email with a different message header .
We  wish to immediately honor all removal requests. If we have missed your request in 
time past ,please notify us again.

Please note that this is not SPAM. You've sent me an offer, answered one of my ads or 
postings lately , or you visited a site that was involved in the product I am offering 
.  To be removed from my private mailing list follow the instructions as mentioned or 
just hit the reply button and put REMOVE in the subject line and hit send .I would be 
happy to remove your name from any future mailings immediatly.


Dear Sir or Madam, 
I am looking to purchase, immediately 5,000  SC Multimode connectors.Can you 
provide me a price right away ? 
Also I need 20,000 D4 connectors ,I am having a hard time finding them .If you 
could come up with 20,000 pieces ,at a decent price,I would take them immediately. 
 Can you quote me on 20,000 pieces of the D4 connectors and 5,000 pieces of the SC 
Multimode connectors? Can you provide them right away ? Please do not forget to 
include FOB point or a CIF price with NYC as delivery point  ,and all other pertinent 
information .Please feel free to call with any questions.


Thank you,
Paul J. Milea jr 
Wing N' A Prayer Excess Property
3504 James Street
Syracuse,New York ,USA 13206

cell (315) 374-1560
fax (315) 463-4337



Re: [Zope-dev] AttributeError validate using the Visitor pattern

2001-02-18 Thread Itai Tavor

Hi David,

You posted your questions 3 days ago, so maybe you found a solution 
by now... but this might still be useful to you.

I just implemented a visitor similar to yours, with a few changes. It 
involves the following objects: Order and OrderLineItem. I created a 
Folder named 'displayItemVisitor' in Order containing:

Order.displayItemsVisitor.displayItem (Python Script):
 paramsitem/params
 return item.accept(container, _)

Order.displayItemsVisitor.visitLineItem (DTML Method):
 tddtml-qty;/td
 td class="price"dtml-var "getRetailAmount(qty, 
in_basket_date)" fmt=dollars-and-cents/td

The 'accept' method of OrderLineItem is:
 paramsvisitor, _/params
 return visitor.visitLineItem(container, _)

And the whole thing gets used in the DTML method that displays an order, using:
 dtml-in line_items
   dtml-var "displayItemsVisitor.displayItem(_['sequence-item'], _)"
 /dtml-in

Interesting points:

- I'm passing _ explicitly instead of relying on binding. I vaguely 
recall reading something about a problem binding the namespace. It 
might be fixed in the latest Python Scripts, I haven't tried the CVS 
version yet.

- visitLineItem is called in the context of an OrderLineItem, so no 
dtml-with item is needed.

- If you wanted the visitor to implement looping over the items 
(which is how the GoF do it) you could easily make something like:

 Order.displayItemsVisitor.displayItems (DTML Method):
 dtml-in line_items
   tr
 dtml-var "_['sequence-item'].accept(container, _)"
   /tr
 /dtml-in

BTW, I never thought of using a visitor for this until you brought it 
up, so thanks! What I really like about it is that the same 'accept' 
method can be used by multiple visitors, each one implementing a 
different view of the object. So I can have displayItemsVisitor, 
displayItemsCompactVisitor, and displayItemsEditableVisitor, all 
calling item.accept(), and I avoid polluting my OrderLineItem class 
with multiple view methods. OTOH, it requires adding public access 
methods to OrderLineItem, because a view method in OrderLineItem can 
do dtml-var price, while the visitor must do dtml-var 
"getPrice()". Oh well, there's always a price to pay ;-)

HTH, Itai

R. David Murray wrote:

OK, having helped me figure out how to work around the bug in accessing
ZPatterns objects from a catalog, I've got a new challenge for you all.

Now that I've got my list of objects, I want to generate a web page displaying
them.  The page has the structure of a series of table rows.  Inside each
row data about a single object is displayed, using a common format but
with certain differences depending on the type of object.  To implement this,
I am trying to use the Visitor pattern from the Gang of Four book.

So, I have a Folder displayItemList.  This folder contains (at the moment)
three methods: displayTable, visitAuthor, and visitBook.  displayTable
generates the html for the outer table, down to the tr/tr tags.
Between those tags, it calls dtml-var "accept(me)", where me is
this() for the displayTable method, and accept is a pythonscript method
defined on each of the object type's Specialist.  Each accept method
is of the form:

return visitor.visitBook(None,_,item=context)

with _ bound to namespace on the bindings tab and 'visitor' being listed
in the arguments line.

visitBook begins with the line:

dtml-with item

Trying to display my list, I get an AttributeError on 'validate', and
ZDebug flags the 'with' line as the error location.  validate
appears nowhere in my code, so from all I can figure from a certain
amount of inspection of the source, Zope is looking for this method
on the DTMLMethod and not finding it.

ZDebug says the namespace stack consists of a single entry, which looks like
the DTMLMethod itself (visitBook, presumably).  Seems to me the namespace
stack should be deeper than that.

I've been poking at this for a couple hours now without making any more
progress, so I'm going to quit for the day and come back to it tomorrow.
If anybody has any bright ideas, or sees something obvious I'm doing wrong,
please clue me in.  Thanks!

By the way, I also tried making accept be visitor.visitBook(context,_),
but that produced the same error and ZDebug could only point to the
call to accept as the error location.

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



[Zope-dev] how to create third party Product?

2001-02-18 Thread Huayin wang

It would be great if someone can tell me how to create
a third party product in 1) dtml, 2) python method.
Does it depend on whether the product is a ZClass
product?

Where's the documentation that I can read to get a
clue?

thanks!

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  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] ZClass object on Rack retains old permission settings after beingchanged

2001-02-18 Thread Itai Tavor

Hi,

I have an instance of a ZClass stored on a Rack.the ZClass contains a 
Folder named displayItemsVisitor. I changed the Folder's View 
permission to from 'View' to 'Manage Application Objects' which is a 
permission defined in my Product. I then gave viewOrder_html, which 
is a DTML Method that calls a method inside this Folder a proxy role 
which has the Manage Application Objects permission. Then I tried to 
view viewOrder_html. I got Unauthorized on access to 
displayItemsVisitor.

Fine. I already know that ZClass permissions are a mine field, so I 
decided to give it up for now. So I returned everything to normal - 
set the View permission of displayItemsVisitor back to 'View' and 
removed the proxy role from viewOrder_html. When I tried to view 
viewOrder_html, I got the same Unauthorized error.

So, I deleted displayItemsVisitor. Then I created a new one. Still 
Unauthorized. Cache problem? I set the Cache Target Size and Target 
max time to 0 and flushed the cache. Still Unauthorized. 
Interestingly, the cache page shows 1281 objects in the cache even 
after flushing.

My best guess is that there is some cache problem with ZPatterns, 
where it continues to serve cached items and ignores object changes 
and cache flushing. In fact, I'm pretty sure there is a cache problem 
is ZPatterns, because on several occasions in the past ZPatterns 
continued to serve items after I deleted them from the database.

So the question is, what do I do now?

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



Re: [Zope-dev] ZCatalog scalability

2001-02-18 Thread Michael R. Bernstein

Erik Enge wrote:
 
 [Michael R. Bernstein]
 
 | What I'm looking for is any indication that object creation time
 | and/or indexing time goes up with the number of objects already in
 | the ZODB.
 
 Well, one thing I've already learned - which you all probably know -
 is that you do _not_ want to put index_object() in your class'
 __init__() method.  That's because the CatalogAwarness class you
 subclass does this for you in the manage_afterAdd() method.

For my 'archive' applications, I'm using a SkinScript to
index the objects as they're added instead of subclassing
from CatalogAware.

 | Will you be populating the ZODB in batches (say 100,000 objects or
 | so)?
 
 I'll do that as a secondary solution, if doing it in one batch is too
 ineffective.

I should mention that even spliting this up into three
batches of 9 million records would *probably* give me the
indication I'm looking for, as to whether there was any
progressive performance degradation with the number of
objects.

Thanks again, Erik, and good luck!

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 )



Re: [Zope-dev] Python Product as DataSkin

2001-02-18 Thread Michael R. Bernstein

"Phillip J. Eby" wrote:
 
 At 12:51 PM 2/18/01 -0800, Michael R. Bernstein wrote:
 I have an existing Python Product that I would like to use
 as a DataSkin in a Rack.
 
 What do I need to change (import/subclass) in order to use
 it in this way?
 
 
 from ZPatterns.DataSkins import DataSkin
 
 class MyClass(DataSkin,...all other bases...):

Hmm. I thought I was doing it wrong. Here is the error and
traceback from trying to instantiate the modified Product
(through the standard mgmt interface):

This resource may be trying to reference a
nonexistent object or variable _v_dm_

The URL may be incorrect.
The parameters passed to this resource may be incorrect.
A resource that this resource relies on may be encountering
an error.

Traceback (innermost last):
  File
/usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
  File
/usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File
/usr/local/Zope-2.2.0-src/lib/python/Zope/__init__.py, line
221, in zpublisher_exception_hook
  File
/usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File
/usr/local/Zope-2.2.0-src/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: manage_addArchiveImage)
  File
/usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: manage_addArchiveImage)
  File /home/webmaven/Products/ArchiveImage/ArchiveImage.py,
line 46, in manage_addArchiveImage
(Object: ApplicationDefaultPermissions)
  File /home/webmaven/Products/ArchiveImage/ArchiveImage.py,
line 79, in __init__
(Object: ElementWithAttributes)
  File /home/webmaven/Products/ZPatterns/DataSkins.py, line
208, in __set_attr__
(Object: ElementWithAttributes)
KeyError: (see above)

Any ideas?

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] Re: [Zope-PTK] PTK and Usability

2001-02-18 Thread Johan Carlsson

  A setup with 5-15 novice users, let them use the PTK and what
  there doing without interfering or helping, might give you
  valuable information for changing some UI and scenarios.
 
 I expect to be getting such feedback from our admin and sales
 folks, who will be "eating our dogfood" over the next few weeks.
 :)

That's good. But remember actually seeing people doing the software
is much more educational (for a developer/interface designer) that just
getting opinions. (ok I will stop my nagging now ;-)


 
 We have an existing effort underway to tackle the "DTML snippet"
 problem for Zope in general:
 
   http://www.zope.org//Wikis/DevSite/Projects/ZPT
 
 In particular, ZPT makes pages back into "wholes", editable
 using GoLive, Dreamweaver, etc. (GoLive has better WebDAV
 support, and is working with the current test version;  DW may
 take longer, as they have only broken WebDAV support, and won't
 commit to fixing it).

Couldn't it be done with plain FTP access or does it involve accessing
DAV properties?

Regards,
Joahn


hf–Xš)x7Š^!X+ƒšŠYšŸb~—zhr,š,+3zw(v)EZeŠl†ib3—j)fjŠb?Š^jyw†ib3—j)fjŠb?Š^


[Zope-dev] Re: [Zope-PTK] PTK and Usability

2001-02-18 Thread Tres Seaver

On Mon, 19 Feb 2001, Johan Carlsson wrote:

nagging snipped :

  
  We have an existing effort underway to tackle the "DTML
  snippet" problem for Zope in general:
  
http://www.zope.org//Wikis/DevSite/Projects/ZPT
  
  In particular, ZPT makes pages back into "wholes", editable
  using GoLive, Dreamweaver, etc. (GoLive has better WebDAV
  support, and is working with the current test version;  DW
  may take longer, as they have only broken WebDAV support, and
  won't commit to fixing it).
 
 Couldn't it be done with plain FTP access or does it involve
 accessing DAV properties?

FTP will work;  Paul reminds me that the other thing ZPT needs
is good XHTML support, which DreamWeaver (apparently) still
lacks.

FWIW, we originally favored DW as a candidate ZPT editor, and
only reluctantly dropped it, after getting less-than-helpful
replies from the MacroMedia folks.

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations "Zope Dealers"   http://www.zope.org


___
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-PTK] PTK and Usability

2001-02-18 Thread Johan Carlsson

 FTP will work;  Paul reminds me that the other thing ZPT needs
 is good XHTML support, which DreamWeaver (apparently) still
 lacks.

Ah.

 
 FWIW, we originally favored DW as a candidate ZPT editor, and
 only reluctantly dropped it, after getting less-than-helpful
 replies from the MacroMedia folks.

Well I have recently realized that DW isn't half that great that i should be.
Accually a plain disaster in some configurations.

Are there any tools that excel on XHTML today?

Also will the new XHTML templates work with common browsers?
or does it convert to HTML?

I done some repackaging attempts with DW and javascript for CMF 
to night, but it dw doesn't seem to be able to deliver what I expect at
some point. (trying to do fake dtml-var includes)

Regards,
Johanc
hf–Xš)x7Š^!X+ƒšŠYšŸb~—zhr,š,+3zw(v)EZeŠl†ib3—j)fjŠb?Š^jyw†ib3—j)fjŠb?Š^


[Zope-dev] Re: [Zope-PTK] PTK and Usability

2001-02-18 Thread Tres Seaver

On Mon, 19 Feb 2001, Johan Carlsson wrote:

  FTP will work;  Paul reminds me that the other thing ZPT needs
  is good XHTML support, which DreamWeaver (apparently) still
  lacks.
 
 Ah.
  
  FWIW, we originally favored DW as a candidate ZPT editor, and
  only reluctantly dropped it, after getting less-than-helpful
  replies from the MacroMedia folks.
 
 Well I have recently realized that DW isn't half that great
 that i should be.  Accually a plain disaster in some
 configurations.
 
 Are there any tools that excel on XHTML today?
 
 Also will the new XHTML templates work with common browsers?
 or does it convert to HTML?

XHTML *is* HTML, with stricter rules (e.g., all non-singleton
tags must be closed;  only HTML4 tags can be used, etc.) and
XML namespaces -- ZPT uses the namespaces to attach dynamic
behavior to individual notes in the template's DOM.  At any
rate, the idea is that normal browsers will do fine rendering
XHTML, since the "ignore what I don't understand" rule for HTML
is how they operate.

DW messes up because it steps on the ZPT-namespace attributes
when saving the template back to Zope (Amaya strips them
altogether).
 
 I done some repackaging attempts with DW and javascript for CMF
 to night, but it dw doesn't seem to be able to deliver what I
 expect at some point. (trying to do fake dtml-var includes)

Adobe's GoLive is our current best candidate:  it does both
XHTML and WebDAV very well.

Do look at the ZPT project's wiki (and maybe the tarball, if you
feel so called):

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

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations "Zope Dealers"   http://www.zope.org


___
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] Python Product as DataSkin

2001-02-18 Thread Michael R. Bernstein

"Phillip J. Eby" wrote:
 
 At 12:51 PM 2/18/01 -0800, Michael R. Bernstein wrote:
 I have an existing Python Product that I would like to use
 as a DataSkin in a Rack.
 
 What do I need to change (import/subclass) in order to use
 it in this way?
 
 
 from ZPatterns.DataSkins import DataSkin
 
 class MyClass(DataSkin,...all other bases...):

Ok, assuming that the 'normal' instantiation is either
solved or a non-issue, do I need to do anything special to
get the newItem() method to call my products manage_add
method?

The manage_add method takes an id, an optional title, and an
uploaded file.

When I try passing these to newItem(), it complains that
it's getting "too many arguments, expected 2 got 4", but
when I only pass the id, it complains that "not enough
arguments; expected 4, got 2"

As far as I can determine, the fourth/second argument that
it gets in each case is 'self'.

So what do I do next?

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] ZDatabaseTool source code released

2001-02-18 Thread Andreas Heckel

This is the first ZDatabaseTool source code release . Two new Zope 
objects are provided. 

ZDatabaseDiagram shows the structure and relations between
tables of your database based on referential integrity definitions.
So you get a quick view over tables views and column definitions.

A ZDatabaseExplore shows all entities of your database. 
Features:
- show available databases
- show database owners and users 
- show all database tables
- show all database views
- show all columns of a table
- show column type length default values modifiers ...
- show index definitions
- show rule definitions
- show constraint definitions
- show trigger definitions
- show reference integrity definitions
- perform more powerful test queries then ZSQLMethod (no SQL skills
needed)  

The Query Wizards you can see at the online demo are
NOT included but it is on the TODO list for this week :-) 

http://www.easyleading.org/easyhome/index_html?content=downloads


-- 
___
Andreas Heckel  [EMAIL PROTECTED]
LINUX is like a wigwam...no gates...no windows and an apache inside ;-)

___
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] Python Product as DataSkin

2001-02-18 Thread Phillip J. Eby

At 09:49 PM 2/18/01 -0800, Michael R. Bernstein wrote:

Ok, assuming that the 'normal' instantiation is either
solved or a non-issue, do I need to do anything special to
get the newItem() method to call my products manage_add
method?

newItem() will not do that.  A Rack's newItem() method always takes only an
'id' method.  You'll need a method on the object itself that can be given
anything else you want to give it, which you'll call from a method you
create on the specialist, e.g. a "myAdd" method that takes all four
parameters and then does something like:

newObject = self.newItem(id)
newObject.setup(extraParm1,extraParm2,...)
return newObject


___
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] Python Product as DataSkin

2001-02-18 Thread Michael R. Bernstein

"Phillip J. Eby" wrote:
 
 At 09:49 PM 2/18/01 -0800, Michael R. Bernstein wrote:
 
 Ok, assuming that the 'normal' instantiation is either
 solved or a non-issue, do I need to do anything special to
 get the newItem() method to call my products manage_add
 method?
 
 newItem() will not do that.  A Rack's newItem() method always takes only an
 'id' method.  You'll need a method on the object itself that can be given
 anything else you want to give it, which you'll call from a method you
 create on the specialist, e.g. a "myAdd" method that takes all four
 parameters and then does something like:
 
 newObject = self.newItem(id)
 newObject.setup(extraParm1,extraParm2,...)
 return newObject

Hmm. So I need to refactor the 'manage_add' method inside
the python product into two methods, 'manage_add' which
would be used by the 'normal' object creation process and
that would also call a second 'setup' method which could be
called by the specialists 'myadd' method directly, bypassing
the 'manage_add' method entirely.

Is that correct?

Is there anything else I would need to change?

Thanks,

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 )



Re: [Zope-dev] Python Product as DataSkin

2001-02-18 Thread Phillip J. Eby

At 10:47 PM 2/18/01 -0800, Michael R. Bernstein wrote:

Hmm. So I need to refactor the 'manage_add' method inside
the python product into two methods, 'manage_add' which
would be used by the 'normal' object creation process and
that would also call a second 'setup' method which could be
called by the specialists 'myadd' method directly, bypassing
the 'manage_add' method entirely.

Is that correct?

Pretty much


Is there anything else I would need to change?

Anything that carries any assumptions about the normal Zope management
creation process.  For example, manage_afterAdd is only called when a
DataSkin is added to a Folder, not a Rack.


___
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] Python Product as DataSkin

2001-02-18 Thread Michael R. Bernstein

Philip,

I have gone spelunking into the DataSkin class source to try
to find out why subclassing from DataSkin is interfering
with 'normal' (not in a rack) instantiation of the product,
but with no success. Any assistance you could give would be
appreciated.

BTW, I think the first line needs to read:

from Products.ZPatterns.DataSkins import DataSkin

Thanks,

Michael Bernstein.

Michael Bernstein wrote:
 
 "Phillip J. Eby" wrote:
 
  At 12:51 PM 2/18/01 -0800, Michael R. Bernstein wrote:
  
  What do I need to change (import/subclass) in order to use
  it in this way?
 
  from ZPatterns.DataSkins import DataSkin
 
  class MyClass(DataSkin,...all other bases...):
 
 Here is the error and
 traceback from trying to instantiate the modified Product
 (through the standard mgmt interface):
 
 This resource may be trying to reference a
 nonexistent object or variable _v_dm_
 
 The URL may be incorrect.
 The parameters passed to this resource may be incorrect.
 A resource that this resource relies on may be encountering
 an error.
 
 Traceback (innermost last):
   File
 /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
 line 222, in publish_module
   File
 /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
 line 187, in publish
   File
 /usr/local/Zope-2.2.0-src/lib/python/Zope/__init__.py, line
 221, in zpublisher_exception_hook
   File
 /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
 line 171, in publish
   File
 /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/mapply.py,
 line 160, in mapply
 (Object: manage_addArchiveImage)
   File
 /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py,
 line 112, in call_object
 (Object: manage_addArchiveImage)
   File /home/webmaven/Products/ArchiveImage/ArchiveImage.py,
 line 46, in manage_addArchiveImage
 (Object: ApplicationDefaultPermissions)
   File /home/webmaven/Products/ArchiveImage/ArchiveImage.py,
 line 79, in __init__
 (Object: ElementWithAttributes)
   File /home/webmaven/Products/ZPatterns/DataSkins.py, line
 208, in __set_attr__
 (Object: ElementWithAttributes)
 KeyError: (see above)

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