Re: [Zope-dev] ZPatterns Specialist Question

2000-07-03 Thread Chris Withers

Steve Alexander wrote:
 I think you're getting your levels of abstraction confused with your
 meta-levels of abstraction :-)

Confused? when talking about ZPatterns?

n e v e r ;-)

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] Zope Add-on Installation

2000-07-03 Thread Chris Withers

Hi,

Zope currently has two ways of distributing products:
1. Tarballs containing python products
2. .zexps containing methods, ZClass products and the like.

Things are now getting bad as products are emerging (PTK, Tracker, etc)
which require both of these to get a single product working which is
horrible :/

What is needed is a new way of installing Zope stuff for the following
categories:
1. Python Base Products (Like ZPatterns, PTKBase and TrackerBase)
2. Instantiatable Products (like TinyTables, Squishdot and Tracker)
3. Interface Skins (none right now, DemoPortal is probably the closest)

Most importantly of all, collections of the above... (PTK is an example
here, Tracker would be as well)

Does anyone have any ideas?

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] More Image Errors

2000-07-03 Thread Chris Withers

Chris Withers wrote:
 I'm going to knock up a patch for this anyway and chuck it in the
 collector.

The patch (which is for the latest CVS, but shouldn't be too hard to
modify for other versions ;-)

Chris

===
RCS file: /cvs-repository/Zope2/lib/python/OFS/Image.py,v
retrieving revision 1.109
diff -r1.109 Image.py
200,208c200,211
 header=string.split(header, ';')[0]
 mod_since=long(DateTime(header).timeTime())
 if self._p_mtime:
 last_mod = long(self._p_mtime)
 else:
 last_mod = long(0)
 if last_mod  0 and last_mod = mod_since:
 RESPONSE.setStatus(304)
 return RESPONSE
---
 try:
 header=string.split(header, ';')[0]
 mod_since=long(DateTime(header).timeTime())
 if self._p_mtime:
 last_mod = long(self._p_mtime)
 else:
 last_mod = long(0)
 if last_mod  0 and last_mod = mod_since:
 RESPONSE.setStatus(304)
 return RESPONSE
 except:
 pass

___
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 comments on ZPatterns

2000-07-03 Thread Chris Withers

From a mail about the LinuxTag conference:

 P.S. ABout ZPatterns: everyone I spoke to was thought the basic idea
 behind  ZPattern was good and sound and nice and so on. But _everyone_
 complained about it being too pretentious (with all the computer science
 claims and theory behind it) and introducing too many unnecessary new
 concepts (racks, specialist and what have you). All this is very
 distracting. I for one can't get my head around it. But that seems to be
 what you're saying as well.

HTH,

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] Zope Add-on Installation

2000-07-03 Thread Jimmie Houchin

Here is a page by Butch Landingin at 
http://www.zope.org/Members/butchland/ZopePackProposal

He talks about the need for a Zope Pack Manager. 
Or maybe that should be Zope Package Manager? :)

It would be nice to have a single unified way of preparing apps,
products or whatever for distribution. The process be nicely automated
or provide a user interface for building the distributable. The install
process would also need to be just as painless.

Jimmie Houchin

Chris Withers wrote:
 
 Hi,
 
 Zope currently has two ways of distributing products:
 1. Tarballs containing python products
 2. .zexps containing methods, ZClass products and the like.
 
 Things are now getting bad as products are emerging (PTK, Tracker, etc)
 which require both of these to get a single product working which is
 horrible :/
 
 What is needed is a new way of installing Zope stuff for the following
 categories:
 1. Python Base Products (Like ZPatterns, PTKBase and TrackerBase)
 2. Instantiatable Products (like TinyTables, Squishdot and Tracker)
 3. Interface Skins (none right now, DemoPortal is probably the closest)
 
 Most importantly of all, collections of the above... (PTK is an example
 here, Tracker would be as well)
 
 Does anyone have any ideas?
 
 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] Tree Tag question: from zope 1.x to zope 2.x

2000-07-03 Thread Gilles Lavaux

Hello,

I want to display the content of a site starting from a folder called 'Site'
with a tree tag.
I want also to render immediately inside the tree the documents with an
ID=='PUBLIC_Doc'.
In Zope 1.x I have a working dtml method like this:

!--#var standard_html_header--
!--#tree Site branches_expr="objectValues()" sort=id skip_unauthorized--
  b!--#var id--/b
  !--#if "_['id']=='PUBLIC_Doc'"--
##
!--#try--
  !--#var "_[_['id']]"--
!--#except--
  !--#var Except_Message--
!--#/try--
##
  !--#/if--
!--#/tree--
!--#var standard_html_footer--

Unfortunatly for me , with zope 2.1.6 i get an error when I try to render
the 'PUBLIC_Doc' document:
.
PUBLIC_Doc !#
Error type:AttributeError
Error Message:
Error Message:__call__
Error TB:Traceback (innermost last): File
"/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Try.py", line 221, in
render_try_except result = render_blocks(self.section, md) File
"/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 335, in
eval return eval(code,globals,d) File "", line 0, in ? File
"/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 161, in
careful_getitem v=mapping[key] File
"/usr/share/zope/lib/python/OFS/DTMLMethod.py", line 146, in __call__
r=apply(HTML.__call__, (self, client, REQUEST), kw) File
"/usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py", line 502,
in __call__ try: return render_blocks(self._v_blocks, md) AttributeError:
__call__

has someone a solution ??

Thanks,

Gilles



___
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] Zope Add-on Installation

2000-07-03 Thread Chris Withers

Jimmie Houchin wrote:
 It would be nice to have a single unified way of preparing apps,
 products or whatever for distribution. The process be nicely automated
 or provide a user interface for building the distributable. The install
 process would also need to be just as painless.

Totally agree. Thanks for the link to Butch's stuff, I like the ideas
but think even they're a bit out of date now :/

There's also the distribution tab:
http://hack.middle/Control_Panel/Products/YourProduct/manage_distributionView

But this created junk for me :(

However, I think the larger problem still needs to be solved.

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] More comments on ZPatterns

2000-07-03 Thread Steve Spicklemire


So let's start throwing some brute force hacking at the problem! ;-)

 From a mail about the LinuxTag conference:

 P.S. ABout ZPatterns: everyone I spoke to was thought the basic
 idea behind ZPattern was good and sound and nice and so on. But
 _everyone_ complained about it being too pretentious (with all
 the computer science claims and theory behind it) and
 introducing too many unnecessary new concepts (racks,
 specialist and what have you). All this is very distracting. I
 for one can't get my head around it. But that seems to be what
 you're saying as well.

Seriously, I'm trying to get it all figured out, and I thought maybe
if I attempted to do something 'real' with it I would at least learn
what I *don't* understand. Well.. I've learned a *lot*! (about what I
don't understand.. ) ;-) The source code is astonishingly simple 
looking, but about one layer deeper that I can easily grok, apparently.

I have a site that displays data from a database. Customers want to include
this data on their web site, say as an included 'frame'. Each customer wants
a slightly different slice of the data, and of course they want it all 
dressed up in the correct 'look' so that it appears seamlessly integrated.

I create a "View" ZClass, subclass of DataSkin, that looks at the data
with the perspective if a customer. It should keep track of all the
information about how a particular site wants the results to look, and
what data is interesting.

I make a PropertySheet in my ZClass called 'Basic', in which I keep the 
basic properties I need to track the necessary information.

To go along with this, I create an instance of a Specialist called
"viewManager" who has a (default) rack of "View" objects.

I also create a "TableInfo" ZClass, subclass of DataSkin, that
quantifies the kind of data the customers have to choose from, and
metadata about the data (headers, query parameters and suchlike).

I create a ZClass property sheet for the TableInfo ZClass.

Finally I create an instance of Specialist (tableManager) with a
(default) rack of TableInfo objects.

Now... some of the Tableinfo properties, and some of the View
properties are *really* in MySQL. I figured out, from the mail list
and the source code, that I can create a Generic attribute provider in
the rack that can get attributes from an SQL database for my DataSkin
descendents using the 'source expression' and 'target expression'
business.

e.g., 

Source expression:
  (GetTableInfo(tableInfoID=self.id) or [NOT_FOUND])[0]

Target expressions:
  tableHeaders=RESULT.tableHeaders
  footnote=RESULT.footnote

and when I ask one of my TableInfo instances for their footnote it
comes right out of MySQL! Cool. Now.. I can't seem to figure out how
to *change* the data in the database when the user 'edits' the
DataSkin which brings up the whole issue of changing stuff in
DataSkins. Even when I can figure out *a* way to make it work.. I'm
almost sure it's not *the* way it should work. The problem I'm having
is that I feel that some of my code is violating Demeter... and it
makes me think that I'm still missing some really fundamental
insight...

For example: My tableManagerr has a method like this,
the "addNewTableInfo" method:

dtml-var standard_html_header
center
h2 Inserting new Data Table Info Item!/h2
dtml-let ni="newItem(name)"
  nips="ni.propertysheets.get('Basic')"
dtml-call "nips.manage_changeProperties(REQUEST)"
/dtml-let
form action=index_html
input type=submit value="OK"
/form
/center
dtml-var standard_html_footer


Now... I thought that stuff like:

  nips="ni.propertysheets.get('Basic')"

was a "nono" on Demeter grounds... I *should* be able
to say simply:

ni.setAllTheRightThings(REQUEST)

But I can't seem to find that method in the source. ;-) Or is it that
Specialists are allowed to have special 'inside' knowledge about the
objects they specialize in, since they are, after all, specialists!

Also.. I've gotten the habit of adding methods to my ZClasses
that edit themselves:

editInstance:
dtml-var standard_html_header
center
dtml-call "propertysheets.get('Basic').manage_changeProperties(REQUEST=REQUEST)"

Table Info Changed.br

form action="dtml-URL2;"
input type=submit value="OK"
/form
/center
dtml-var standard_html_footer


But this won't work now... since I could add another propertysheet in
the Specialist. Should the specialist call manage_changeProperties on
all the propertysheets? (including any defined in the ZClass) Is there
some method hidden somewhere that does this?

Anyway.. this is what I'm working on at the moment... Any insight
appreciated... since I seem to be having a shortage. ;-)

-steve


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

2000-07-03 Thread Andy Dawkins

does anybody know where REQUEST['INSTANCE_HOME'] disappeared to between Zope
version 2.1.4 and version 2.1.6.

Furthermore is it likely to reappear or has it been succeeded by some other
key.

Cheers,
-Andy Dawkins


___
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] Product Data Storage

2000-07-03 Thread Monty Taylor

Just my $0.02 worth... 

If you can at all avoid it, I think you should find a way to store it in 
the ZODB. 
Maybe a Configuration product that would allow you to create arbitrary 
configuration information and still be able to access it without making 
filesystem calls. Think about DC's Zope on a CD demo. Not that you really 
need to do that sort of thing, but it's really not going to work if you 
have to write stuff to the filesystem.

Actually, an XML Docment somewhere at root level should give you the kind 
of flexibility you're looking for. Lot's of people are using XML files 
for conf these days (they're all jumping... don't you want to...) 

That being said, I totally agree that if you need to store something in a 
file, put it in Zope/var. I, for one, have my Zope application code on 
partition along with other apps, and the data, like Data.fs on another. I 
typically don't expect the apps partition to grow very much, or very 
often, In fact, only when I install something. So it would be quite 
shocking to have that space filling unexpectedly.

But, as always, the choice is completely up to you.

Monty

 Original Message 

On 6/30/00, 3:27:42 PM, Dan "L." Pierson [EMAIL PROTECTED] wrote 
regarding [Zope-dev] Product Data Storage:


 Andy Dawkins writes:
   I have decided AGAINST searching the ZODB for instances of ZMailIn 
because
   that is just too scary, hideously inefficient and I don't want to go 
there.
   Instead I thought of keeping an up-to-date list of where all the current
   instances where held.  My original idea was to get the ZMailIn product 
to
   write a file in to the /lib/python/Products/ZMailIn directory, which
   shouldn't cause any problems that I can see.

 ... snip ...

   So my question is this:
   What are peoples opinions on storing shared product data?  Where should 
it
   be placed?  Should this ability be added to Zope as a standard?

 Shared data should go in zope/var, or a subdirectory of that.
 Zope/lib should be considered read-only by running products unless
 explicitly changed by the user.  As you have correctly pointed out,
 lots of machines share Zope installations for multiple servers.

 A standard interface for Python code to get a private subdirectory of
 var might well be useful.


 ___
 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] Bug fix: ZCatalog doesn't add vocabulary if vocab_id is omitted inmanage call.manage call.

2000-07-03 Thread R. David Murray

In both 2.2.0b3 and a CVS checkout from 7/1, there's a small bug in
ZCatalog.manage_addZCatalog.  If you call it and don't supply a
vocab_id argument, vocab_id defaults to None.  But the code turns
that into the *string* "None", and when ZCatalog's init method sees
that it thinks its a real vocabulary name and does not create a
default vocabulary.  I fixed it by changing:

vocab_id=str(vocab_id)
if vocab_id == 'create_default_catalog_':
vocab_id = None

to

if vocab_id is not None:
vocab_id=str(vocab_id)
if vocab_id == 'create_default_catalog_':
vocab_id = None

although a better fix might be to make the default value of vocab_id
be the string "create_default_catalog_".

I've put this in the collector.

By the way, the collector pages ought to have a link explaining what format
patches should be submitted in.  I just stuck the above in my
descrpition text, since I couldn't find docs on the patch format.

--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] Comments on ZPatterns

2000-07-03 Thread Ty Sarna

In article [EMAIL PROTECTED],
Chris Withers  [EMAIL PROTECTED] wrote:
 1. Too much jargon... by far... Lots of complicated words that are
 meanlingless to the layman and don't help to convey the concepts. This

Can you point out some examples of which ones you think are especially bad?

 is compounded by the standard Zope problem of minimal documentation
 aimed at the advanced developer. Can someone who understadns this all
 take the time to write a ZPatterns guide to compliment the Wiki and
 maybe simplify or explain in great detail all the terms (especially the
 new ones that have popped up in the last few weeks)?

Naming has been a struggle.  It's hard to come up with descriptive names
for these things.  Part of the confusion is that some things have been
renamed in an effort to make the meanings clearer in the long term.  But
short term, it's confusing and it seems like there are lots of new
concepts, when in fact there are just several names for the same concept
(Implementor - Specialist, Rack-mountable - DataSkin, etc).  I'll also
admit that Rack-mountable was a clearer name, but it was no longer
accurate.  We tend to err on the side of a name that doesn't clearly
describe something instead of a name that clearly describes something,
but describes it *wrong* so that you think you understand something and
really don't.  ("Well, at least the name tells you that you don't know
what it is!", as I've said :-)

 2. Feature runaway. It seems every day something new (and more
 confusing) has been added to ZPatterns. I think ZPatterns will only work
 if it is kept as simple and functional as possible. My view (bearing in

You mention in another post that you feel lots of unnecessary features
have been added -- can you give some examples of which ones you feel are
extraneous? There has been only one major feature added in ZPatterns
0.4.0, which is the ability to have Rack-mountable-like things that
don't live in racks.  This is important for PTK-like applications where
you don't want to lump everything into one container, but would instead
like to have it distributed between member's folders, for example.  I
think it was worth it. 

Part of the percieved feature runnaway I think is due to the renaming
issue described above.  Also, a lot of what looks like adding of
features is actually reorganization and simplification of features that
were already there.  There's no need now for SQL Racks vs.  LDAP Racks
vs.  ZODB Racks, for example.  New features were added, but mainly to
avoid the need for other features to even exist.  In a lot of ways, the
code keeps getting simpler and shrinking (as an example, look at the
early LoginManager releases vs what's there now -- the code shrank
considerably and got much clearer!)

Future versions will follow this trend.  For example, we're probably
going to introduce a simple language to replace Generic Attribute
Providers, Generic Triggers, and such.  This actually will end up
eliminating stuff from ZPatterns and making it clearer, as there will be
less types of objects. It should also help the "I have to visit 4
different menus to set up one simple thing" problem. It will keep more
of the configuration together so you can see exactly what is going on.
I think it will be easier to explain and document as well.

 mind my limited understanding ;-) would be to concentrate on Containers,
 Container Groups and Plugins on the one front and Racks, Specialists and
 the various providers and agents on the other.

The PlugIns stuff is indeed separate, and is not really a part of
ZPatterns as much as it's stuff that we wrote to make ZPatterns and
other Zope products easier to write. You can pretty much ignore it if
you won't be writing python products or working in ZPatterns internals.

 PS: The main reason I'm writing this is because I think ZPatterns are
 very very cool but may well get ignored because no-one understands them
 and they're too buggy and complicated to get working :/

0.3.0 is pretty stable, I think. 0.4.0 alphas have been buggy. But they
*are* alphas, after all. You were warned :^)

From the unattributed mail you posted from someone else:
  P.S. ABout ZPatterns: everyone I spoke to was thought the basic idea
  behind  ZPattern was good and sound and nice and so on. But _everyone_
  complained about it being too pretentious (with all the computer science
  claims and theory behind it) 

What, you want something that's *not* based on any theory, just random
ideas? :^)

  and introducing too many unnecessary new
  concepts (racks, specialist and what have you). All this is very

Racks and Specialists are key concepts.  Saying that they're unecessary
and should be eliminated is like saying OO programming would be simpler
if they got rid of all the extra ideas like classes and objects.  Probably
so, but what would be left???

ZPatterns is new, and it can be confusing, and there is not enough good
documentation (or working examples -- I'm surpised this is one thing
there 

Re: [Zope-dev] Racks and Specialists Simplified

2000-07-03 Thread Ty Sarna

In article [EMAIL PROTECTED],
Steve Alexander  [EMAIL PROTECTED] wrote:
 If it isn't there (hiding somewhere), perhaps I can add it from Shane's
 original email?

If it isn't there already, by all means, please add it!

___
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] BTreeFolder released

2000-07-03 Thread Shane Hathaway

Zopistas,

I had some inspiration today and discovered a simple way to write a
BTreeFolder implementation.

http://www.zope.org/Members/hathawsh/BTreeFolder/

It works better than I thought it would.  It allows you to store
thousands (well, I've tested it with only 1536, but I don't know of any
limit) of objects with a user interface optimized for such a large
folder.

Enjoy!  And HAPPY INDEPENDENCE DAY!

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 )




Re: [Zope-dev] Zope Add-on Installation

2000-07-03 Thread Dieter Maurer

Chris Withers writes:
  Hi,
  
  Zope currently has two ways of distributing products:
  1. Tarballs containing python products
  2. .zexps containing methods, ZClass products and the like.
  
  Things are now getting bad as products are emerging (PTK, Tracker, etc)
  which require both of these to get a single product working which is
  horrible :/
  
  What is needed is a new way of installing Zope stuff for the following
  categories:
  1. Python Base Products (Like ZPatterns, PTKBase and TrackerBase)
  2. Instantiatable Products (like TinyTables, Squishdot and Tracker)
  3. Interface Skins (none right now, DemoPortal is probably the closest)
Tarballs are flexible enough to install both a Python Products and
associated ZClasses from ZEXP's (the products "__init__" function
imports the ZEXP at the appropriate place, if it is not already
there).

I do not say, this is optimal.


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] New for download: Image.py that is border-aware

2000-07-03 Thread Jon Franz

The subject says it all... no more dtml-var "foo.tag(border=0)" type
schtuff...

http://www.zope.org/Members/Coventry/Border_aware_image

Note: this was created, and tested, on Zope 2.1.6 - newer installations, or
those with modifications to thier Image.py file in
zope-home/lib/python/OSF should Not use the new file - they should compare
the file and apply the changes by hand to thier Image.py to avoid version
troubles.

___
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 lexicon bug is back?

2000-07-03 Thread R. David Murray

This is distressing.  I'm building a new shopping cart site, and
doing it under 2.2.0 CVS (as of 7/1).  I've added four items.
If I search for certain keywords that I know only appear on one
item, I get two items returned.  The other item has no trace of
the specified keyword.  This sounds very much like the bug that
Michel Pelletier found and fixed in Lexicon.py a while back.  As
someone on the list pointed out, Michel's fix was overwritten in
the CVS by another version of the routine, which it *looked* as if
would also fix the bug.  This is the code I now see in my image.

It appears that the bug is with us once again, however.  Michel,
can you look at this again, please?

--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] Announce: ZScheduler alpha Version 0.0.7

2000-07-03 Thread Loren Stafford

ZScheduler Version 0.0.7 Date: 2000/07/02

 1. Fixed a bug that caused ZEvents to execute in the wrong context.

 2. If the action method of a ZEvent raises an error, a traceback is written
in the log.

 3. Added a Trigger tab to the management screen for ZEvents which fires the
event in the same context that the Dispatcher does, but without regard to
the schedule. This helps immensely in debugging the DTML in the ZEvent.

I've tested on:
   Win98 Zope 2.2.0b3
   Solaris 2.6 Zope 2.1.4
   Linux ?.? Zope 2.1.3

On the Linux configuration (my account at CodeIt Computing), most features
work; however, the new Trigger tab does not behave correctly. Though the
ZEvent method eventually executes correctly, it doesn't return anything to
the client and Zope seems to lock up temporarily -- that is, it doesn't
respond to other client requests. I don't have a Linux development system
with which to track this down. Any help would be appreciated.

Here's the code for the Trigger tab. Can you see anything wrong? ...or
anything Linux and Zope 2.1.3 would find wrong?

 def manage_triggerZEvent(self, client=None, REQUEST=None, RESPONSE=None,
**kw):
"""For use by the Trigger tab on ZEvent management page.
Use for testing the ZEvent in a context that mimics that of Dispatcher.
"""
RESPONSE.setHeader('Content-type','text/plain')
aurl=REQUEST['URL1']
furl=string.join((aurl, 'trigger'), '/')
(headers,response)=Client.call(furl) # Fire event
RESPONSE.setBody(headers)
RESPONSE.appendBody('\n')
RESPONSE.appendBody(response)

Otherwise, ZScheduler is looking good. Let me know how it works for you.

http://www.zope.org/Members/lstaffor/ZScheduler

-- Thanks
-- Loren



___
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 zpatterns-0.4 ?

2000-07-03 Thread Phillip J. Eby

At 11:54 AM 6/27/00 +0400, Jephte CLAIN wrote:
mike wrote:
 There is no way to infinite recursion if Rack.getItem is leaved
 untouched. 
Ah ah. But people will touch it. Like me for example :-)
There is no way to prevent overriding getItem from a ZClass for example.
And it *will* recurse infinitely, making Zope dumping core.

 getItem/newItem are not a high level methods, they are *part
 of DataSource's protocol* which *implemented* in Rack with retrieveItem
 and buddies.
getItem/newItem are not meant to be overrided. retrieveItem/createItem
are to overrided. This is different level for me.

When Philipp wake up (I guess he's asleep right now :-)), he might give
his opinion about that.


I've been on vacation.  I'm basically with Mike on this one, with a slight
amplification on my intention here.  IMHO, what you should be doing with
your SQL is making it an AttributeProvider, and using the "virtual" mode of
the Rack which does not store the item in the ZODB, only its
propertysheets.  Then you will not need to override *anything* in any of
the ZPatterns classes.  If you need to store persistent attributes, this
may be an issue.  I'm planning to create a "Persistent External Attribute
Provider" to allow one to store attributes persistently even when the
object itself isn't stored in the ZODB.

In any case, my intention for mixed-database objects in racks is that one
should not need to override any of the built-in methods of Rack.  In
earlier versions of ZPatterns, such overriding seemed like it would be
necessary, but as of 0.4 there is really no reason at the framework level
to mess with any of Rack's implementation details unless you need to create
a special hand-tuned version for some critical bit of efficiency.  Almost
anything you could do by overriding those methods can now be done through
Generic Attribute Providers or other plug-ins.


___
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] Racks and Specialists Simplified

2000-07-03 Thread Phillip J. Eby

By all means, feel welcome.  I've been on vacation a while.

At 02:29 PM 6/28/00 +0100, Steve Alexander wrote:

I just looked over the ZPatterns Wiki for Shane's explanation, but I
can't find it.

If it isn't there (hiding somewhere), perhaps I can add it from Shane's
original email?



___
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] zope and caching

2000-07-03 Thread Chris McDonough

Here at DC we recently had a "jam session" discussion on caching.  I
don't think anything "hard" came out of it, we just tossed around some
ideas.

DC has several current contract customers who are going to need high
speed pretty badly.  Of course, they're also going to be using ZEO,
which negates some of the need for speed by distributing the load over
several boxes.  But if that doesn't do the trick, in addition to the
already existing caching stuff in DTML, I'd imagine DC is going to need
to build some HTML-page-level caching into Zope soon.  More specifics I
can't give, it's jammed into the (already very crowded) "nebulous things
we should be working on".  Sounds sort of like fun though.

I haven't used CachePool... gad, it's hard to keep up.

In addition to caching, have you considered trying to use ZEO over a few
machines?  

"Bak @ kedai" wrote:
 
 hi good people
 i've been using zope for quite some time now.  everything has been great; zope,
 the mailinglist, products are great!
 
 rant
 i want to serve a dynamic site and zope fits the bill.  now, i think i want to have
 some of the dynamic methods cached, so as to reduce the cpu cycles on my server.
 
 y'see, the site has slowly bogged down as the number of users increase(dwhich is
 good, the users increase :)) and cpu cycles processing user requests have
 increased.  i'm not too sure (being a newbie) whether all my methods contribute
 to the consumption of cpu cycles.
 
 caching.  yes, i've tried putting cache headers on my docs, but it  seems that
 ie do not honor the headers, or maybe i put it wrongly.  ie(4.x and 5.x) kept
 showing the cached version of my pages, even after clearing the local cache.
 only deleting the temp files solved the problem.  i had no bad behaviour from
 netscape.
 
 also tried ZCache, but according to the product author, better wait for the
 next version.  so, i'm waiting.
 
 meanwhile, i've tried Cache Pool, and it looks good.  i have yet to test the
 effectiveness of Cache Pool, but it looks as if the page loads faster now.
 /rant
 
 the point is this:
 will zope ever have a method cacheing modules/object in the future?  for i think 
zope can be faster if he/she/it have this built in.
 
 just a thought.  what say you guys?  how do you guys tackle this?
 
 thanks
 
 --
 --
 http://www.kedai.com.my/kk
 Am I Evil?
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] zope and caching

2000-07-03 Thread Toby Dickenson

On Mon, 3 Jul 2000 10:49:28 +0800, "Bak @ kedai" [EMAIL PROTECTED]
wrote:

hi good people
i've been using zope for quite some time now.  everything has been great; zope,
the mailinglist, products are great!  

rant
i want to serve a dynamic site and zope fits the bill.  now, i think i want to have 
some of the dynamic methods cached, so as to reduce the cpu cycles on my server. 

y'see, the site has slowly bogged down as the number of users increase(dwhich is
good, the users increase :)) and cpu cycles processing user requests have
increased.  i'm not too sure (being a newbie) whether all my methods contribute
to the consumption of cpu cycles.

FWIW, I think your approach is the right one. Treat caching as an
optimisation. Wait until it's a measurable problem, then tackle the
hot spots.

caching.  yes, i've tried putting cache headers on my docs, but it  seems that
ie do not honor the headers, or maybe i put it wrongly.  ie(4.x and 5.x) kept
showing the cached version of my pages, even after clearing the local cache.  
only deleting the temp files solved the problem.  i had no bad behaviour from
netscape.

There are several messages in the mailing list archives explaining how
to set these headers. Im still planning to write that HowTo one
day

also tried ZCache, but according to the product author, better wait for the
next version.  so, i'm waiting.

meanwhile, i've tried Cache Pool, and it looks good.  i have yet to test the
effectiveness of Cache Pool, but it looks as if the page loads faster now.

These products that cache stuff internal to Zope are great if you need
zope to process the cached data (from your desciption, you dont)

If you need to cache whole requests, then the best approach is to
understand and use the http cache headers. If processor load is your
main problem, an external http cache is a big advantage too (I use
squid, see http://www.squid-cache.org)

Toby Dickenson
[EMAIL PROTECTED]

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




[Zope] Zope : CGI

2000-07-03 Thread Vincent Maton

Hello everyone,

There is someone who can help me ???

I need a CGI  to transfert the values of the 'Inputs" of a "Form" to a
"e-mail" !!!

Thank's all of you, the specialists...

Vincent.


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




Re: [Zope] Fun with Trees

2000-07-03 Thread Rik Hoekstra




Charlie Wilkinson writes:

After RTFMing and flailing at DTML all night, I'm about stumped.
No pun intended.

I'm trying to use dtml-tree to create a selective menu of objects based
on whether or not the object has an "add_to_menu" property.  I've pretty
much figured out that I need a wrapper around objectValues that will
filter out the objects that don't have the "add_to_menu" property.
This wrapper would be called with dtml-tree's "branches" attribute.
I'm trying to do this wrapper in a DTML method and I've gotten all the
way to where I have to return a list of "actual objects", so says the
DTML Quick Reference.

Is there someone who could 'splain to me how to build a list of objects
in DTMLese?

Here's what I have so far (obviously not working):

dtml-call "REQUEST.set('ret', '')"
dtml-in "objectValues()" sort=id
dtml-if "_.has_key('add_to_menu')"
  dtml-call "REQUEST.set('ret', ret + ' ' + _['sequence-item'])"
/dtml-if
/dtml-in
dtml-return "_.string.split(ret)"


[rh]
Try (yes, this is tested):
dtml-call "REQUEST.set('ret', '')"
 dtml-in "objectValues()" sort=id
 dtml-if "_.has_key('add_to_menu')"
   dtml-call "ret.append(id)" 
 /dtml-if
 /dtml-in
dtml-return ret

Two notes:
- the string approach is an unnecessary hack. I changed it to standard
Python list idiom
- if you append sequence-item it will include your whole method, which
presumably is not what you want in your tree. Use id.


HTH

Rik

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




Re: [Zope] zope and caching

2000-07-03 Thread Bak @ kedai


 to build some HTML-page-level caching into Zope soon.  More specifics I
 can't give, it's jammed into the (already very crowded) "nebulous things
 we should be working on".  Sounds sort of like fun though.

i do hope this materialize, since it will only boost Zope.  
 
 I haven't used CachePool... gad, it's hard to keep up.
 
i did a crude test with ab, and came out with the following.  
this is a moderately dynamic page (with dtml-method invoking date time, look
for stuff in ZClass objects, etc).  in summary, about 3 times increase of
transfer rate.

w/o CachePool
 
 /tmp]# /usr/sbin/ab -n 100 -c 20 http://203.106.2.206:8080/emedia_html
This is ApacheBench, Version 1.3c $Revision: 1.38 $ apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
 
Server Software:Zope/Zope
Server Hostname:203.106.2.206
Server Port:8080
 
Document Path:  /emedia_html
Document Length:14063 bytes
 
Concurrency Level:  20
Time taken for tests:   43.212 seconds
Complete requests:  100
Failed requests:97
   (Connect: 0, Length: 97, Exceptions: 0)
Total transferred:  1422643 bytes
HTML transferred:   1402543 bytes
Requests per second:2.31
Transfer rate:  32.92 kb/s received
 
Connnection Times (ms)
  min   avg   max
Connect:111   375
Processing:   805  7817  8569
Total:806  7828  8944  
   
 with CachePool
 /tmp]# /usr/sbin/ab -n 100 -c 20 http://203.106.2.206:8080/t_p
This is ApacheBench, Version 1.3c $Revision: 1.38 $ apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
 
Server Software:Zope/Zope
Server Hostname:203.106.2.206
Server Port:8080
 
Document Path:  /t_p
Document Length:14066 bytes
 
Concurrency Level:  20
Time taken for tests:   14.671 seconds
Complete requests:  100
Failed requests:66
   (Connect: 0, Length: 66, Exceptions: 0)
Total transferred:  1423367 bytes
HTML transferred:   1403267 bytes
Requests per second:6.82
Transfer rate:  97.02 kb/s received
 
Connnection Times (ms)
  min   avg   max
Connect:1   573  3008
Processing:   106  2072  6070
Total:107  2645  9078
   


 In addition to caching, have you considered trying to use ZEO over a few
 machines?  
 

yes.  but not until zeo is stable enough, and i'm comfortable with 2.2.0 (what
with all the new security stuff and new behaviour)

but i am going to test it.  fer sure.

thanks
p/s - anybody know why i got failed request when i do ab?

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




Re: [Zope] Re: Copy/Paste problem

2000-07-03 Thread Oleg Broytmann

Hi!

On Mon, 3 Jul 2000, Curtis Maloney wrote:
  On Sat, 1 Jul 2000, Oleg Broytmann wrote:
  I (and some my friends) have problem with Copy/Paste. Sometimes it's
   wotking, but often Paste button does not appeared after Copy/Cut.
 
 After investigating I found that the problem is mostly related to
  SiteAccess. I can copy FROM a folder with SiteRoot object, but cannot paste
  INTO such folder. After removing SiteRoot object copy/paste worked. After
  reinstalling SiteRoot copy/paste stopped working again.
 
 Ah, SiteAccess.  You can save yourself the repeated addition/removal of 
 SiteAccess objects by learning how to type __no_before_traverse__ quickly in 
 your URLs. (o8
 
 http://my.site.com/path/to/zope/__no_before_traverse__/manage 
 
 It tells SiteAccess to not do it's thing, and you should be able to direct 
 access the Zope site there.

   I knew this, and probably this is worth to recheck...

   Ususally I use different approach. I have an URL that points to the real
site, for example http://sun.med.ru/zope.net.ru/, and pass SiteRootPATH
using mod_pcgi2. And I have different management URL, e.g.
http://sun.med.ru/pcgi/zope.net.ru/manage, where I do not pass the env var.
Without SiteRootPATH SiteRoot shouldn't interrupt traversing, no?

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


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




Re: [Zope] Howto engineer a scientific paper system

2000-07-03 Thread [EMAIL PROTECTED]

Thanks again, I like lyx now. Using latex with lyx on top is very
comfortable. 

I found a pyhton based bibliographic database handler named
pybliographer (http://www.gnome.org/pybliographer). It has a
GUI and inserts citation directly into lyx.  (The Latex2HTML
converter - on a first try - seems to ignore the inserted BibTex
reference, though.)

Christian


Working with Lyx is actually really nice, I appreciate how to get 

(Referring to Pavlos Christoforou on Don, 29 Jun 2000)
 On Thu, 29 Jun 2000, [EMAIL PROTECTED] wrote:
 
  Thank you for the comments and links for latex and docbook.
  
  Going the latex path seems to me worthwhile - but on another day 
  ;-) ,  I have already done some setup in zope that I would like to
  build on.  What I did not find about LaTeX was a screenshot (isn't it
 
 Having used latex for a long time I would like to point out that if you
 are planing to to write many papers for conferences/publications Latex has
 some very helpful tools. For one many scientific journals provide Latex
 style files so you don't need to worry about formating. Also (and IMO the
 most important) are the pain in the ... bib contents. There are very nice
 bib databases for Latex and latex (or bibtex) can produce bibliography
 contents in the formats required by most journals. Check also Lynx which
 is a minimal (last i checked) wysiwig environment for Latex.
 
 Pavlos 
 
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

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




Re: [Zope] Adding Products Breaking Zope

2000-07-03 Thread Harald Scheirich

I have been trying to get a working combination of Apache and Zope 
the proxypass and Siteserver method as in howto 
http://www.zope.org/Members/anser/apache_zserver it is working now 
but ...

The copy/paste/delete functionality has stopped working when 
SiteAccess is enabled (i.e. I put the base of the apache server in) i 
am using SiteAcces 1.0.1
and zope 2.1.6 i can post errormessages if they are of any help

Harald Scheirich

Hi!

On Wed, 28 Jun 2000, Evan Simpson wrote:
  SiteAccess 1.0.1 is meant to work with Zope 2.1.6 (and does, for me).  I'd
  like to get it working for you folks, as well.  Does a fresh, empty install
   of Zope w/SiteAccess on your respective platforms have this problem?

-- 
---
DI Harald Scheirich  | Voice:+(431) 585 66 30-621
01 EDV consulting  development GmbH | Fax:  +(431) 585 66 30-643
Linke Wienzeile 4/2/2| [EMAIL PROTECTED]
A-1060 Vienna, Austria   | http://www.nulleins.at/
---

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




[Zope] ZClass beginners question

2000-07-03 Thread Dierk Hoeppner

Hi,

I want to connect our own proprietary database to zope. I know 
which features I want because I did an ordinary CGI-application 
already. I would like to use a ZClass. My question: For connecting to 
my database do I have to use external functions? The goal is to 
construct a product like thing that we could easily give away.

Thanks,

Dierk Hoeppner
Dierk Hoeppner
Braunschweig University Library
Pockelsstr. 13
D-38106 Braunschweig
Germany
Tel: +49-531-391-5066 Fax: -5836
E-Mail: [EMAIL PROTECTED] 

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




Re: [Zope] Re: Every user should have the Anonymous role everywhere (was :Re: [Zope] Authentication, Anonymous and Public)

2000-07-03 Thread Chris Withers

Dieter Maurer wrote:
In Zope, each user has a set of roles.
Any user has the "Anonymous" role. Log-in users may have
additional roles.
  
   I'm not convinced this is true...

 The Content Manager Guide (Security, Authorization) states it
 this way:
 
   The "Anonymous" role, which all users have implicitly, 

...and check out the last time the Content Manager's Guide was updated
;-)

Seriously, though, I think this SHOULD be true, although I'm pretty sure
it isn't.

 This is natural, too.
 Why should a registered user have
 less authorization than an anonymous one.

Or, to put it another way, just because an acl_users folder doesn't know
anything about a user, why should that user not have the anonymous role?

 Thus, two reasons to change the Zope authorization, such
 that each user has implicitely the "Anonymous" role,
 if this is not the case now.

I totally agree :-)

Chris

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




[Zope] ZCatalog pointing to wrong object.

2000-07-03 Thread Bart Holthuijsen

Hi all!

I have been having some problems with ZClasses and the Catalog.
I made a new Catalogaware External Product, based mostly on the Boring and 
Photo products. When I add an instance to a folder the Catalog is updated, 
but doesn't point to the right object.

The product inherits from Catalogaware and Objectmanager (and some others).

Example:
In the folder "test" I add an XML Folder (the product) with name: "fold" and 
title: "no1".
The Catalog shows a new object with name "test" and title: "no1".
If I then add an XML Folder to test with name "fold2" and title "no2" the 
Catalog still only contains one object: test/no2.

If I want to delete the objects I get some weird behavior. The first one 
goes without a problem, it removes the entry from the Catalog. The second 
gives an error message:
"Error Type: ValueError
Error Value: Uncatalog of absent id 'Test' " This can probably be explained 
by the fact that there was only one entry pointing to the Test Folder.

Below I'll paste a bit of the XMLFolder.py file:

from Products.ZCatalog import ZCatalog
from Products.ZCatalog.CatalogAwareness import CatalogAware

import OFS.ObjectManager
import Acquisition
import AccessControl.Role

from Globals import HTMLFile  # fakes a method from a DTML file
from Globals import MessageDialog # provid
from Globals import Persistent# makes an object stick in the ZODB

manage_addXMLFolderForm = HTMLFile('XMLFolderAdd', globals())

def manage_addXMLFolder(self, id, title='', REQUEST=None):
"""Add an XMLFolder to a folder."""
self._setObject(id, XMLFolder(id, title))
if REQUEST is not None:
return self.manage_main(self, REQUEST)

class XMLFolder(
 CatalogAware, # Self indexing.
 OFS.ObjectManager.ObjectManager,   # A Folderish object.
Persistent,# Make us persistent. Yaah!
Acquisition.Implicit,  # Uh, whatever.
AccessControl.Role.RoleManager # Security manager.
):
"""XMLFolder object.
"""

meta_type = 'XML Folder' # what do people think they're adding?

manage_options = ( # what management options are there?
{'label': 'Contents',   'action': 'manage_main'},
{'label': 'View',   'action': ''}, # defaults to index_html
{'label': 'Security',   'action': 'manage_access'},
)

__ac_permissions__=( # what permissions make sense for us?
('View management screens', ('manage_tabs','manage_main')),
('Change permissions',  ('manage_access',)   ),
('Change XML Folders' , ('manage_edit',) ),
('View XML Folders',('',)),
)

def __init__(self, id, title=''):
"""initialise a new instance of XMLFolder"""
self.id = id
self.title = title
self.manage_addFolder('test','',0,0)

Does anyone know what the problem might be, how I can get the Catalog point 
to the right object? I'm using Zope 2.1.4 on Windows NT.

Thanks in advance,
Bart Holthuijsen.

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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




[Zope] Deinstalling Products?!

2000-07-03 Thread Jonathan

Hi all,

Removed a product from the Products folder, but Zope still seems to 
import it from a folder that is not there anymore. Does Zope cache it 
somewhere or what?

Any ideas?

Jonathan

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




Re: [Zope] Generating PDF: Use ZpdfDocument or Reportlab?

2000-07-03 Thread Jonathan

Yes we have written a faily extensively billing system that uses
reportlab to generate the equipment orders in pdf format. We have made a
few tweaks here and there to reportlab but in general it works quite
well.

 From within Zope? How do you call ReportLab from within Zope?

Thnx
Jonathan

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




Re: [Zope] Confera problem

2000-07-03 Thread J. Atwood

Confera is pretty old I would try ZDiscussions, ZUBB or Squishdot.

J

At 12:30 PM +1000 7/3/2000, Terry Kerr wrote:
Hi,

I just downloaded Confera-1.2.0-nonbin.tgz, installed it, and created a
Confera topic instance.   I posted a mesage to the topic, and then
posted a reply to this messge.  This is what i get:

Traceback (innermost last):
   File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line
214, in publish_module
   File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line
179, in publish
   File /home/tejay/Zope-2.1.6-src/lib/python/Zope/__init__.py, line 202,
in zpublisher_exception_hook
   File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line
165, in publish
   File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/mapply.py, line
160, in mapply
 (Object: addMessage)
   File /home/tejay/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, line
102, in call_object
 (Object: addMessage)
   File lib/python/Products/Confera/Confera.py, line 565, in addMessage
   File /var/tmp/python-root/usr/lib/python1.5/regsub.py, line 38, in
gsub
AttributeError: (see above)

Has any one had this problem?  I don't really have time to go hunting
for the problem at the moment.

I am running a Zope 2.1.6 from src on RH linux 6.2.

terry


--
Terry Kerr ([EMAIL PROTECTED])
Adroit Internet Solutions Pty Ltd (www.adroit.net)
Phone:   +613 9563 4461
Fax: +613 9563 3856
Mobile:  +61 414 938 124




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


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




[Zope] Comments on 2.2 Help System

2000-07-03 Thread Chris Withers

Apart from the 'Wow! Zope has Help!' comment:

The API documentation is very useful. 
How do we feedback about it? (eg: why is there PropertySheet and
PropertySheets?)
When will it be complete?
How do we submit docs to appear in it? What is the moderation process
like?

Sadly, the rest of the 'Zope Help' section needs a lot more structure to
be useful. At the moment, the names don't even fit in their browser pane
:(
Perhaps something along the lines of the portal structure on
zdp.zope.org would be useful for categorising these documents?

If these are the 'help screens' you get when you click the help button,
maybe they shouldn't be listed here at all?
I have to say, I think the M$ help system on Windows might be a better
model:

1. A Contents Page - kindof like the zdp portal listing, or a contents
section of a book.

2. An index page - A list of all the documents in the help system, which
seems to be largely what the 'contents' tab is now.

3. Search - which needs to be explained better than it is. Can boolean
searching be used? Do I need to quote things? How do I search for
dtml-in?
(Maybe a help screen would be useful ;-)

Maybe there should be links to the Contents Page as well as help on your
current location from in the management interface?

Finally, you should make it clear elsewhere that /HelpSys on your site
will go to the Zope help system. Maybe this needs to be blockable, after
all, why should www.mysite.com/HelpSys give the Zope help system, when I
might want it to be my company's help system for their products?

Which suggests that maybe the help system should be a separate product
from Zope, running on its own server. For example, take a company which
has LOTS of zope servers. The sysadmin would prefer to maintain one
up-to-date copy of the Zope docs on a 'documentation server' which has
documentation for all the Zope versions in use, rather than wastefully
running the same number of documentation servers as there are Zope
instances...

...heaven forbid, DC could actually run a master one of these at
doc.zope.org which would be the most complete and up to date...

Views?

cheers,

Chris

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




Re: [Zope] Re: ZClass in ZClass problem

2000-07-03 Thread Oleg Broytmann

On Mon, 3 Jul 2000, Shane Hathaway wrote:
 They are a special feature of ZClass development.  The spaces let you
 write implementations of methods that would otherwise conflict with
 existing methods.  That's why you can, for example, write your own
 "manage_main", which would normally conflict with the implementation of
 manage_main in the Folder class.  Instances of ZClasses remove the
 trailing space, making the method fully available.

   Understand.

 Now, it sounds like Zope may have some problems with property sheets and
 URL conversions.  Let's try to solve that.

   Which way?

   Few weeks ago I installed 2.2.0b2 and did experiments with SiteSummary
and FlexFAQ (ZClassess I've downloaded from www.zope.org). I didn't have
any problem.

   Later I installed 2.2.0b3 and without testing SiteSummary I went to
creaty my own ZClassess. This didn't work. Then I found SiteSummary has the
problem, too. Seems I broke someting. The first thing to try will be to
reinstall Zope from the very beginning and not install any additional
Products, right?

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


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




Re: [Zope] Why can't I subclass a ZSQLMethod?

2000-07-03 Thread Ivan Raikov


What do you mean, you cannot get a view to it? I can change in the
management area. I believe ZSQL methods are not supposed to provide
the user interface; you use them the way you would use an external
method. That means you have to create the form that sends the query
parameters to the SQL method, and you have to write the DTML code that
obtains the result set, and displays it accordingly.

At least that's way I do it; there might be a better way, I don't
know. 

Best,
Ivan

"Cary O'Brien" [EMAIL PROTECTED] writes:

 I tried that.  You can't add a ZSQLMethod unless there is a connection
 for it to connect to.  There isn't a connection in the products area.
 
 Actually
 
 If I put a dummy gadfly connection in the Product folder, I can
 indeed add a zsql method to my ZClass.  However I can't get a
 view to it.  I can configure it as a view, but it doesn't show
 up in the management tabs.
 
 I guess it may be possible to leave it invisible and use
 other methods to set the query, arguments, and database
 connection.  More digging through the .py files!
 
 -- cary
 

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




Re: [Zope] Re: ZClass in ZClass problem

2000-07-03 Thread Oleg Broytmann

On Mon, 3 Jul 2000, Oleg Broytmann wrote:
 The first thing to try will be to
 reinstall Zope from the very beginning and not install any additional
 Products, right?

   Reinstalling from sources didn't help. I recompiled and reran 2.2.0b3,
imported FlexFAQ2 (which surely worked with 2.1.4) and got the same
problem. Traceback:

  H2Zope Error/H2
  PZope has encountered an error while publishing this resource.
  /P
  
  P
  STRONGError Type: AttributeError/STRONGBR
  STRONGError Value: Edit%20/STRONGBR 
  /P
 
  HR NOSHADE
 
  PTroubleshooting Suggestions/P

  UL
LIThe URL may be incorrect./LI
  LIThe parameters passed to this resource may be incorrect./LI
  LIA resource that this resource relies on may be encountering an
error./LI
  /UL

  PFor more detailed information about the error, please
  refer to the HTML source for this page.
  /P

  PIf the error persists please contact the site maintainer.
  Thank you for your patience.
  /P
/TD/TR
/TABLE


pa href="http://www.zope.org/Credits" target="_top"img
src="http://phd.russ.ru/pcgi2/p_/ZopeButton" width="115" height="50"
border="0" alt="Powered by Zope"/a/p
/BODY/HTML
PRE
Traceback (innermost last):
  File ./lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File ./lib/python/ZPublisher/Publish.py, line 187, in publish
  File ./lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
  File ./lib/python/ZPublisher/Publish.py, line 162, in publish
  File ./lib/python/ZPublisher/BaseRequest.py, line 325, in traverse
  File ./lib/python/ZClasses/Method.py, line 235, in __bobo_traverse__
(Object: Traversable)
AttributeError: (see above)

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


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




Re: [Zope] Re: ZClass in ZClass problem

2000-07-03 Thread Oleg Broytmann

On Mon, 3 Jul 2000, Oleg Broytmann wrote:
Reinstalling from sources didn't help. I recompiled and reran 2.2.0b3,
 imported FlexFAQ2 (which surely worked with 2.1.4) and got the same
 problem.

   Oops! I am very, very sorry :( I connected directly to ZServer - and all
things worked as designed!
   Something broken between Apache and ZServer. Probably mod_pcgi2. Will
look into it...

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


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




Re: [Zope] Is there a better way to code this?

2000-07-03 Thread Andrew Kenneth Milton

+[ Luke Tymowski ]-
| Hello,
| 
| I'm still having trouble trying to get Zope to use/ignore header and footer 
| code in the appropriate places.

...snip...


| So. Is there a better way to do this? Or is the above meet and right and 
| not worthy of shame? I want to write a How-To so other newbies don't have 
| to go through what I did.

You should set flags to say when it's safe to render the header/footer,
or you should remove the header/footer calls from documents you want to
embed.

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

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




[Zope] Oracle 8.1.6 setup file for DCOracle

2000-07-03 Thread Kiran Jonnalagadda

I've just put together a setup file for Oracle 8.1.6. I started with
including all the libraries in Oracle's library directory and then
removed the ones that gave me errors.

It works fine except for when I present an SQL query with a syntax
error. That makes Zope crash. Anybody know why?

-- 

Kiran Jonnalagadda
http://lunateks.com

baby.sh: while true; do echo "^G^G^G^G^G"; sed -e 's/food/poop/';
sync; sync; sleep 15; done

*shared*

# Setup file for Oracle 8.1.6 (Tested for Linux on Intel).
#
# Unfortunately, the libraries needed to link Oracle change from revision
# to revision.  
#
# Oracle provides a make file for building "demo" programs in
# $ORACLE_HOME/rdbms/demo/demo_rdbms.mk.  I have been unable to 
# use this make file to build Python extensions. Adapting it is
# not adequate, because it may change for new Oracle revs.
# My approach is to use demo_rdbms.mk to build one of the
# demo programs, look at the libraries linked, and start from there. :-(
#

ORACLE_INCLUDES=$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public
-I$(ORACLE_HOME)/network/public -I$(ORACLE_HOME)/plsql/public

ORACLE_L=-lJNLSLib3 -lgslsg8 -lnsslb8 -lserver8 -lJNLSTool -lgslssb8 -lntcp8 \
-lsgsl_s8 -lagent8 -lgslssf8 -lntcps8 -lskgxp8 -lgx8 -lntns8 \
-lskgxpd -lnus8 -lslax8 -lclient8 -lldapclnt8 -lnzjs8 \
-lslpm -lclntsh -lmm -locijdbc8 -lsql8 -lcommon8 -ln8 -locijdbc8_g \
-lsqlplus -lcore8 -lnbeq8 -lordim8 -lsvrmgrl -lnent8 -lordim8 \
-ltrace8 -lctx8 -lnhost8 -lordsdo8 -ltracefe8 -lctxc8 -lnjni8 -lordts8 \
-ltracept8 -lctxs8 -lordvirt8 -ldbicx8 -lnl8 -lowm2 \
-lvppdc -lgeneric8 -lnldap8 -lplc8 -lvsn8 -lgslavl8 -lnls8 -lplp8 \
-lwtc8 -lgslber_s8 -lnoname8 -lpls8 -lzx8 -lgsldb8 -lnro8 -lpsa8 -lgslr8 \
-lnsgr8 -lqsmashr

ORACLE_LIBS=$(ORACLE_HOME)/lib/ -L$(ORACLE_HOME)/rdbms/lib  
$(ORACLE_HOME)/rdbms/lib/defopt.o
$(ORACLE_HOME)/lib/sscoreed.o $(ORACLE_HOME)/lib/nautab.o $(ORACLE_HOME)/lib/naeet.o
$(ORACLE_HOME)/lib/naect.o $(ORACLE_HOME)/lib/naedhs.o $(ORACLE_L)

oci_ oci_.c -I$(ORACLE_INCLUDES) -L$(ORACLE_LIBS) -DDCORACLE8

Buffer Buffer.c



Re: [Zope] Is there a better way to code this?

2000-07-03 Thread Luke Tymowski

Hello Andrew,

You should set flags to say when it's safe to render the header/footer,
or you should remove the header/footer calls from documents you want to
embed.

Can't do the latter.
I'm building a weblog. I need to have the user enter entries for each day. 
I need for each day to display properly on its own - which means each needs 
header and footer code. And I need the front page to be created on the fly, 
consisting of the three latest entries, but, of course, without the header 
and footer code appearing in the body of the document.

It now works as it should, but I want to know if there is a more elegant 
way of doing what I want to do. No point pointing fellow newbies at 
something and then have one of the gurus suggest I could have done it much 
more simply and elegantly.

Luke


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




Re: [Zope] Is there a better way to code this?

2000-07-03 Thread Andrew Kenneth Milton

+[ Luke Tymowski ]-
| Hello Andrew,
| 
| You should set flags to say when it's safe to render the header/footer,
| or you should remove the header/footer calls from documents you want to
| embed.
| 
| Can't do the latter.
| I'm building a weblog. I need to have the user enter entries for each day. 
| I need for each day to display properly on its own - which means each needs 
| header and footer code.

No it doesn't. You need to seperate content, and structure.

Each day can simply be
dtml-var standard_html_header
dtml-var day_content
dtml-var standard_html_footer

Where day_content is what you have now sans header and footer.

I don't know your structure, but, this is how I would do it knowing that...

| And I need the front page to be created on the fly, 
| consisting of the three latest entries, but, of course, without the header 
| and footer code appearing in the body of the document.

Yep you can get the content...

| It now works as it should, but I want to know if there is a more elegant 
| way of doing what I want to do. No point pointing fellow newbies at 
| something and then have one of the gurus suggest I could have done it much 
| more simply and elegantly.

Yes there is, and then you don't need all that hackery in the header/footer.

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

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




[Zope] Rewrite rules

2000-07-03 Thread System Administrator

Hi

can any one help me with the rewrite rules ? i'm stuck.

the ones on the zope documentation don't seem to be working for me .

regards,

Parag Mehta[EMAIL PROTECTED]
System Administrator.
Puretech Internet Pvt. Ltd.http://puretech.co.in/ 
77 Atlanta. Nariman Point.
Mumbai - 400021. India.Tel: +91-22-2833158  

Support is now available thru our Web Based Support System.
http://support.puretech.co.in





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




RE: [Zope] MySQL transaction support (was: MySQL Select Statements)

2000-07-03 Thread Andy Dustman

On Mon, 3 Jul 2000, Monty Taylor wrote:

 Why not have one ZmySQLDA that attempts to determine whether it is 
 transactional or not when the connect method is executed. That way you 
 could have a DA connect to your 3.22 database, upgrade your database to 
 3.23.15 and not see any problems. A combination of try-except:ing an 
 attempted "begin rollback" block and a test for database type should do 
 the trick, no? If it's 3.22 or earlier, the begin-rollback should throw 
 the synax error Andy mentioned. If that's ok, a test for database type 
 (not sure about this one) to see if it's BDB? If all of this is wrapped 
 in the connect method, we should be able to make it 'do the right thing' 

There are two factors which determine whether or not transactions can be
supported. Actually, there's only one, but it can't be directly tested
for:

1) If the server version (easily obtained upon establishing the
connection) is  3.23.15, transactions are definitely not supported.

2) If the database in use employs BDB tables, transactions are definitely
supported.

The problem is: Support for the transaction manager is done with a MixIN
class, so the decision on whether or not transactions should be supported
in the DA comes before the connection object is created. Which raises an
interesting possibility: On the connection object's Properties tab, add a
checkbox which indicates that transactional semantics are required. The
status of this checkbox determines which class is used for the database
connection. This might be workable, not really sure.

-- 
andy dustman   | programmer/analyst |  comstar.net, inc.
telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d
"Therefore, sweet knights, if you may doubt your strength or courage, 
come no further, for death awaits you all, with nasty, big, pointy teeth!"


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




Re: [Zope] Deinstalling Products?!

2000-07-03 Thread Chris McDonough

Are you sure you deleted it from the right place? Also, did you delete
it from the Products Management screen of the control panel?

Jonathan wrote:
 
 Hi all,
 
 Removed a product from the Products folder, but Zope still seems to
 import it from a folder that is not there anymore. Does Zope cache it
 somewhere or what?
 
 Any ideas?
 
 Jonathan
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

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




[Zope] Cannot create ZPygresql connection

2000-07-03 Thread Oleg Broytmann

Hello!

   Zope 2.1.4 and 2.20b3 on the same machine, same Postgres server; 2.1.4
can connect, 2.20b3 cannot: upon creation of ZPygresql Connection Zope
throws BadRequest error.

Oleg.(All opinions are mine and not of my employer)
 
Oleg Broytmann  Foundation for Effective Policies  [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


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




[Zope] dtml-try error in 2.2.0b3?

2000-07-03 Thread Stefan Franke

When rendering a DTML document with the following content

  dtml-var standard_html_header

  dtml-try
dtml-var "1/0"
  dtml-except ZeroDivisionError
1/0 failed
  /dtml-try

  dtml-var standard_html_footer

Zope reports

  Error Type: TypeError
  Error Value: unexpected keyword argument: error_type

with the traceback below. Am I doing something wrong?
If it is a bug and has been reported already, sorry for the
noise (I'm currently not subscribed to the list).

Stefan



Traceback (innermost last):
  File D:\Programme\Zope2.2.0b3\FTF\lib\python\ZPublisher\Publish.py, line
222, in publish_module
  File D:\Programme\Zope2.2.0b3\FTF\lib\python\ZPublisher\Publish.py, line
187, in publish
  File D:\Programme\Zope2.2.0b3\FTF\lib\python\Zope\__init__.py, line 221,
in zpublisher_exception_hook
(Object: FTF)
  File D:\Programme\Zope2.2.0b3\FTF\lib\python\ZPublisher\Publish.py, line
171, in publish
  File D:\Programme\Zope2.2.0b3\FTF\lib\python\ZPublisher\mapply.py, line
160, in mapply
(Object: mytest)
  File D:\Programme\Zope2.2.0b3\FTF\lib\python\ZPublisher\Publish.py, line
112, in call_object
(Object: mytest)
  File D:\Programme\Zope2.2.0b3\FTF\lib\python\OFS\DTMLDocument.py, line
168, in __call__
(Object: mytest)
  File
D:\Programme\Zope2.2.0b3\FTF\lib\python\DocumentTemplate\DT_String.py, line
502, in __call__
(Object: mytest)
  File D:\Programme\Zope2.2.0b3\FTF\lib\python\DocumentTemplate\DT_Try.py,
line 212, in render
  File D:\Programme\Zope2.2.0b3\FTF\lib\python\DocumentTemplate\DT_Try.py,
line 244, in render_try_except
  File D:\Programme\Zope2.2.0b3\FTF\lib\python\DocumentTemplate\DT_Util.py,
line 262, in namespace
TypeError: (see above)




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




Re: [Zope] dtml-try error in 2.2.0b3?

2000-07-03 Thread Martijn Pieters

On Mon, Jul 03, 2000 at 06:41:45PM +0200, Stefan Franke wrote:
 When rendering a DTML document with the following content
 
   dtml-var standard_html_header
 
   dtml-try
 dtml-var "1/0"
   dtml-except ZeroDivisionError
 1/0 failed
   /dtml-try
 
   dtml-var standard_html_footer
 
 Zope reports
 
   Error Type: TypeError
   Error Value: unexpected keyword argument: error_type
 
 with the traceback below. Am I doing something wrong?
 If it is a bug and has been reported already, sorry for the
 noise (I'm currently not subscribed to the list).

This is a bug in 2.2.0b3, and is fixed in the upcoming 2.2.0b4 release.

-- 
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 maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] 2.2b3 and absolute_url wrong?

2000-07-03 Thread Ron Bickers

I have a folder "RSSChannels" with a few RSSChannel instances in it, one of
which is called 'zopenews'.  There is also a DTML Method called 'view_all"
that displays the channel contents.

In Zope 2.1.4, both of the following code snippets resulted in
http://localhost/RSSChannels/zopenews/view_all, but Zope 2.2b3 returns
http://localhost/RSSChannels/view_all.

Is 2.2b3 broken, or was 2.1.4?

dtml-var "RSSChannels.zopenews.view_all" url

or

dtml-with RSSChannels
 dtml-with zopenews
   dtml-var view_all url
 /dtml-with
/dtml-with

___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]


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




[Zope] medusa question

2000-07-03 Thread Frank McGeough

Where does medusa look for html files by default? I have regular old html
files that I'd like to make available without fiddling with Zope. Is that
possible?


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




[Zope] How do say wiki?

2000-07-03 Thread J. Michael Mc Kay

What would be an acceptible plural form of wiki,
wikies
wikis
what?

Thanks


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




[Zope] Local user groups (Virginia)

2000-07-03 Thread J. Michael Mc Kay

Does anyone here know of a local (Virginia, Richmond, Fredericksburg area)
ZOpe/Python users group?

..checking for plain text setting.  Yepsend.

Thanks,

J. Michael Mc Kay

http://www.virginiaweb.com (under recon)


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




Re: [Zope] medusa question

2000-07-03 Thread Martijn Pieters

On Mon, Jul 03, 2000 at 03:27:04PM -0400, Frank McGeough wrote:
 Where does medusa look for html files by default? I have regular old html
 files that I'd like to make available without fiddling with Zope. Is that
 possible?

Not out of the box. ZServer, which is based on Medusa, doesn't support serving
of HTML files from the local file system, it noly serves content out of Zope
itself.

There is a product on Zope.org called LocalFS that allows you to integrate
filesystem based content into Zope though.

-- 
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 maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Rewrite rules

2000-07-03 Thread Tino Wildenhain

Hi

System Administrator wrote:
 
 Hi
 
 can any one help me with the rewrite rules ? i'm stuck.
 
 the ones on the zope documentation don't seem to be working for me .

You mean for apache? These are regular expressions as in perl or
module re in python. 
The rewrite module of Apache is documented here: 
http://www.apache.org/docs/mod/mod_rewrite.html

We need more information of what you want to help you more.

HTH
Tino Wildenhain

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




Re: [Zope] medusa question

2000-07-03 Thread Gary Shears

  have regular old html
  files that I'd like to make available without fiddling with Zope. Is that
  possible?
 
 Not out of the box. ZServer, which is based on Medusa, doesn't support serving
 of HTML files from the local file system, it noly serves content out of Zope
 itself.
 
Slightly off topic, but related. Does this mean that the everything on local
file system is protected natively in zope. Short of things like buffer
overflows. What I mean is, can I somehow muck up security in Zope and
compromise my local system, or will only zope objects be affected?
 I'm an absolute newbie to zope, and still trying to get a handle on the
architecture.

Thanks,

gary

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




[Zope] File referencing and LocalFS

2000-07-03 Thread Rogerio Atem de Carvalho

I am using LocalFS to refer to a directory structure 
like this:

folder1
  |
  folder11
   
There are image (.jpg) files in both folders. I have 
two questions about this:

1)Folders names are directly related to string fields 
in a MySQL database which use spaces between words (eg 
New York), but folders names don't use spaces (eg 
NewYork). How can I skip spaces from database fields to 
make them refer to these folders (eg New York -- 
NewYork)?

2)Using LocalFS, can I do something like dtml-
var "localfsObject['dtml-var par1'].['dtml-var 
par11'], where par1 and par11 are folder names (after 
skiping spaces)?


Regards,

Rogerio Atem


---
E-mail enviado pelo servidor do CEFETCampos

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




Re: [Zope] Fun with Trees

2000-07-03 Thread Dieter Maurer

Charlie Wilkinson writes:
  On Mon, Jul 03, 2000 at 09:35:06AM +0200, Rik Hoekstra waxed eloquent:
   
   Charlie Wilkinson writes:
  [...] 
   I'm trying to use dtml-tree to create a selective menu of objects based
   on whether or not the object has an "add_to_menu" property.
  [...]
   [rh]
   Try (yes, this is tested):
   dtml-call "REQUEST.set('ret', '')"
dtml-in "objectValues()" sort=id
dtml-if "_.has_key('add_to_menu')"
  dtml-call "ret.append(id)" 
/dtml-if
/dtml-in
   dtml-return ret
   
  The bigger problem seems to be the namespace issue that Dieter was
  speaking of.

I found a solution that is much easier than hacking the
TreeDisplay code:

  You do not plan to use REQUEST for information about the
  request but only as a container for a temporary list.
  This can be achieved without REQUEST

dtml-with "_.namespace(r=[])"
  dtml-in "objectValues()" sort=id
dtml-if "_.has_key('add_to_menu')"
   dtml-call "r.append(_.getitem('sequence-item'))"
/dtml-if
  /dtml-in
  dtml-return r
/dtml-with



Dieter

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




Re: [Zope] Deinstalling Products?!

2000-07-03 Thread Jonathan

Are you sure you deleted it from the right place? Also, did you delete
it from the Products Management screen of the control panel?

Erhm, stupid me. No, I didn't try that, just removed the folder.

Thnx
Jonathan

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




Re: [Zope] Local user groups (Virginia)

2000-07-03 Thread Shane Hathaway

"J. Michael Mc Kay" wrote:
 
 Does anyone here know of a local (Virginia, Richmond, Fredericksburg area)
 ZOpe/Python users group?

You do know where Digital Creations is located, don't you?  You ought to
pay us a visit.  :^)

Shane

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




Re: [Zope] medusa question

2000-07-03 Thread Adam Karpierz

Where does medusa look for html files by default? I have regular old html
files that I'd like to make available without fiddling with Zope. Is that
possible?


Yes , but through use Medusa as standalone server.
Look at http://www.nightmare.com/medusa/index.html
Download http://www.nightmare.com/medusa/medusa-src-2601.tar.gz
and look at and /docs directory,  INSTALL.txt and especially, start_medusa.py.

Adam Karpierz
[EMAIL PROTECTED]




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




[Zope] Uh, I think I goofed (running as root)

2000-07-03 Thread Gary Shears


 
 Also keep in mind that Zope does not run as "root", so if you are
 running on a Unix-like system such as Linux, even if Zope were fully
 compromised an intruder would still have to find a security hole in
 something else before it's possible to write to arbitrary files.

I just checked the perms on zope, and it's owned by root. Started it, looked at
the processes owned by root (ps -u root) and 'python' shows up, with the same
PID as Z2.pid. Is there an easy way to fix this? 
Thanks in advance.
--gary

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




Re: [Zope] ZCatalog pointing to wrong object.

2000-07-03 Thread Dieter Maurer

Bart Holthuijsen writes:
  I have been having some problems with ZClasses and the Catalog.
  I made a new Catalogaware External Product, based mostly on the Boring and 
  Photo products. When I add an instance to a folder the Catalog is updated, 
  but doesn't point to the right object.
ZCatalog has a set of bugs.

You may find interesting information in the Collector

URL:http://classic.zope.org:8080/Collector

or in the zope mailing list archives (May 2000).

Search for "lexicon".


Dieter

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




Re: [Zope] calling standard_html_header from external methods

2000-07-03 Thread Dieter Maurer

Daryl Tester writes:
  Dieter Maurer wrote:
  
   The __call__ function of DTML methods gets the following
   arguments: client=None, mapping=None, **kw.
   
   You therefore may call it: "self.standard_html_header(self,REQUEST)"
   or "self.standard_html_header(None,REQUEST)".
  
  And what's the difference between passing in self or None?  What
  does the client parameter actually do?
When you pass 'None', the DTML method can only use the content
of REQUEST. If you pass "self", it can additionally use the direct
and acquired attributes of "self".



Dieter

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




Re: [Zope] MySQL transaction support (was: MySQL Select Statements)

2000-07-03 Thread Hannu Krosing

Andy Dustman wrote:
 
 There are two factors which determine whether or not transactions can be
 supported. Actually, there's only one, but it can't be directly tested
 for:
 
 1) If the server version (easily obtained upon establishing the
 connection) is  3.23.15, transactions are definitely not supported.
 
 2) If the database in use employs BDB tables, transactions are definitely
 supported.

AFAIK the transaction support is enabled on table-by-table basis, so
there 
is no way to know for sure if transactions are 
supported/partially-supported/unsupported for a particular set of
queries

 The problem is: Support for the transaction manager is done with a MixIN
 class, so the decision on whether or not transactions should be supported
 in the DA comes before the connection object is created. 

But after the connection is established you could probably change the
mixin 
class, at least if it is really a proxy wrapper of some other class.

Python is _very_ dynamic language.


Hannu

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




Re: [Zope] MySQL transaction support (was: MySQL Select Statements)

2000-07-03 Thread Andy Dustman

On Tue, 4 Jul 2000, Hannu Krosing wrote:

 AFAIK the transaction support is enabled on table-by-table basis, so
 there 
 is no way to know for sure if transactions are 
 supported/partially-supported/unsupported for a particular set of
 queries

True enough. There are several problems here:

1) We must avoid using BEGIN/COMMIT/ROLLBACK on servers  3.23.15 because
it will result in syntax errors.

2) We must raise exceptions whenever the DA attempts to use transacation
semantics and the database cannot fulfill this. Silently allowing the
transaction manager to believe ROLLBACK has succeeded when it is actually
doing nothing is a bad thing.

3) Even though the server may support transactions, the tables may not.
Calling ROLLBACK hopefully produces an error, which is a good thing.

4) Calling ROLLBACK in AUTOCOMMIT mode probably does not produce an error.
This is bad, but easily avoided by using BEGIN to force a transaction.
Does this cause MySQL to produce an error if the tables don't support it?
I don't know. Probably not.

IMHO, the only good way to avoid these problems is to effectively have two
DAs: A transactional one and a non-transactional one, perhaps determined
by a Zope property. The application designer will have to choose which DA
to use for a given application.

Note also: With non-transactional databases, you would expect to get
better performance by having several open connections which are not
shared. In the case of MySQL, each connection has it's own server thread,
and this can exploit CPUs, if available. However, connections should not
be shared on transactional databases, because transactions are tied to a
connection, and not a cursor. Even if there is a mutex to keep multiple
threads from executing queries simultaneously on the same connection, the
transactions are going to be whacky.

-- 
andy dustman   | programmer/analyst |  comstar.net, inc.
telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d
"Therefore, sweet knights, if you may doubt your strength or courage, 
come no further, for death awaits you all, with nasty, big, pointy teeth!"


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




Re: [Zope] basic FSSession question

2000-07-03 Thread Pavlos Christoforou

On Mon, 3 Jul 2000, Leichtman, David J wrote:


 overwrites
 the other data, implying that it's the same SessionUID. I thought that
 calling dtml-call FSSession from a different machine, would then 
 create a
 new session with the SessionUID stored on that machine. How, then, do 
 I get
 multiple sessions?

Yes it will create a new Session. I have not received such a complain in
the past so please check your setup carefully. If the problem persists can
you send me a description of your setup so I can try to recreate it?

 There seems to be a severe lack of documentation for FSSession.
 

Can you email me more specific suggestions as to where the docs need
improvement? 


Pavlos



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




[Zope] New for download: Image.py that is border-aware

2000-07-03 Thread Jon Franz

The subject says it all... no more dtml-var "foo.tag(border=0)" type
schtuff...

http://www.zope.org/Members/Coventry/Border_aware_image

Note: this was created, and tested, on Zope 2.1.6 - newer installations, or
those with modifications to thier Image.py file in
zope-home/lib/python/OSF should Not use the new file - they should compare
the file and apply the changes by hand to thier Image.py to avoid version
troubles.

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