Re: [Zope-dev] cut/paste catalogue aware zclass instances still broken in 2.20?

2000-07-23 Thread Terry Kerr

I had this problem with 2.1.6, but it seems to fix itself with 2.2.0.  I
think you must be having a different problem.  The problem with 2.1.6 was
to do with the copying of objects to the clipboard.  You were not able to
call absolute_url() on an object in the clipboard, and that cause problems
when cutting and pasting catalog aware classes since the index in the
catalog is done by the absolute url and so when unindexing, absolute_url()
is called.  However, the clipboard stuff has changed in 2.2.0 and the
problem seems to have been fixed as far as I can tell.

terry


"Dr. Ross Lazarus" wrote:

 Has anyone else noticed a problem with pasting cut or copied
 catalogue-aware zclass instances?

 The collector item #1371 I submitted on June 27 seems still to be
 present in 2.20 final - sorry, I don't have a patch...

 It's a function I need and duplicating it without using
 manage_pasteObject after a manage_cutObject is going to be painful.

 The manage_cutObject and manage_copyObject functions seem happy enough,
 but when I do a manage_pasteObject, I get "the object foobar does not
 support this operation" - no traceback.

 Zope-2.2.0 source on Redhat linux 6.1

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

--
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
ICQ: 79303381




___
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] ENHANCED PATCH: Expanded access file

2000-07-23 Thread Phillip J. Eby

I've further enhanced yesterday's patch with the following additions:

* "Short-circuit evaluation" of local roles in User.getRolesInContext().
This speeds up security evaluation for complex DTML by stopping the local
role search as soon as one of the desired roles is found.  The change is
fully backward compatible with any other usage of getRolesInContext()
(although there *arent'* any other usages in the Zope core).  (Note: this
change also prevents infinite recursion of local roles lookup when the
local roles are provided by a ZPatterns attribute provider which is owned
by a user who has the necessary roles to compute local roles.)

* Encapsulation fix.  The current version of Zope directly accesses
__ac_local_roles__ when checking access rights, which negates any ability
for Zope objects to provide rule-based local roles without computing all
possible roles for all possible users.

* Added "get_local_roles_for_user()" method to
AccessControl.Role.RoleManager that works with a user object, rather than a
user name.  This is to allow objects to supply computed local roles using
attributes of the user as part of their decision process.  An object need
only implement get_local_roles_for_user(user,roles) to carry this out.

These additions, in conjunction with the ability to add more users to the
"access" file, will allow ZPatterns and LoginManager to do without
'unownedness' and other convoluted alterations of the Zope security model.
They will also make it possible to add local role plugins to ZPatterns.

This is somewhat more tested than yesterday's variant of the patch,
although I have not found any bugs in what I posted yesterday.  The post
itself was flawed, however; this time I'm attaching it as a file in the
hopes of preventing that happening again.

If there are no comments/questions/feedback on it, I'd like to go ahead and
submit it to the Collector for inclusion in Zope CVS; as it will make
continued development of ZPatterns and LoginManager much cleaner and in
full compliance with the 2.2 security model.

As I move further into the development of local role plugin support for
ZPatterns, I may have additional patches to suggest, as there are some
other encapsulation/interface issues with the "get_local_roles()" method as
currently used/implemented in Zope.  Most likely, there needs to be a
"get_users_with_local_role()" method for those uses, leaving
"get_local_roles()" to mean "get *editable* local roles".  Also,
ObjectManager still inspects __ac_local_roles__ rather than going through
an interface to set the initial owner role of an object.  Personally, I
think this should be done by one of the many other after-add type calls
such as manage_afterAdd or manage_fixupOwnershipAfterAdd, etc., but
backward compatibility for that would be tricky.

Patch follows.


Index: AccessControl/Role.py
===
RCS file: /cvs-repository/Zope2/lib/python/AccessControl/Role.py,v
retrieving revision 1.39
diff -u -r1.39 Role.py
--- Role.py 2000/06/20 01:59:40 1.39
+++ Role.py 2000/07/23 18:46:03
@@ -365,9 +365,12 @@
 keys.sort()
 return keys
 
-def get_local_roles_for_userid(self, userid):
+def get_local_roles_for_userid(self, userid, roles=()):
 dict=self.__ac_local_roles__ or {}
 return dict.get(userid, [])
+
+def get_local_roles_for_user(self, user, roles=()):
+return self.get_local_roles_for_userid(user.getUserName(),roles)
 
 def manage_addLocalRoles(self, userid, roles, REQUEST=None):
 """Set local roles for a user."""
Index: AccessControl/User.py
===
RCS file: /cvs-repository/Zope2/lib/python/AccessControl/User.py,v
retrieving revision 1.112
diff -u -r1.112 User.py
--- User.py 2000/07/11 18:42:48 1.112
+++ User.py 2000/07/23 18:46:04
@@ -137,22 +137,27 @@
 """Return the list of roles assigned to a user."""
 raise NotImplemented
 
-def getRolesInContext(self, object):
+def getRolesInContext(self, object, findRoles=()):
 """Return the list of roles assigned to the user,
including local roles assigned in context of
-   the passed in object."""
-name=self.getUserName()
+   the passed in object.  If asked to find specific
+   roles, return true if any of the specified roles
+   is found, false otherwise.
+"""
+
 roles=self.getRoles()
+for r in findRoles:
+if r in roles: return roles
+
 local={}
 object=getattr(object, 'aq_inner', object)
+
 while 1:
-if hasattr(object, '__ac_local_roles__'):
-local_roles=object.__ac_local_roles__
-if callable(local_roles):
-local_roles=local_roles()
-dict=local_roles or {}
-for r in dict.get(name, []):
+if hasattr(object, 

[Zope-dev] DateTime.py

2000-07-23 Thread Steve Alexander

There's a problem with strftime() in DateTime.py.

Try this DTML method to see:


dtml-var standard_html_header
dtml-let time1="_.DateTime('2000/07/23 BST')"
  Time: dtml-var time1 br
  Time: dtml-var time1 fmt=Date br
  Time: dtml-var time1 fmt="DayOfWeek" br
  Bad Time: dtml-var time1 fmt="%a, %d %B %Y %Z" br
  Time: dtml-var "time1.fCommonZ()" br
/dtml-let

dtml-let time1="_.DateTime('2000/07/23 GMT')"
  Time: dtml-var time1 br
  Time: dtml-var time1 fmt=Date br
  Time: dtml-var time1 fmt="DayOfWeek" br
  Time: dtml-var time1 fmt="%a, %d %B %Y %Z" br
  Time: dtml-var "time1.fCommonZ()" br
/dtml-let

dtml-var standard_html_footer


Note that the time given in the line "Bad Time:" above is actually wrong
-- it reports itself to be in GMT, but gives the time as one hour
behind.

If you specify a date as /MM/DD, then the date that is stored is
(quite reasonably) midnight on that day, in your timezone.

This gets rendered back into days correctly for methods such as
DateTime.day(), as these methods directly ask the DateTime instance for
what it thinks the day is. The instance replies in the context of its
own timezone (as given in the constructor, or the local timezone if none
was given), and so it returns the expected result.

If you use the strftime() method, by using fmt="%d %H %Z" or whatever,
instead of asking the DateTime instance to do the formatting, the
formatting is delegated to the Python time module.

Unfortunately, at any particular time, the Python "time" module only
knows about two timezones: Your local one (with and without daylight
savings) and GMT.

Therefore, in any other timezones, Pythons time.strftime() cannot
correctly render the time.

This is particularly apparent in the current DateTime.py, because its
strftime method just interprets the internal representation of the time
as GMT, whatever.

We can fix this easily:

*** lib/python/DateTime/DateTime.py Sun Jul 23 20:03:05 2000
--- lib/python/DateTime/DateTime.old.py Sun Jul 23 20:03:04 2000
***
*** 1376,1382 
  return millis
  
  def strftime(self, format):
! return strftime(format, gmtime(self.toZone('GMT').timeTime()))
  
  # General formats from previous DateTime
  def Date(self):
--- 1376,1382 
  return millis
  
  def strftime(self, format):
! return strftime(format, gmtime(self.timeTime()))
  
  # General formats from previous DateTime
  def Date(self):


Now, at least, the time will be reported correctly, although not really
usefully if you want to have the time formatted in the timezone given to
the DateTime instance.

Also, this patch will cause formatting calls to create a new DateTime
instance if the instance you want to format is not in timezone GMT+0. 

The only general solution that I can see is to replicate the formatting
algorithms of the time module in DateTime.py, but written so that they
take account of timezones.


There is another issue:

When I call _.DateTime('2000-07-23'), what do I mean? 

The current implementation of DateTime interprets that as "midnight (the
earliest possible time) on 2000-07-23, interpreted in the local
timezone".

However, if I'm being naive, I might think that I'm refering to a Day,
and that the Day should be the same day no matter what timezone I put it
into.

In that case, the DateTime module needs rewriting to have a sense of
precision built into it: If I specify a time to the day, I get the
latter behaviour. If I specify the time more precisely, I get the
current behaviour.

Another approach would be to make _.DateTime('2000-07-23') mean Midday,
GMT rather than Midnight, local time. That would give the latter
behaviour for most timezones at most times; the exceptions being places
near the international date line that are in daylight savings time.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

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




Re: [Zope-dev] DateTime.py -- ignore the patch

2000-07-23 Thread Steve Alexander

Steve Alexander wrote:
 
 This is particularly apparent in the current DateTime.py, because its
 strftime method just interprets the internal representation of the time
 as GMT, whatever.
 
 We can fix this easily:
 
 *** lib/python/DateTime/DateTime.py Sun Jul 23 20:03:05 2000
 --- lib/python/DateTime/DateTime.old.py Sun Jul 23 20:03:04 2000
 ***
 *** 1376,1382 
   return millis
 
   def strftime(self, format):
 ! return strftime(format, gmtime(self.toZone('GMT').timeTime()))
 
   # General formats from previous DateTime
   def Date(self):
 --- 1376,1382 
   return millis
 
   def strftime(self, format):
 ! return strftime(format, gmtime(self.timeTime()))
 
   # General formats from previous DateTime
   def Date(self):
 
 Now, at least, the time will be reported correctly, although not really
 usefully if you want to have the time formatted in the timezone given to
 the DateTime instance.

No, no, no! 

Ignore the patch, it is a placebo :-/  
I should read these things back more carefully...


The bit about reimplementing time.strftime() in DateTime.py still holds
though.
 
--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

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




Re: [Zope-dev] DateTime.py -- ignore the patch

2000-07-23 Thread Steve Alexander

Steve Alexander wrote:
 
 No, no, no!
 
 Ignore the patch, it is a placebo :-/
 I should read these things back more carefully...
 
 The bit about reimplementing time.strftime() in DateTime.py still holds
 though.

In brief, though -- and hopefuly clearer this time:

If you format DateTimes using strftime (that is, fmt="%d %m" and so
forth), you can only have the time rendered in GMT.

This is confising the counter-intuitive, as the internal timezone of the
DateTime instance is not preserved.

The only reasonable way around this is to reimplement the strftime
function of Python's time module in DateTime.py, but have it take
account of timezones.

As another issue, when you create a new DateTime instance with
_.DateTime('-MM-DD'), the actual time stored is midnight in your
local timezone. A more useful default time would be midday, GMT. This
shouldn't break much code, as the current behaviour isn't well
documented and is arguably broken anyway.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

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




[Zope] Announce: WiFLZ Simple Widget Framework for Zope

2000-07-23 Thread Andrew Kenneth Milton

Greetings once again,

This is the start of the Widget Framework for Zope.

http://www.zope.org/Members/TheJester/WiFLZ/

It's an attempt at building something for re-use slightly more cohesive
than methods and documents, and slightly less cohesive than Products and
ZClasses.

README Excerpt:


WiFLZ is a dtml widget framework for Zope. If you are a programmer, you
will probably hate it. It's not called ZWiFL because I was sick of things
starting with Z d8)


Summary
===

o Widgets consist of; 
   - header, body, and footer dtml,
   - optional arguments for the dtml template,
   - sql query,
   - optional arguments for the sql template, and
   - description field for built-in 'help' facility.

o Widgets can be tested from the management interface.
o Widgets can be ZODB backed, DB backed, or both.
o Widgets can be optionally rendered to a DB effectively caching widget 
  states, which is useful for slow changing, or time consuming things such
  as reports.
o Cached Widgets have a configurable TTL.
o DB Backed widgets can be grouped into different libraries, and
  can be called from specific libraries allowing test widgets to be setup
  without compromising production widgets.
o DB Backed widgets can be edited from any Zope installation with access
  to the DB.


Purpose
===

This is part of a broader system for site design still under development.

Zope currently lacks a mid level 'reuse' facility, reuse is limited to
very fine grained (individual methods, and documents), or very coarse grained
(products) elements.

Content managers also like to be able to 'build' components that can be
used in different parts of the site, and they like to be able to 'hold'
those components.

This system does not remove the ability to have fine grained reuse, as
all of the dtml stored is resolved, so any methods you have developed can
be used in a widget (e.g. incorporating ZBabel translations into widgets).

-- 
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 ABN: 83 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 )




Re: [Zope] re: Meta Type Registry

2000-07-23 Thread Steve Alexander

Andrew Kenneth Milton wrote:
 
 +[ Steve Alexander ]-
 | Andrew Kenneth Milton wrote:
 | 
 |  Is there a Product Builders meta-type registry somewhere?
 | 
 |  I can see things getting messed up in the near future as the number of
 |  products proliferates and meta-types start to clash.
 |
 | I just tried adding a new ZClass in a new Product in my Zope 2.2 final
 | installation.
 |
 | The multiple-selection widgit for choosing the base-classes has all the
 | available meta-types prefixed with the name of their product, followed
 | by a colon.
 
 I'm not sure that Zope will actually let you successfully register two
 classes or baseclasses with the same meta-type... 

The meta-type is further qualified by the name of the Product. This
works without a problem if you're writing Python products, but there are
some difficulties if you want to have two ZClasses with the same name.

We can do a short experiment using ZClasses to check this. I'm using 2.2
final.

First of all, install the patch I posted to the Zope list last night.
That is, with lib/python/OFS/main.dtml at line 98 change this:

  dtml-in filtered_meta_types mapping sort=name
OPTION value="dtml-var action fmt="url-quote""dtml-var name
  /dtml-in

to this:

  dtml-in filtered_meta_types mapping sort=name
OPTION value="dtml-var action fmt="url-quote""
   dtml-var product missing:dtml-var name
  /dtml-in


Next, create a new Product from the management interface. Let's call it
"TheClash".

You can add a ZClass called DTMLDocument, meta-type "DTML Document" with
no problem.


In the Product "TheClash", create a new ZClass called "Casbah". Keep the
box "create constructor objects?" checked, but don't worry about adding
any base-classes.

Now, create another new Procduct called "Morocco". Within it, create a
new ZClass "Casbah".
If you leave the box "create constructor objects?" checked, you'll find
that creating the class fails with an error: "The permission Add Casbahs
is already defined."

However, you can create a ZClass "Casbah" in product "Morocco" if you
uncheck the box "create constructor objects?". This isn't too much of a
problem because it is easy to create our own custom permissions for
ZObject constructors. I won't bother doing that now. We can borrow the
other Casbah's permissions if we need to.

The new "Morocco: Casbah" won't show up in the "add" list yet, because
there is no Factory for it. Let's create a Factory in the Product
"Morocco", with id "Casbah_factory", title "Casbah factory".

For now, it doesn't matter what "Initial method" is set to. Leaving it
as "Help" will be ok for the purposes of this exercise.

The problem comes with what we put in the "add list name" field. If we
put in "Casbah", we get an error "The type Casbah is already defined".
We can put in "Casbah2" though, and that works.

Of course, is isn't practical if you simply want to use someone else's
Product on your Zope installation, and you already have a ZClass
meta-type defined that clashes with one in the new Product.

I just peeked at the source for this system
(lib/python/App/ProductRegistry.py, line 130 or thereabouts). The
Product Registry seems to add new meta-types based on the meta-type
alone, whereas they should be organised by a (product, meta-type) tuple.
This would fit with the way product constructors are called, for
example: "manage_addProduct/Morocco/Casbah_factory".

I won't produce a patch for this just now, as I'm not sure what other
parts of Zope are dependent on the current behaviour of not allowing
meta-type clashes in ZClasses. I do not think it would be hard to
improve the current behaviour.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
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: Meta Type Registry

2000-07-23 Thread Andrew Kenneth Milton

+[ Steve Alexander ]-
| Andrew Kenneth Milton wrote:
|
|  I'm not sure that Zope will actually let you successfully register two
|  classes or baseclasses with the same meta-type... 
| 
| The meta-type is further qualified by the name of the Product. This
| works without a problem if you're writing Python products, but there are
| some difficulties if you want to have two ZClasses with the same name.
| 
for item in cat.objectValues():
if item.meta_type == "Category":

What about code like this ? While this one is explicitly searching for 
sub objects, I have code that searches the acquisition path for 
known meta_types, if someone else has a product with a meta_type I think
is mine, then bad things can happen... Cataloging also might cause an issue.

-- 
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 ABN: 83 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 )




Re: [Zope] An observation about manage_* methods

2000-07-23 Thread Dieter Maurer

albert boulanger writes:
  
  def manage_editData(self, data, REQUEST=None):
   """Change item data"""
  self._rows = map(self._FixRow, ImportExport.ImportData(data))
  self._n_rows = len(self._rows)
  
  self._GenerateIndex()
  
  return self.manage_editedDialog(REQUEST)
  
  
  Now there is an assumption in this code that the editing context that
  this is being called from is some manage_ method, hence returns like
  "return self.manage_editedDialog(REQUEST)". This is annoying if you are
  writing a user-managed content method that does not wants the user to
  see the manage interface because eventually it goes to one with such
  returns. Instead, I would like to have control on where he/she returns
  (often to the method I wrote or to  index_html). I could do a
  dtml-call "RESPONSE.redirect..., but the return
  self.manage_editedDialog(REQUEST) gets in the way. Am I overlooking
  something or is this a weakness in this design pattern for management?
  I could wind up making my own version of manage_editData that does not
  do the return self.manage_editedDialog(REQUEST). (I know some code at
  least conditionalizes this to the presence of REQUEST.)
Many methods use:

if REQUEST is not None:
  do something: e.g. redirect or return

In this case, you simply do not pass REQUEST.

If you find a method that is not conditional on "REQUEST",
use "dtml-call". This will discard the return value and
should work, unless the code raises an exception.
Maybe "try/except" can be used to handle the exception.



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] all DTML Methods of current folder and subfolder

2000-07-23 Thread Dieter Maurer

Jerome ALET writes:
  Please do you know how to pass a "complex" obj_expr parameter to the
  ZopeFind call ?
  
  I want to do the following loop in Zope 2.1.6:
  
  dtml-in "ZopeFind(this(), obj_metatypes=['Folder'], search_sub=1, obj_expr=XXX"
  
  where XXX is "not objectValues(['Folder'])"
  
  this would recursively find all subfolders which hasn't got any 
  subfolder from the current folder.
  
  What is the correct syntax (', " and """ nesting) for that ?
You cannot use " or """ because this would confuse the
dtml-parser.

You can use:
  ... obj_expr='''not objectValues(['Folder'])''' ...
or
  ... obj_epxr='not objectValues[\'Folder\']=' ...


Dieter


PS: It was a question about escapes in Python.

___
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] Another Digest Complaint

2000-07-23 Thread Dieter Maurer

Zope mailing list digests are a real pain!

My latest bad experience:

 * on Jul 20, the digest contained a message from Felipe E Barousse Boue
 * I answered it on Jul 20
 * today, the digest contained my answer and *AFTER* my answer
   Felipe's message *AGAIN*.


I often realize that digests contain messages out of order,
e.g. where the answer precedes the question.
This is very confusing.


PLEASE update mailman!

As someone in the list told us, the current mailman version
works much better than the (apparently) old version used
for the Zope mailing lists.



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 )




[Zope] Announcement: Znolk 0.1.1

2000-07-23 Thread Philipp Auersperg

I've uploaded Znolk 0.1.1 to http://www.zope.org/Members/zwork with minor bug fixes 
and added support for ZPoPy connections.

Important hint:


At the third screen of the wizard where you select the columns you MUST select at 
least one column as 'Primary key' because Znolk needs the PK to identify the record to 
be edited. Otherwise you get the following error message when clicking the 'edit' link 
in the BrowseReport:

Error Type: OperationalError
Error Value: ERROR: parser: parse error at or near "" 

Philipp Auersperg 


___
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] ANN : ZAnnu a multi-agencies searchable directory

2000-07-23 Thread Didier Georgieff

Hello,

I've uploaded a first working version of ZAnnu.

At the moment ZAnnu is an ugly thing  ... and ... a multi-agencies searchable 
directory (people and organizations) based on MySQL.

This is a first try to learn  experiment Zope  ZSQL while making a product i 
could use in a real project. So it will be improved and have a better design in 
the near future.

It's easy to use by only putting a dtml-var rechercheBoite tag (sorry for the 
french, it will change soon).

More informations at :

http://www.zope.org/Members/dgeorgieff/ZAnnu

I would be really glad to have any comment, feedback about the structure, 
the coding and especially about the feature you would like to see in ZAnnu.
Contributions, and patches are more than welcome.

Didier Georgieff.
 

___
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] ZServer Statistics

2000-07-23 Thread J. Atwood

At 8:31 AM -0700 7/21/2000, Demos Economacos wrote:
Is there way to determine how many (and which)pages
ZServer serves? I am running ZServer as my primary
server. What kind of statistics should I be looking
for?

Zope writes to a log file called "Z2.log" which in log terms is a 
"combined log file" format. You should be able to run any log 
analysis package against it and get most of the information you want. 
If you want to pay for a GUI go for Webtrends, otherwise you can use 
very powerful and free Analog (http://www.analog.cx) which can be 
customized to do almost anything.

For example should I be concerned about how long it
takes to load pages, and how long users stay on a
specific page etc?

For that kind of information you need to do some pretty tricky 
mathematics that are not always very accurate.

J

___
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] FAQ Wiki and What happend @ O'Reilly Conference

2000-07-23 Thread Gregory Haley

Fiona,

Just looked at the zope.faqts.com site and think it looks like a good
start.  I have only recently started using zope, and I have been amazed
at the steepness of the learning curve.  Sometimes it feels like a solid
and very vertical wall!  There have been many times when a good faqts
file would have been really useful.  

Thanks for your contribution.

ciao!
greg.

Gregory Haley
venaca.com




Fiona Czuczman wrote:
 
 Hi Alan,
 
 A couple of weeks ago I wrote to the list regarding setting up a FAQ for
 zope.  It is in the beginning stages -
 
 http://zope.faqts.com
 
 I've been busy so have only got so far as adding 11 questions.
 
 Take a look at http://python.faqts.com to get an idea on how the zope
 knowledge base could be developed, it has taken me two months to get the
 python knowledge base to the level it is at now, more than 700 questions
 with answers.  I'm developing the python list be summarizing the
 newsgroup daily, for zope I'm intending on also working on this daily.
 I had a major project which I finished about 2 hours ago :-) ... as a
 relief I decided to start on the zope work, where I've found your mail.
 
 I'm not interested in creating something in direct opposition to what
 you are suggesting.  Is there some way that we could work on this
 together, either together creating zope.faqts.com or my helping with
 http://www.zope.org/Members/runyaga/ZopeFAQs/FrontPage ?
 
 Things I like about FAQTs
 
 - the hierarchy of folders (information)
 - the ability to create folders and arrange content
 - the possibility to edit answers and maintain a version history
 - the admin stuff (for sending out summaries back to the mailing list)
 - ability to search questions and answers (works really well)
 
 This work I am doing 'off my own bat', FAQTs does pay me for python but
 _not_ zope, so I am able to do it somewhere else.  Because I already
 have a mode of working off the FAQTs site it seemed reasonable to start
 the zope knowledge base off that site.  But, mails like yours make me
 think about fragmenting resources and how useless that is, especially
 now when it seems resources are limited.
 
 Now, before I get too far into it, I want to make sure I've made the
 right decision... I don't want to compete with zdp.zope.org or with what
 you are suggesting.
 
 So, I want to help but where?
 
 Could we help each other: share questions and answers for all locations?
 Therefore taking advantage of the different features of the different
 sites?
 
 Is that a ridiculous suggestion? Perhaps initially it would work ...
 later re-assess?
 
 Otherwise, I'll work off whichever site the community would prefer... so
 community, please respond :-)
 
 Thanks,
 
 Fiona
 
 ___
 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] new LocalFS version 0.9.5

2000-07-23 Thread Jonothan Farr

It's been a while since the last LocalFS release. I wanted to fix a couple
of major issues for the next release but I'm a little stuck. I decided to
post a minor bug fix release instead.

This release fixes the following issues.

 - Fixed bobobase_modification_time.

 - Fixed cross-platform bug calculating object id in manage_upload.

 - Added optional 'id' parameter to manage_upload to allow the
   caller to specify the new object id.

 - Added optional 'action' parameter to manage_upload to allow
   redirecting somewhere other than the default 'manage_workspace'.

It is available at:

http://www.zope.org/Members/jfarr/Products/LocalFS

I've also posted my to do list at:

http://www.zope.org/Members/jfarr/Products/LocalFS/todo

So now you can see what I'm working on and what I've done for the next
release at any given time.

Enjoy!
--jfarr



___
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] REQUEST a string object?

2000-07-23 Thread Rob Miller

Arrggh!  I'm getting very frustrated trying to accomplish something that should
be easy.  I'm stepping through all of the files in a LocalFS directory, and I
want to dynamically create a table that displays all of the sub-directories
of the current directory.  I want to inject a "/trtr" every so often, so I
need to count the number of directories I've found so far to see whether I need
to start a new row or not.

I've spent a few hours digging through the list archives, so I know that
creating a manually managed counter variable is not a straightforward affair. 
Here's the code that I have:


table
dtml-call "REQUEST.set('ctr', 0)"
dtml-in "fileValues(REQUEST.get('spec', _.None))"
  dtml-if "type == 'directory'"
dtml-if "ctr % num_dir_columns == 0"
  tr
/dtml-if
a href="dtml-var URL1/dtml-var url"dtml-var "id"/abr
dtml-if "ctr % num_dir_columns == num_dir_columns - 1"
  /tr
/dtml-if
dtml-call "REQUEST.set('ctr', _.int(ctr) + 1)"
  /dtml-if
/dtml-in
dtml-comment In case we end in the middle of a row... /dtml-comment
dtml-if "ctr % num_dir_columns != 0"
  /tr
/dtml-if
/table


The error I get, running Zope in debug mode, is this:

   Error Type: AttributeError
   Error Value: 'string' object has no attribute 'set'

This is referring to the dtml-call line in the middle of the loop, the one
that actually does the incrementing.  It thinks that REQUEST is a string, which
of course doesn't have a "set" attribute.  I've been banging my head on this
all day and can't come up with an way to accomplish this trivial task.  I don't
want to push this into Python; this is simple UI code, not business logic, so
it doesn't belong there.  Besides, it's absurd to think that I would need to
write an external method or some other Python method to do something as simple
as this.  (It may end up being true, but it's still absurd... ;-) )

Any help would be greatly appreciated.

thanks for your time,

rob

___
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 and squishdot newbie question

2000-07-23 Thread Sean Kelley

I have created a catalog and added my squishdot site to it.  However,
when I go to look at the catalog contents there are no squishdot
articles listed (the suishdot site object is listed though).  When I run
a search for a keyword that I know is in the squishdot object, I get no
matches (but do when I search for other non-squishdot keywords).  I
thought this may have something to do with running squishdot 3.1 so I
upgraded to 4.1, reindexed and still nothing.  What could be the
problem?  I heard somone say something about your catalog cataloging
itself (mine does)- should it do this?  I tried removing it but nothing.

--
Sean Kelley





___
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] anyone seen browsers map '_' to '+AF8-' ?

2000-07-23 Thread Anthony Baxter

We're seeing a really strange occasional error crop up in our
web logs - periodic requests for an image with an _ in the name
(e.g. hdr_left) get mutilated to hdr+AF8-left. Out of the last
400,000 requests, there's been about 110 of these errors. There
appears to be nothing much in common in the requests, except that
the browser is always a variant of IE 5.0 (not 5.01, 5.5, or 4.0,
or anything else). IE 5.0 only makes up 35% of our hits, so it's
unlikely to be just random chance.

Ones we've seen with it:
Mozilla/4.0 (compatible; MSIE 5.0; Windows 95)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; OZEMR1999V01)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; ZDNetSL; DigExt)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Chariot)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; TUCOWS)
Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)

Has anyone seen anything similar? I've searched the web, microsoft.com (ha), 
all to no avail. It's not a very common bug, but it's a significant
proportion of the total errors on the site, so it'd be nice to nail it.

ta,

Anthony

--
Anthony Baxter [EMAIL PROTECTED]
It's never too late to have a happy childhood.

___
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 and squishdot newbie question

2000-07-23 Thread George Donnelly

i'm a bit of a newbie myself so take my advice with a grain of salt, but...

you shouldn't need to create a Catlog and then put your Squishdot site in
it. The main squishdot site *is* a Catalog, or has Catalog-like qualities.
(i think).

if you want to be able to search the Squishdot site *and* other stuff you
should be able to select the Squishdot site as well as whatever other
Catalogs you have when you add a Z Search Interface.

hth

Regards,
GEORGE DONNELLY
[EMAIL PROTECTED]
http://cyklotron.com/
The man who follows the crowd will usually get no further than the crowd.
The man who walks alone is likely to find himself in places no one has ever
been. --Alan Ashley-Pitt

 I have created a catalog and added my squishdot site to it.  However,
 when I go to look at the catalog contents there are no squishdot
 articles listed (the suishdot site object is listed though).  When I run
 a search for a keyword that I know is in the squishdot object, I get no
 matches (but do when I search for other non-squishdot keywords).  I
 thought this may have something to do with running squishdot 3.1 so I
 upgraded to 4.1, reindexed and still nothing.  What could be the
 problem?  I heard somone say something about your catalog cataloging
 itself (mine does)- should it do this?  I tried removing it but nothing.


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