Re: [Zope-dev] Proposal: Improving ZSQL Methods

2002-10-17 Thread Adrian Hungate
Hmm...

(a) Is a great idea
(b) How would this work in practice?

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

- Original Message -
From: Andy McKay [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 17, 2002 11:07 PM
Subject: [Zope-dev] Proposal: Improving ZSQL Methods


 I've put up a proposal I'd like to put into 2.6.1 or 2.7, whichever is
next.

 Summary: Change ZSQLMethods to allow a user to a) change the database
 connection without changing the object and b) use standard cache
managers.

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

 Any comments or ideas welcome.

 Cheers.
 --
   Andy McKay
   www.agmweb.ca



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



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



Re: [Zope-dev] Zope RPMs/debs and Linux FHS

2002-10-13 Thread Adrian Hungate

This looks GREAT!!

A couple of points:
*) Python 2.2.x ?? This is scheduled for Zope 3 ?? Is there any way this
could find its way in to a 2.x release?
*) Byte compiling: Why not schedule an 'at' job to do the byte compile?
*) Ownership/perms on the 'var' dir, this will need to be the same as the
user Zope runs as, which I assume is not the same as ${zopeuser}

Minor personal request:
*) Is there any way to detect if apache is installed, and have zope run as
the apache user? This would be great for CGI support, etc.

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

- Original Message -
From: Chris McDonough [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, October 12, 2002 11:28 PM
Subject: [Zope-dev] Zope RPMs/debs and Linux FHS


 Hi all,

 I am working towards a unified Zope configuration and installation
 system on a branch of Zope named the 'chrism-install-branch'.

 I have given the buildout process on that branch the ability to create
 an RPM distribution of Zope.  I intend later to give the buildout
 process the ability to create Debian .debs as well and maybe Solaris
 packages...  I am doing this with the expectation that we might be able
 to provide RPM and .deb distros of Zope from zope.org instead of our
 current generic Linux as tarball distro.  I haven't looked yet at the
 Debian packaging of Zope (by Gregor Hoffleit), but I intend to do that
 next to get some more ideas.

 I know there are already at least two flavors of Zope RPMs which Jeff
 Rush helped to package.  There are a number of differences between the
 packaging of the RPMs generated by my branch and the packaging of Jeff's
 RPMs:

 - One of Jeff's distros breaks Zope up into many different packages,
   while another installs it as one or two.  Mine only has one
   distribution flavor: a single package.

 - Jeff's puts some stuff into the current prevailing python's
   site-packages directory and some other stuff into /usr/share/zope.
   Mine puts nothing into site-packages, and installs all Zope software
   into /opt/zope.

 - Jeff's creates an INSTANCE_HOME in /var/zope.  Mine creates an
   INSTANCE_HOME in /var/opt/zope.  I don't know if this is the right
   thing but in reading the Linux FHS, it advises to not create
   subdirectories of var directly... so I don't.

 - Jeff's puts pid files into /var/run, while mine creates pid files
   directly in INSTANCE_HOME/var.

 - Jeff's puts log files into /var/log while mine puts them into
   INSTANCE_HOME/var.

 I am wondering if:

 - anybody has opinions on the packaging layout.  Why is it advantageous
   to have many packages rather than one?

 - anybody has any opinions of where Zope files distributed via RPMs and
   debs should really go, especially wrt to the Linux FHS.  I'm not sure
   there is a right answer, but I don't know beans about this, so I
   figure I'll ask.  A file named 'Zope.spec.in' is attached to this
   email which is the input file to create a Zope RPM spec file during
   the make process, to give a better idea of how this works.

 Thanks!

 - C




___
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] Slow zope on windows 2000?

2002-08-28 Thread Adrian Hungate

From: [EMAIL PROTECTED]

 Hello,

 I have a question for you zope administrators out there :
 What are your experiences whith zope running on Windows NT/2K? No matter
 what I try , zope will run significant faster on a Unixlike system
 (with the same hardware), especially when working alot with the ZCatalog.

Very much so! On a Win2k with Dual P3 1Ghz Zope runs slower than the same
install on a Linux box with 1 P133  (I have tested this on multiple
different configurations and every time it comes out the same)

 Do you guys have any proposals how to make zope run faster on windows?
 My own experience is also that zope runs faster with the start.bat way
 instead as a Windows NT Service. Strange, because I tried several numbers
 of threads with both ways with the same startup parameters.

I have yet to find any platform independant product that runs faster on
windows. The only things on windows that are faster are programs that use
windows specific APIs (Mainly designed to _prevent_ platform independance).

Best bet:- Go get a £300 ($450) pc and install Linux on it and use your
Windows box for what windows is good at (Sugestions anyone???) - This is
what I did, and the results were not at all disappointing.

 Thnx in advance,


Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk



___
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] Slow zope on windows 2000?

2002-08-28 Thread Adrian Hungate

I wouldn't say so. I used to run Zope on a Win2k A/S and the perf was not
noticably better than on a similar Pro machine.

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

- Original Message -
From: Arndt Droullier [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 28, 2002 8:12 PM
Subject: AW: [Zope-dev] Slow zope on windows 2000?






  This, however, is almost an order of magnitude difference, and may need
  further investigation...
 
  Adam
 

 There´s also a difference between Win2000 and Win2000 Server. The Server
 version is optimised for network and system operations(thread/memory
 allocation) and really much faster than the normal edition.
 I suppose you will have a magnificant performance difference with Zope on
 these two systems.

 Arndt


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



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



Re: [Zope-dev] Bug Day 8/02 recap

2002-08-15 Thread Adrian Hungate

From: Dieter Maurer [EMAIL PROTECTED]
 Matt Behrens writes:
   Zope Bug Day August 2002 was an unqualified success, with our largest
   bug total squashed to date: 45!  The number of still-open collector
   issues dropped by almost 25%.  Thanks to all those who participated!
   ...
 I want to note that I am *very* pleased with recent Collector activities!


 Dieter

Yeah! Of course, I forgot it was a bug day, and I saw the collector
mailbombing me - I was about to file a bug report on it, I couldn't believe
that much activity was genuine! :)

Good work guys!

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk



___
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] A Modest Proposal Concerning Monkey Patches

2002-08-14 Thread Adrian Hungate


 Again, monkey patching doesn't modify source code, so I don't know
 what would be getting written into tmp.

  Comments?

 Didn't someone else make a proposal (with code) to handle this?
 Was it PatchKit?

Yup, and it is more than a proposal, it is a full blown product (
http://www.zope.org/Members/haqa/PatchKit ) with some patches already in it
(They can be removed if you wish).

There is a fledgling API, though I probably need to document it better, make
some unit tests etc, but it is there, and it works (For me... YMMV).

 But yes, some standard would be helpful, possibly with supporting
 utilities, to allow multiple monkeypatches coexist, I think.

 On the other hand, in Zope3 you just change the zcml files...although
 I think there was a discusion of an analogous issue there (coexistence
 of multiple modifications to the same area) and I'm not sure
 a conclusion was reached (but I can't remember for sure).


Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk



___
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] A Modest Proposal Concerning Monkey Patches

2002-08-14 Thread Adrian Hungate

Hmm... ok, now I see what you are talking about, however, you are talking
about modifying a DTMLFile object - I am not sure of any reliable API (Or
even magic) that will allow that to happen in a play nice with others way.

Just for clarity's sake (For me if no-one else), what object type are you
wanting to change manage_main for?

I have to admit to not knowing zshell or external_editor well, but I have
seen mentions of ee making changes to the ZMI - I had assumed this was the
addition of tabs (And DTMLFiles), not the replacement of them. I take it I
was wrong in this assumption?

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

- Original Message -
From: Jim Penny [EMAIL PROTECTED]
To: Adrian Hungate [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, August 14, 2002 3:34 PM
Subject: Re: [Zope-dev] A Modest Proposal Concerning Monkey Patches


 On Wed, Aug 14, 2002 at 08:46:41AM +0100, Adrian Hungate wrote:
  
   Again, monkey patching doesn't modify source code, so I don't know
   what would be getting written into tmp.
  
Comments?
  
   Didn't someone else make a proposal (with code) to handle this?
   Was it PatchKit?
 
  Yup, and it is more than a proposal, it is a full blown product (
  http://www.zope.org/Members/haqa/PatchKit ) with some patches already in
it
  (They can be removed if you wish).

 Nope... we have been down this path before.  Note this what I need (see
 below on why) requires modification, and not simple replacement, of
 whatever code is currently running.  As far as I can see, Patchkit does
 nothing to make this possible.

 The problem is that A) monkey patches may or may not
 have been applied before a given product sees anything, and B)  there is
 no reasonable way to discover what (or even if) patches have been
 applied by other products.

 If you are going to go down the monkeypatch path, then there needs to be
 some way for other monkeypatchers to discover what you have done, so
 that they can decide if they can 1)  extend your code to be compatible
 with theirs, 2) refuse to install their code, or 3)  blow your
 pre-existing code away.

 Current monkeypatch code always does 3.  Patchkit has, as far as I can
 tell no way to make 1 or 2 easier.  It just makes it easier to blow
 other people's work away!

 Background:  I am debian maintainer for zope-zshell.  The debian release
 is currently a version behind.  I have been holding off updating it
 because I would like the ZMI box.  I cannot modify manage_main.py
directly,
 because it belongs to the zope package and the changes would be blown
 away on any upgrade of zope.  I was starting to turn it into a python
 product, but zope-externaleditor has been packaged, and it monkeypatches
 manage_main.  The naive thing to do would be to install it as a
 monkeypatch.  But then, either I blow away externaleditor, or
 externaleditor blows away zshell, depending on the order in which zope
 installs products on startup.  There are several other products that
 monkeypatch manage_main as well, building a nice mutual destruction
 club.

 Jim Penny

 PS:  I would also like to hear general responses to Jerome's proposal.
 Clearly this was not an API, no arguments have been specified.  But is
 there a general consensus that this is a reasonable thing to do?
 Please, if it isn't to late, could we make it a 2.6 thing?

 
  There is a fledgling API, though I probably need to document it better,
make
  some unit tests etc, but it is there, and it works (For me... YMMV).
 
   But yes, some standard would be helpful, possibly with supporting
   utilities, to allow multiple monkeypatches coexist, I think.
  
   On the other hand, in Zope3 you just change the zcml files...although
   I think there was a discusion of an analogous issue there (coexistence
   of multiple modifications to the same area) and I'm not sure
   a conclusion was reached (but I can't remember for sure).
  
 
  Adrian...
 
  --
  Adrian Hungate
  EMail: [EMAIL PROTECTED]
  Web: http://www.haqa.co.uk
 
 



___
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] A Modest Proposal Concerning Monkey Patches

2002-08-14 Thread Adrian Hungate

Hmm... that is not good. I can't see you getting an API to change a DTML
file. The only option would be to create the ObjectManager's contents page
from python, and people seem not to like doing that, but it would allow a
little more engineering to take place.

Hmmm...

It looks as though what is needed is fish-bowl proposal to redesign the way
ObjectManager handles and displays rows for specific object types - the
requirement being that this be third-party-pluggable (For want of a better
term). (No that was not me volunteering - too much on at the moment, sorry).

One question about zshell though, what is the box that is added left of the
add product pulldown? Is it something that ABSOLUTELY has to be on the
contents listing (i.e. something to do with creating or maintaining the
objects listed?). Could it be backdoor'd into all_meta_types so that it,
itself is listed in the pulldown, or could it have a ZMI tab of it's own
(Both of these are easier than live patching the DTML)?

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

- Original Message -
From: Jim Penny [EMAIL PROTECTED]
To: Adrian Hungate [EMAIL PROTECTED]
Sent: Wednesday, August 14, 2002 4:26 PM
Subject: Re: [Zope-dev] A Modest Proposal Concerning Monkey Patches


 On Wed, Aug 14, 2002 at 03:48:51PM +0100, Adrian Hungate wrote:
  Hmm... ok, now I see what you are talking about, however, you are
talking
  about modifying a DTMLFile object - I am not sure of any reliable API
(Or
  even magic) that will allow that to happen in a play nice with others
way.
 
  Just for clarity's sake (For me if no-one else), what object type are
you
  wanting to change manage_main for?
 
  I have to admit to not knowing zshell or external_editor well, but I
have
  seen mentions of ee making changes to the ZMI - I had assumed this was
the
  addition of tabs (And DTMLFiles), not the replacement of them. I take it
I
  was wrong in this assumption?

 yeah, externaleditor inserts icons into many rows of the name column.
 zshell want an extra text box to the left of the add product pulldown.
 There are other products that do similar things.  I think the Photo
 product modifies things in a similar manner to externaleditor.
 These are, I suspect, not even at the object stage.  You have to modify
 rows in a table.

 Jim



___
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] A Modest Proposal Concerning Monkey Patches

2002-08-14 Thread Adrian Hungate

On Wed, 14 Aug 2002, Jim Penny wrote:

[Snip]

  It looks as though what is needed is fish-bowl proposal to redesign the way
  ObjectManager handles and displays rows for specific object types - the
  requirement being that this be third-party-pluggable (For want of a better
  term). (No that was not me volunteering - too much on at the moment, sorry).
 
  One question about zshell though, what is the box that is added left of the
  add product pulldown? Is it something that ABSOLUTELY has to be on the
  contents listing (i.e. something to do with creating or maintaining the
  objects listed?). Could it be backdoor'd into all_meta_types so that it,
  itself is listed in the pulldown, or could it have a ZMI tab of it's own
  (Both of these are easier than live patching the DTML)?
 
  Adrian...

 It needs a place to type a command, that is, it is a free form text box.
 That is, zshell gives zope a CLI.  Historically, you have had to click
 on something to get to the CLI.  If it is made part of the ZMI, then the
 CLI is part of every management window, with no extra work needed to use
 it.

 What is needed is to insert a form with a single textbox as element.

 This seems to be a hard problem.  Introducing monkeypatches, has, in my
 opinion made it harder, before people would have simply given up.

Hmm, the more you describe this, the less the ObjectManager's contents
view seems quite the right place for it. If the relationship to
the current ObjectManager is required, then what is the problem with a ZMI
tab (Titled zShell or Command Line or whatever). This could easily be
implimented, would survive upgrades, and (To me at least) would be a more
logical interface.

 Jim

 
  --
  Adrian Hungate
  EMail: [EMAIL PROTECTED]
  Web: http://www.haqa.co.uk


--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk


___
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-Coders] Re: [Zope-dev] DTML and REQUEST data changesabout to be checked in

2002-08-12 Thread Adrian Hungate

I'd like to second this. It was one of the contibuting factors in the
decision of my former employers to opt for spectra instead of a Zope
solution (That already existed!!).
  I, in contrary, appreciate the openess and fast response with
  respect to security problems.
 
  I do not install most hotfixes because the vulnerabilities do not
  affect our sites but it is a good feeling that there are fast
  fixes when this would be once the case.

 In some way we need to make it clear that most hotfixes don't matter for
 most sites.  A lot of hotfixes ensured that users who could write DTML
 couldn't get extra privileges.  They really only mattered for sites like
 zope.org, where anyone with an email address is allowed to write code
 that will be executed directly on the server.  But:


You are exactly right... but... The problem is not one of clarity of
labling, it's one of targetting: The people that actually make this level of
decision (i.e. board level execs) are not techies, and are just not
interested in _why_ the fix is needed, or in _what_ technical problem it
fixes, but that ZC (visibly) releases 'n' fixes per month for Zope, while M$
(visibly) releases less than that number per year for IIS/ASP - Therefore,
Zope must be the less stable/reliable product etc?

The logic is flawed, we all know that, but who is volunteering to visit
every companies senior execs worldwide and spend the time to make them care
enough?

The hotfixes, and new releases need to be marketted (I use that word
loosely) quite differently, new releases are A Good Thing(tm), while the
fixes need to be under the hood where the execs won't be bothered by them,
but the techies can find them when they need them.

I appologise, in advance, for the sweeping generalization that all execs are
like Dilbert's pointy-haired boss, but some really are!

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk



___
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] Removing the acquisition wrapper from an object(Python script)

2002-08-02 Thread Adrian Hungate

Why do you say it will not always work?
What situations might cause it not to work (Assuming that we already know
that the object is acquisition wrapped?)

Also, is there any hope of the documentation for acquisition being fleshed
out a little and brought up to date?

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

- Original Message -
From: Dieter Maurer [EMAIL PROTECTED]
To: Gilles Lenfant [EMAIL PROTECTED]
Cc: Leonardo Rochael Almeida [EMAIL PROTECTED]; Zope Developers list
[EMAIL PROTECTED]
Sent: Friday, August 02, 2002 8:53 PM
Subject: Re: [Zope-dev] Removing the acquisition wrapper from an
object(Python script)


 Gilles Lenfant writes:
   ...
obj.aq_explicit.some_attr
   Many thanks, exactly what I needed !
 It will not always work, only usually.


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



Fw: [Zope-dev] Nesting Forms

2002-07-19 Thread Adrian Hungate

Ooops, I meant this to go to the list as well...

Adrian...

- Original Message -
From: Adrian Hungate [EMAIL PROTECTED]
To: Ross Boylan [EMAIL PROTECTED]
Sent: Friday, July 19, 2002 8:40 AM
Subject: Re: [Zope-dev] Nesting Forms


 Although I would probably avoid what you are trying to do, it doesn't seem
 that hard. Here is how I would do it (Which I think is just an extension
of
 the other sugestions here).

 Have one base class which contains (For example class _base)
 * a method to produce an empty, or almost empty, page - All classes will
 override this.
 * a DTML Method which contains header, form start, a call to the
method
 above, form buttons, form end, footer. No classes will override
this.

 Then each desendant class would work something like (e.g. class A(_base) )
 * Override the method, get the HTML returned by _base.method() and add
your
 new HTML to it.
 * Do not override the DTML Method

 All descendants of A could do the same by adding their own HTML onto the
end
 of A.method() etc...

 This should work (And could be repeated for as many screens as there are
in
 the product), because the head/head, body/body and form/form
 elements are NOT part of the HTML returned by the base class method, so
the
 ordering should be correct.

 Of course, you will need to do the same with the form handler functions,
but
 that is basic python, and all products do that without thinking.

 I hope this is clearer to you than it is to me now I am re-reading it. :)

 Adrian...

 --
 Adrian Hungate
 EMail: [EMAIL PROTECTED]
 Web: http://www.haqa.co.uk

 - Original Message -
 From: Ross Boylan [EMAIL PROTECTED]
 To: Dieter Maurer [EMAIL PROTECTED]
 Cc: Ross Boylan [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Friday, July 19, 2002 6:38 AM
 Subject: Re: [Zope-dev] Nesting Forms


  On Thu, Jul 18, 2002 at 08:41:02PM +0200, Dieter Maurer wrote:
   Ross Boylan writes:
 ...
 I would prefer a more elegant approach.  Perhaps I can define some
 method in A that the dtml will reference, and then B can override
the
 method to add some extra stuff (the method would return a DTML
 snippet).
   That sounds good. It is how the ZMI works...
 
  ZMI = Zope Management Interface (i.e., in the core app), or is this
  something else?  At any rate, I'm not sure what you're referring to,
  or where to look.
 
  
 First, I'm not exactly sure how to pick up the method from the
DTML.
   There are two cases:
  
 *  view of an existing object
  
then the object is the client of the primary view.
Make all you snippets attributes of the object
and you can simply access them by name.
  
The ZMI does this. If necessary, look how it does.
 
  The problem isn't just accessing them, but combining them.  Say C is a
  subclass of B is a subclass of A.  Each subclass has the entire user
  interface of its base class (aka superclass) and some extra stuff.
 
  Either each class implements its novel stuff with a unique name.  In
  that case, I still have to make a separate dtml file for each,
  referencing the appropriate names (though your suggestion below helps
  on that).
 
  Or each has the same name.  Then the problem is how to get the
  subclasses method to return its unique stuff plus everything in its
  base class.  For vanilla methods that's not a big deal, but if each is
  a DTMLFile, I don't think it will work.  More about that at the very
  bottom.
 
  
 *  object creation form
  
That's much more difficult. ZMI does not reuse fragments for
this case.
  
There is a partial solution for DTMLFiles, but it is not nice
and restricted to DTML.
  
DTMLFile constructors accept a dictionary with default
name bindings. This way, you can customize your
DTMLFile with different bindings according to context,
e.g.
  
   addAForm= DTMLFile('dtml/addForm', globals(),
  comp1= AComp1
  comp2= AComp2
  ...)
   addBForm= DTMLFile('dtml/addForm', globals(),
  comp1= BComp1
  comp2= BComp2
  ...)
 
  This suggests one semi-refined strategy: the file defines the maximal
  interface, and then parts of it are guarded by dtml-if ...  tests on
 these
  extra variables I pass in. I could even pass the class in, but I
  suppose if I try to do issubclass(PassedInClass, MyApplicationClass)
  in the dtml-if I will find that I lack security to access
  PassedInClass, issubclass, or MyApplicationClass.
 
 
  
 Second, I'm not sure if this is the best solution.  For one thing,
I
 would prefer to keep all my dtml in separate files, rather than
 defining it into my methods.
   You can have separate files and do something like:
  
   class YourProduct:
 
 mySnippet= DTMLFile('dtml/mySnippetFile',globals())
 
  
 
  The problem comes if I stick the different interface segments in
  different files, so A.dtml has the user interface for A and B.dtml has
  just

Re: [Zope-dev] rfc1123_date

2002-07-15 Thread Adrian Hungate

How hard would it be to move these into DateTime? Or is there are reason
they were not put there in the first place?

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

- Original Message -
From: Magnus Heino [EMAIL PROTECTED]
To: Chris McDonough [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, July 15, 2002 2:19 PM
Subject: Re: [Zope-dev] rfc1123_date



 Thats how I solved it. Seems a bit weird though to put date methods like
 iso8601_date, rfc1123_date and rfc850_date in App.Common, when DateTime
 already has method like that, like rfc822.

 /Magnus

  You could use ModuleSecurityInfo (see Zope Developer's Guide), you
  could use an External Method, or you could write your own product.
 
 
 Why is rfc1123_date a method in App.Common, and not a method on
 DateTime.DateTime?
 
 How am I supposed to use it from dtml/zpt?






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




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



Re: [Zope-dev] Last-modified and bobobase_modification_time

2002-06-20 Thread Adrian Hungate

Ah, well, that is not quite true. Zope (And apache, IIS, and others) may do
the right thing and set or not set the headers, but IE at least definately
DOES NOT do the correct thing when it comes to caching on the client (Even
with caching disabled it still caches when it feels like it).

Until clients improve, caching is just bad IMHO.

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

- Original Message -
From: Wei He [EMAIL PROTECTED]
To: Toby Dickenson [EMAIL PROTECTED]
Cc: Dieter Maurer [EMAIL PROTECTED]; R. David Murray
[EMAIL PROTECTED]; Chris Withers [EMAIL PROTECTED]; Casey Duncan
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, June 20, 2002 2:45 PM
Subject: Re: [Zope-dev] Last-modified and bobobase_modification_time


 On Thu, 20 Jun 2002, Toby Dickenson wrote:

   In either case, Zope's current implementation needs to be
   changed. Because it will give the client a false impression that a
page has
   not changed but actually it did.
 
  What part of Zope gets this wrong?
 

 I just realized that the Last-Modified header in a GET request is NOT
 sent for a dynamic page. I was always asuming that it is the same as the
 HEAD request of the same URL.

 So at least the user can get correct information cause the client cache
 function will not work. Whether a cache server can handle this
 situation or whether RFC allows doing this (haven't read yet) is not
 a big problem.

 Sorry to everyone. And thank all of you.

 Wei He





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




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



Re: [Zope-dev] Changes to ZCatalog

2002-06-13 Thread Adrian Hungate

Hmm... which of 'title' and 'Title' is now considered correct form? That one
certainly needs and index and metadata. The others probably not.

Adrian...
--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

DISCLAIMER: Microsoft, Windows, Windows XP, Bugs, Lacking features, IRQ
conflicts, System crashes, Non-functional multitasking, registration keys,
the Y2K problem, the Blue Screen of Death and unfair business practices are
registered trademarks of Microsoft Corp., Redmond, USA.

- Original Message -
From: Dieter Maurer [EMAIL PROTECTED]
To: Casey Duncan [EMAIL PROTECTED]
Cc: Shane Hathaway [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 7:58 PM
Subject: Re: [Zope-dev] Changes to ZCatalog


 Casey Duncan writes:
Currently, CMF falls under this category. :-(
  
   Yes, I have begun to fix it. I want to determine exactly which
   Indexes/metdata are really needed in CMF. Like, do we really need both
   Title and title indexes and metadata? How about bobobase_mod_time?
 I would twice answer with no, we do not need.


 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 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] multiple monkeypatches

2002-06-05 Thread Adrian Hungate

Hmm there is a patch for the PatchKit that puts the ZMI in the ZODB, is that
what you need? :)

From the Doc String:-


Zope Management Interface Style Sheet Patch
 == = = = =

The patch adds a ZStyleSheet to the root of your Zope
with its contents set to the contents of the standard
manage_page_style.css and points the ZMI at it.

It also adds two DTML Methods initially containing the
default ZMI header and ZMI menu.

Everything can then be modified using the ZMI.

# $Id: ZMImanagePatch.py,v 1.1.1.1 2002/02/03 17:07:16 root Exp $

If this is not in the PatchKit you have, you can get it from my CVS at
http://cvs.haqa.co.uk/viewcvs/Products/PatchKit (there is a tarball option
there to, which should work).

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

Computers are like air conditioners
-- they stop working properly if you open WINDOWS
- Original Message -
From: Jerome Alet [EMAIL PROTECTED]
To: Florent Guillaume [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 8:02 PM
Subject: Re: [Zope-dev] multiple monkeypatches


 On Wed, Jun 05, 2002 at 05:15:10PM +, Florent Guillaume wrote:
  Jim Penny  [EMAIL PROTECTED] wrote:
   Is there a safe way to handle multiple monkeypatches?
 
  Without an existing framework (I haven't looked at Adrian's PatchKit),
  it's the same old problem as intercepting interrupts on good old 8-bit
  computers. You just have to save and call the previous one.
 
  What I do is this:
 
  # 1. define my method
  def manage_main(...):
  # ...
  ...
  res = self._myproduct_old_manage_main(...)

 Yes, I remember ;-)

 except that what we want to patch there is the user interface
 HTML code itself. I think parsing the HTML code to insert
 some tags where needed would do it, but this seems
 somewhat complicated to do for a simple thing like that.

 Would be fine if the main.dtml file would allow a plugin system...

 bye,

 Jerome Alet




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




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



Re: [Zope-dev] multiple monkeypatches

2002-06-05 Thread Adrian Hungate

PatchKit handles this for you (If you ask it to).

:)

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

Computers are like air conditioners
-- they stop working properly if you open WINDOWS
- Original Message - 
From: Florent Guillaume [EMAIL PROTECTED]
Newsgroups: local.lists.zope.zope-dev
To: [EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 6:15 PM
Subject: Re: [Zope-dev] multiple monkeypatches


 Jim Penny  [EMAIL PROTECTED] wrote:
  Is there a safe way to handle multiple monkeypatches?
 
 Without an existing framework (I haven't looked at Adrian's PatchKit),
 it's the same old problem as intercepting interrupts on good old 8-bit
 computers. You just have to save and call the previous one.
 
 What I do is this:
 
 # 1. define my method
 def manage_main(...):
 # ...
 ...
 res = self._myproduct_old_manage_main(...)
 ...
 return res
 # 2. put the old version in a private variable
 ObjectManager._myproduct_old_manage_main = ObjectManager.manage_main
 # 3. patch
 ObjectManager.manage_main = manage_main
 
 If you want to play nice with refresh, you have to be a bit more
 careful, because then you don't want to do step 2. A simple test for
 absence of the _myproduct_old_manage_main attribute before doing it is
 enough.
 
 Florent
 
 -- 
 Florent Guillaume, Nuxeo (Paris, France)
 +33 1 40 33 79 87  http://nuxeo.com  mailto:[EMAIL PROTECTED]
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 



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



Re: [Zope-dev] multiple monkeypatches

2002-06-05 Thread Adrian Hungate

PatchKit allows the replacement of entire methods, with the ability to
backup the original when the first replacement is done - This means that the
patches are (Or at least can be) refreshable.

PatchKit does not allow for small changes to be made within a method (Such
as a DTML/HTML object) but there is a patch that puts the ZMI in the ZODB.

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

Computers are like air conditioners
-- they stop working properly if you open WINDOWS
- Original Message -
From: Jim Penny [EMAIL PROTECTED]
To: Adrian Hungate [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 11:37 PM
Subject: Re: [Zope-dev] multiple monkeypatches


 On Wed, Jun 05, 2002 at 10:51:45PM +0100, Adrian Hungate wrote:
  PatchKit handles this for you (If you ask it to).
 
  :)
 
  Adrian...

 I am not sure that I understand.  I need to be able to do a
 cumulative monkey patch.  Suppose that there were two independent
 products which both modified manage_main (without loss of generality,
 say ExternalEditor and ZShell).  Most people use neither, some people
 use one, some use the other, and some use both.

 It is the case of people using both that I am interested in.  To do
 this appears to me to require that I have access to the DTML form of
 any previous monkey patches to manage_main so that I can decide
 if I can safely patch the running version to meet the needs of both
 products.

 Is this possible?

 If both products were using PatchKit would it be possible?  How about
 if only one used PatchKit?

 Thanks

 Jim
 
  --




___
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] multiple monkeypatches

2002-06-04 Thread Adrian Hungate

Look at my PatchKit product. It provides a framework that allows multiple
patches to be applied to any combination of products.

Drop me a line if you need the api clarified.

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

Computers are like air conditioners
-- they stop working properly if you open WINDOWS
- Original Message -
From: Jim Penny [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 04, 2002 10:09 PM
Subject: [Zope-dev] multiple monkeypatches


 Is there a safe way to handle multiple monkeypatches?

 Here is the problem.  External editor monkeypatches
 ObjectManager.manage_main.  There are some other products that also
 need to monkeypatch this object.

 For example, if Jerome Alet's Zshell were turned into a python product,
 it would be natural for it to monkeypatch this same object.

 But, if it does so, whichever monkeypatch is applied last will destroy
 the previous.  Any ideas on a reasonably simple way to solve this
 problem.

 Thanks

 Jim Penny


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




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



Re: [Zope-dev] Refresh makes all imported modules = None

2002-06-02 Thread Adrian Hungate

I've seen this under 2.5.0, but I don't recall seeing it under 2.3.x or
2.4.x

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

All programs evolve until they can send email. Except Microsoft Exchange.
   -- alt.sysadmin.recovery

- Original Message -
From: Lennart Regebro [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 01, 2002 4:21 PM
Subject: [Zope-dev] Refresh makes all imported modules = None


 Suddenly when I refresh products it seems that all imported modules in the
 refreshed product are set to None, because after a refresh, anything I try
 to do always ends up with an error message like None has no attribute
 foobar or None is not callable, and this always happend when I try to
 access something that is imported.

 Has anybody seen this?

 Zope 2.5.1/Python 2.1.3


 Best Regards

 Lennart Regebro
 Torped Strategi och Kommunikation AB




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




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



Re: [Zope-dev] Zope logic

2002-05-30 Thread Adrian Hungate

Hmmm... interesting points... However I almost completely disagree.

The only part of URL implicit acquisition that I have a problem with is
acquiring from outside the VHost, but if you plan properly, you can even
avoid this.

I have written several sites that use this feature, and I have found no
significant problems with it, and as for it being a problem for caching
proxies, many of the objects that get acquired are dynamic, and provide
different content based on context, so multiple cache entries is the correct
answer.

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

- Original Message -
From: Toby Dickenson [EMAIL PROTECTED]
To: Lennart Regebro [EMAIL PROTECTED]; Wei He [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, May 30, 2002 4:07 PM
Subject: Re: [Zope-dev] Zope logic


On Thursday 30 May 2002 10:29 am, Lennart Regebro wrote:

 It not only sounds good, but it is good.No, it' is fantastic. Amazing.
 Totally unbelivingly great! It's one of the best and main features of
Zope.

Is anyone relying on your site to provide information? How do you test your
site to make sure that every possible url (not just the ones you link to) do
not give out misinformation.

Some specific problems that I have encountered:

1. Content that crosses between virtual hosts.

If two different virtual hosts come from the same zope then it is possible
to
construct a URL so that content from one site appears under the hostname
(and
https certificate!) of another.

2. A page that uses a mix of context and containment

If a page is built up with some content found from its context, and other
content from containment, then it is possible to construct a URL so that
apparently related information comes from unrelated objects.  Imagine a
medical imaging database, where it was possible for a page do display the
wrong patient name above an image.


My conclusions are:

a. implicit acquisition is dangerous

b. acquisition that searches outside the containment hierarchy is evil.


Im not keeping up with Zope 3 development. how does Zope 3 handle
acquisition?


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




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



Re: [Zope-dev] Zope logic

2002-05-30 Thread Adrian Hungate

Hmm... being able to acquire the Control_Panel (or anything) and it taking
on the wrong security context was a bug, and AFAIK it has been corrected.

Before I start sounding like I did in a previous thread, I am starting to
have some very serious doubts about the direction Z3 development is heading.
I have been a strong proponent of Zope, in part because of the very features
that people seem to be proudly proclaiming will be removed from, or at best
depricated in, Z3...

Bottom line, internal bugs to one side, Z2.x works a particular way, and is
documented as doing so. This is a powerful and useful feature, and we are
likely to severly impact the power and process of Zopeing by removing it.
If we are still heading for 10x we should be enhancing those features that
set Zope apart from the competition, not removing features that make it
different.

Just my $0.02

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk


- Original Message -
From: Casey Duncan [EMAIL PROTECTED]
To: Adrian Hungate [EMAIL PROTECTED]; Toby Dickenson
[EMAIL PROTECTED]; Lennart Regebro [EMAIL PROTECTED];
Wei He [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, May 30, 2002 6:43 PM
Subject: Re: [Zope-dev] Zope logic


The namspace traversal in Zope 2 severely violates the principle of least
surprise IMO. Although you can use this to clever ends, it opens up many
doors to misuse of a site or even significant security holes.

For instance, it used to be possible to access the Control Panel (and
shutdown
Zope) as a user defined in a subfolder of the root who had the local Manager
role, just by forming a URL like:

http://somezope/myfolder/Control_Panel/manage_main

The point is that this grants way too much power to the end user to muck up
the namespaces. It is difficult, if not impossible to design an app in Zope
today that accounts for all possible namespace variations gracefully, since
there are effectively an infinite number of them for every given object in
Zope based on different URLs.

Now I won't argue that implicit acquisition isn't useful. It rules in
solving
(and simplifying) problems in creating highly coordinated objects. But,
being
an implicit and magical thing, it is better if it is invoked through an
explicit gesture rather than simply being there all the time. Having it
around all the time also makes it easy to use it when its not the best (or
most robust) solution because it also excels in creating namespace chaos
that
is difficult to predict and account for.

This is what Zope3 realizes.

-Casey

On Thursday 30 May 2002 12:42 pm, Adrian Hungate wrote:
 Hmmm... interesting points... However I almost completely disagree.

 The only part of URL implicit acquisition that I have a problem with is
 acquiring from outside the VHost, but if you plan properly, you can even
 avoid this.

 I have written several sites that use this feature, and I have found no
 significant problems with it, and as for it being a problem for caching
 proxies, many of the objects that get acquired are dynamic, and provide
 different content based on context, so multiple cache entries is the
correct
 answer.

 Adrian...

 --
 Adrian Hungate
 EMail: [EMAIL PROTECTED]
 Web: http://www.haqa.co.uk

 - Original Message -
 From: Toby Dickenson [EMAIL PROTECTED]
 To: Lennart Regebro [EMAIL PROTECTED]; Wei He
[EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Thursday, May 30, 2002 4:07 PM
 Subject: Re: [Zope-dev] Zope logic


 On Thursday 30 May 2002 10:29 am, Lennart Regebro wrote:

  It not only sounds good, but it is good.No, it' is fantastic. Amazing.
  Totally unbelivingly great! It's one of the best and main features of
 Zope.

 Is anyone relying on your site to provide information? How do you test
your
 site to make sure that every possible url (not just the ones you link to)
do
 not give out misinformation.

 Some specific problems that I have encountered:

 1. Content that crosses between virtual hosts.

 If two different virtual hosts come from the same zope then it is possible
 to
 construct a URL so that content from one site appears under the hostname
 (and
 https certificate!) of another.

 2. A page that uses a mix of context and containment

 If a page is built up with some content found from its context, and other
 content from containment, then it is possible to construct a URL so that
 apparently related information comes from unrelated objects.  Imagine a
 medical imaging database, where it was possible for a page do display the
 wrong patient name above an image.


 My conclusions are:

 a. implicit acquisition is dangerous

 b. acquisition that searches outside the containment hierarchy is evil.


 Im not keeping up with Zope 3 development. how does Zope 3 handle
 acquisition?


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

Re: [Zope-dev] DT_Var modifier

2002-05-29 Thread Adrian Hungate

If I understand what you are asking, this is something I need as well. I am
trying to create an entity_encode and entity_decode modifier (Like the html
encode and html decode modifiers) that will encode (decode) all characters
in the string that are special or illegal in XML.

If there is an easy (Or even not so easy) way of adding this without a nasty
patch (i.e. replacing an entire method in DT_Var) I would love to hear about
it. If there isn't I would like to propose that this be changed (i.e.
added).

Adrian...

--
Adrian Hungate
EMail: [EMAIL PROTECTED]
Web: http://www.haqa.co.uk

- Original Message -
From: Christian Theune [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 29, 2002 2:56 PM
Subject: [Zope-dev] DT_Var modifier


 Hi.

 I am currently hacking the DTMLTeX product, (maybe gonna make a relase of
it ...) which
 seems unmaintained, as the old owner isn't responding anymore.

 What i needed for that, was a new modifier for dtml-var, called
tex_quote, that I implemented
 by monkeypatching DT_Var.Var .

 My question now: Would it be possible to modify the DT_Var.Var.__init__,
so it can call
 the parse_params in a way, that I only have to path the DT_Var.modifiers?
I think that wouldn't be
 a big change, but i wouldn't need to monkeypatch the __init__ ...

 I am willing to provide the changed code for that, if this gets accepted.

 Greetings

 Christian

 --
 Christian Theune - [EMAIL PROTECTED]
 gocept gmbh  co.kg - schalaunische strasse 6 - 06366 koethen/anhalt
 tel.+49 3496 3099112 - fax.+49 3496 3099118 mob. - 0178 48 33 981

 reduce(lambda x,y:x+y,[chr(ord(x)^42) for x in 'zS^BED\nX_FOY\x0b'])


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




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



Re: [Zope-dev] Re: stacks != easy to explain

2002-05-16 Thread Adrian Hungate

 
  Correct me if I am wrong, but isn't the TTW part is what is one of the
  strenghts of Zope -

 Well, no, not really. Being able to edit stuff remotely is where Zope's
real strength
 lies. WebDAV and FTP are much better than using sucky HTTP forms to do
this ;-)

Babies. bathwater.

  Just because ChrisW has gone beyond TTW editing, does not make it
  a Bad Thing(tm) in general :)

 I challenge you to justify how editing in a text box is better than using
a full text
 editor, given that both can be used remotely ;-)

Hmm... now if I can only find an editor that is worth me spending my
valuable time trying to make it do what I want, instead of what it wants for
my code Or there are those nice little text boxes... they don't assume
they know better than me...

  It seems that ZPT is mostly aimed at the Page Designer, whereas DTML is
  mostly aimed at the Developer. Would this be a correct assesment of the
  situation?

 DTML didn't have a clue who it was aimed at, which was it's main problem
;-)

Hmm... strange then that I have used (as have many others) it to produce
some very complex (And some think atractive and even elegant) sites. I had
always assumed it was aimed at people who wanted to design websites with
some server side inteligence - Seems a logical assumption, after all that is
what it allows.

 *grinz*

 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] stacks != easy to explain

2002-05-15 Thread Adrian Hungate

Whereas XML attributes, order indeterminisim, slots, METAL and templates
are?

Adrian...

- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: Marc Lindahl [EMAIL PROTECTED]
Cc: zope-dev [EMAIL PROTECTED]
Sent: Monday, May 13, 2002 8:15 PM
Subject: [Zope-dev] stacks != easy to explain


 Marc Lindahl wrote:
 
  Still I think the concept of TAL having some kind of 'stack' for
condition
  results makes sense and is worth exploring...  Could yield better
logical
  constructs, and things like case statements.

 Sorry, but I don't see a 'stack' of any sort being easy to explain to a
newbie
 or not programmer.

 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 )



Re: [Zope-dev] Re: stacks != easy to explain

2002-05-15 Thread Adrian Hungate

Don't even get me started on that one!

I don't think this is neccessarily a criticism of Zope though, or ZPT. We
are all human, and apt to err. ZPT is imperfect, but the balance of opinion
would appear to be that it is better than what has gone before. It is
irritating to learn a new syntax, it is hard to read (Some of us design Zope
sites TTW...) the flow of logic is obscure and sometimes downright
impossible to follow, but people seem to work around it anyway.

Much the same is true of the failure of Netscape, Microsoft, and all the
others to even read, let alone follow, the defined standards on, well, just
about anything.

There is one important point being missed here though - Why should the
non-programmers be interested in the coding? If the concept of a stack is to
hard for them to understand, so what? Shouldn't they be designing plain
pages, which the coded templates simply render? Or are we now passing off
the task of designing look and feel to non-experts? Anyone want to find
another area of the industry to dilute? Now, return to the Marc and Chris'
last comments, why exactly can't leading browsers follow standards, because
they are written by people that can't program, in languages that were made
simple for the sake of non-experts.

I put it to you that this argument is invalid and of no merit.

Adrian...

- Original Message -
From: Marc Lindahl [EMAIL PROTECTED]
To: Chris Withers [EMAIL PROTECTED]
Cc: zope-dev [EMAIL PROTECTED]
Sent: Tuesday, May 14, 2002 4:33 PM
Subject: Re: [Zope-dev] Re: stacks != easy to explain


 on 5/14/02 4:43 AM, Chris Withers at [EMAIL PROTECTED] scrivened:

  Marc Lindahl wrote:
 
  Sorry, but I don't see a 'stack' of any sort being easy to explain to
a
  newbie
  or not programmer.
 
  I'd disagree - HTML has this concept - for example the way table tags
  inherit properties.  Key is that the 'stack' idea is hidden within the
  hierarchy idea.
 
  Hmmm... do you knnow how many people get confused by that specifc issue?
  Especially as
  different browsers inherit different levels of formatting...


 I think the confusion on that issue with tables has only to do with the
bugs
 in the implementation on certain browsers.  Which points to the inability
of
 supposedly real programmers to understand stacks, parsing, state
machines -
 not the poor HTML coders :)  - if you read diatribes by the layout guys
 (like alistapart) you'll see their frustration is based that the heirarchy
 (stacking) isn't working as expected.



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




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



Re: [Zope-dev] ZPT is young

2002-05-09 Thread Adrian Hungate

Hey, watch who you are calling One Person... :)

Adrian...

- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: Paul Everitt [EMAIL PROTECTED]
Cc: Adrian Hungate [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, May 09, 2002 8:46 AM
Subject: Re: [Zope-dev] ZPT is young


 Paul Everitt wrote:
 
  Lesson learned: when the vast majority of an open source project
  unanimously agree on a change, afterwards another vast majority will pop
  up in opposition. :^)

 I would hardly call one person a 'vast majority' ;-)

 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 )



Re: [Zope-dev] ZPT is young

2002-05-09 Thread Adrian Hungate

Yeah, for CSS I'd use ZStyleSheets, and for javascript I'd use a very large
magnet... but that is another argument.

Adrian...

- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: Thomas Olsen [EMAIL PROTECTED]
Cc: Adrian Hungate [EMAIL PROTECTED]; Shane Hathaway [EMAIL PROTECTED];
Dieter Maurer [EMAIL PROTECTED]; Andy McKay [EMAIL PROTECTED];
Martijn Jacobs [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, May 09, 2002 8:47 AM
Subject: Re: [Zope-dev] ZPT is young


 Thomas Olsen wrote:
 
  DTML is great for style sheets, javascript and such where you cannot use
ZPT
  and python scripts would be too ugly to use ;-)

 There's no reason to use DTML for these, as I've explained before ;-)

 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 )



Re: [Zope-dev] Re: ZClasses useful! [Was: ZMI / JavaScript brainstorm]

2002-05-06 Thread Adrian Hungate

Maybe a little Perl psychology might help us here, i.e. There is more than
one way to do it - Some are faster, some more feature rich, and (in this
case) some are TTW codeable. The only ones that are actually _wrong_ are the
ones that don't work at all.

ZClasses are one of the two things that bring Zope up to and above the level
of the competition (In this case Coldfusion) IMHO - TTW coding, including
writing products TTW, and DTML which is far more powerful and focused than
the competitions offering.

I think that blindly disposing of both, just because a newer idea has come
along is just that - blind. So what if ZPT is more (choose your comparison
here) than DTML? DTML is far easier to learn, far easier to read, far easier
to write, and much much easier to explain to newbies.

It has always been clear that ZClasses are the poor relation of Python
products, but even that does not earn ZClasses a death warant (IMHO) - Have
you never needed a quick fix product that needs writing in a few minutes and
in a week will no longer be needed? I know I have - Many MANY times!

Just my $0.02

Adrian...

- Original Message -
From: Andy McKay [EMAIL PROTECTED]
To: Martijn Jacobs [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, April 10, 2002 3:52 AM
Subject: Re: [Zope-dev] Re: ZClasses useful! [Was: ZMI / JavaScript
brainstorm]


  What's your efford on this task? If people like to use them, let them!
  It's not up to you to decide for THEM what's best or not. The choice for
  YOURSELF not to use them is just as fair as other peoples choices.

 Sure but many people ask more experienced developers for advice. I agree
 saying ZClasses suck totally is unhelpful. For people who dont know coding
 or want to do quick prototyping they have a place. However if someone asks
 me how to do a product, I normally give them the choice: use ZClasses but
I
 would strongly recommend using a Product etc (and then be ready with the
 reasons why which is the next question).

 Unfortunately people deciding the right and wrong ways for other people to
 code is a trait sometimes found in Python / Zope world. But dont get me
 started on that :)
 --
   Andy McKay






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




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



Re: [Zope-dev] Re: [Zope3-dev] Are there Graphic Designers?

2002-04-06 Thread Adrian Hungate

From: Gary Poster [EMAIL PROTECTED]

 I agree that
   we ought to trash frames
   we ought to use strict xhtml 1.0
   we ought to rely on CSS for all graphic elements
   (correlative) we ought to not use *any* shims or non-logical tables
   the site ought to work completely without JS or Flash
   the site ought to be usable and legible without any CSS

 I disagree that
   we ought to use iframes (why lock out NS4 if we don't have to?)
   we ought to avoid Flash like the plague (see my XML file tree email)
   this shouldn't be the default skin (it *should*)

 I further feel that
   it would be very easy to develop a CSS file folder that one could place
in
 a skin that would deliver different CSS files based on browser-sniffing.
The
 CSS could be cached by the browser if we always call it from the same

Hmm... If only someone had thought of that, say about a year ago. (
http://www.zope.org/Members/haqa/ZStyleSheet )

My question is this: Everyone is saying The ZMI is bad, it's confusing,
users don't like it. Could anyone show me evidence of this? Personally I
love the ZMI in the current versions. I have also found there is a
negligable learning curve for users who already know how to use Windows
Explorer and similar products. I just don't see the need to throw out the
ZMI - Are we in a baby/bathwater situation here?

 address.  While CSS support varies widely in all the various browsers, and
I
 think we should *ship* with a CSS file that requires a standards-compliant
 browser such as those that Toby lists, I see *no reason* why we should
design
 the html itself so that a NS4 user could not use the default skin simply
by
 building him or her a new CSS file.  It might not look nearly as slick as
the
 compliant browsers, but you can still do some reasonable things with NS4
 only...





___
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] OpenSSH configuration between ZEO clients storage server

2002-03-30 Thread Adrian Hungate

 Yes. The best solution would be for the ZEO protocol to support auth and
 crypto natively...

+10 (At least)

 The next best solution (while you wait) is to use CIPE ;-)

Could be, if you can:
a) Get your customers to run a platform it's been ported to
b) Run something so low level that is esentially replacing functionality
that is already in their kernels.

Anyone here want to try to explain to *ahem* technically non-expert *ahem*
clients why PPTP is bad (Inspite of _all_ major and minor OS's now bundling
support for it).

 As far as I understand it, even regular TCP port forwarding is TCP over
TCP
 and suffers from the unreliable carrier assumption causing excess (eg
 retransmit) traffic over a reliable channel.

By port-forwarding you mean... ?
a) A firewall PC that receives an external connection and reroutes it to a
machine on the inside? No, this is not TCP/TCP.
b) An apache that takes a connection and forwards it to Zope? No, this is
not TCP/TCP.

What port forwarding are we talking about here?

 Consider:
 host --TCP-- local interface --TCP tunnel-- local interface --TCP--
host
 host --TCP--  virtual loopback
 interface  --TCP-- host

 In this common port forwarding scenario, the SSH or SSL tunnel creates a
 virtual single loopback interface that
 the two hosts use to talk to each other, using TCP. The transport that
 joins these two physical interfaces to create one virtual loopback
 interface is also TCP. Therefore it's TCP over TCP

If you insist on using User Land utils for Kernel Land functions, this will
be the result IMHO.

Just my 0.02c, YMMV

Adrian...


___
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] manage frame change

2002-03-22 Thread Adrian Hungate

...all of which can already be done with PatchKit...

I think the option to have Zope mutate certain objects into the ZODB from
within App.Management et al would be a very useful feature, but then that is
why I already did that...

Does anyone want PatchKit (Or parts of it) put in 2.6 (Probably as changes,
rather than patches I'd guess) ?

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: seb bacon [EMAIL PROTECTED]
To: Leonardo Rochael Almeida [EMAIL PROTECTED]
Cc: Lennart Regebro [EMAIL PROTECTED]; Zope Developers list
[EMAIL PROTECTED]
Sent: Tuesday, March 19, 2002 9:58 AM
Subject: Re: [Zope-dev] manage frame change


 On Mon, 2002-03-18 at 19:18, Leonardo Rochael Almeida wrote:
  On Mon, 2002-03-18 at 13:21, Lennart Regebro wrote:
   The machine should, in my opinion, be the domain you are logged in on.
I.e,
   if you are authenticated for domain www.foobar.com:1001, thats what it
   should say, according to an internal survey here at Torped (that means
me
   and Johan). :-)
  
   It would be nice to have it configurable, but I'm not sure it's enough
to
   configure it per instance. You may want to configure it per virtual
domain
   too.
 
  +1 on that. It's 'The Simplest Thing That Could Possibly Work' (TM) and
  only requires changes to the template as all the extra data (host and
  port) is present in the request.

 But we come back to the point that you may be logged into one of (say) 3
 app servers (ZEO clients) all serving the same domain, no?

 seb


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



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



Re: [Zope-dev] manage frame change

2002-03-19 Thread Adrian Hungate

If you want to make a quick change to the ZMI top or left pane, look at my
latest PatchKit - It turns them into ZMI objects so you can customize the
ZMI.

(I am sure there are as many changes people want to make to the ZMI as there
are users of Zope...)

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: seb bacon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 16, 2002 4:02 PM
Subject: [Zope-dev] manage frame change


 anyone object to changing the text at in the top ZMI frame to Logged in
 as user on machine?  Or is there a better place to put that info?
 I find it useful when I've got several windows open to different servers.

 seb


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



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



Re: [Zope-dev] ZMI: IE6 TextArea width bug: fix on tap for 2.6?

2002-03-19 Thread Adrian Hungate

I agree, though the problem would not have even occured if someone had not
put in the style=width:100%. IE's width=100% attribute works ok, it's just
the style and stylesheet handling that blows.

There is already a way (In fact two ways) to define the width of text entry
boxes, please can the style=width:100% be completely removed?

Thanks

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Jeff Kowalczyk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 17, 2002 9:12 PM
Subject: [Zope-dev] ZMI: IE6 TextArea width bug: fix on tap for 2.6?


 I was wondering if there was any consensus on how best to fix or
 compensate for the unfortunate behaviour of IE6 with regards to the
 width calculation of textarea boxes. For anyone who hasn't seen it, the
 full-width texareas that are everywhere in the ZMI suddenly started
 pushing the width out in IE6, causing the horizontal scrollbar to become
 active, and generally making ZMI editing life miserable.

 Would it be possible to include in 2.6 (or 2.5.1, even better) a user
 preference, sitewide configuration setting, or other means of
 suppressing a few pixels/percent of that default width? I'm loathe to
 apply a massive search-replace to put 95% in my local ZMI source, and
 IE6 must be a common enough platform for Zope users to warrant a
 workaround. I wouldn't hold my breath that MS would fix IE or anything
 sensible like that.

 It would be a shame to slow the whole thing down with browser detection
 logic for this one bug, unless that opened up the door for some of the
 Javascript/DHTML editors as a per-user preference for editing certain
 metatypes.


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



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



Re: [Zope-dev] Error removing NT Service

2002-03-10 Thread Adrian Hungate

Two points about deleting services (Well one really, just looked at from two
angles):
1) Services must have fully stopped before you delete them, or they get
marked for deletion on the next reboot (Good, solid server software:
expecting frequent reboots!)
2) The service must have had all the SCM handles closed otherwise the same
happens

What is probably happening is that the SCM handle from the service shutdown
has been deleted, but python or something still has a reference to it that
has not been garbage collected yet.

Just a guess. Without seeing your code, it's hard to know for certain.

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Dean@work (E-mail) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 08, 2002 2:39 PM
Subject: [Zope-dev] Error removing NT Service


 Hi

 I have an application built with Zope which can install, control and
remove
 NT services. The actual code is in an external python script.  The
services
 can be installed and controlled but if you try and remove the service it
get
 marked as 'disabled' and can not be reinstalled or remove manually
(without
 using the registry).  However if Zope is restarted the service is then
 removed.

 Does anyone have any ideas about resolving this problem ??

 thanks in advance

 Dean Houghton





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



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



Re: [Zope-dev] RFC : AnyScripts

2002-03-10 Thread Adrian Hungate

This sounds like a security acident waiting to happen. I wouldn't want to be
the one to have to ensure there were no security holes in the surrounding
code that might allow the script to get rewritten.

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Jerome Alet [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 08, 2002 7:27 PM
Subject: [Zope-dev] RFC : AnyScripts


 Hi,

 I'm finally toying, after having stalled a too long time,
 with the creation of ZShellScripts, which would be for ZShell
 commands what PythonScripts are for Python...

 The current, not yet available, incarnation is very highly
 based on PythonScripts, however I wondered if something
 better couldn't be done, because it seems to me to be an
 unneeded repetition of most of the PythonScripts' code :

 AnyScripts

 AnyScripts would have a mandatory first line similar to the one
 of any Unix shell script. By unix shell script I mean any script
 which can be launched directly under Unix, not only bash or csh scripts,
 but also perl, tcl, etc...

 So an AnyScript would contain a first line like :

 #! /scripts/interpreter

 And the execution of this script in the context on which it
 is applied would be delegated to another object present in
 the path which was set on this very first line, i.e.
 /scripts/interpreter

 So you could put any interpreter object of your choice in
 for example the /scripts folder (no path would mean
 search the interpreter object within the acquisition path)

 For example PythonScripts would contain something like :

 #! /builtins/python

 or something like that.

 Out of my mind I can already think of a ZShell interpreter
 object, but why not other types of interpreter objects :

 perl
 tcl
 C (the language ! Why not after all)
 etc...


 Each interpreter object would have at least two methods :

 compile() = returns a code object from source code, if meaningful
  (otherwise returns the source unchanged), to be
  stored in the AnyScript object which calls the
  compile() method.

 execute() = executes the above code object. This method of the
  Interpreter object would be called by the AnyScript
  object at run time, passing it the code object
  obtained with compile()

 Of course all of this come straight out of my mind, and there would
 probably be some problems I'm not able to understand yet...

 Bound variables would be like for PythonScripts, with the exception of
their
 content would be the best format for the Interpreter in question, so
 each Interpreter object would probably also have a bind() method which
 would bind vars in the preferred format for the AnyScript object which
 calls this method, and would be accessible using the
 preferred syntax of the langage in question, e.g. :

 for PythonScripts, vars like context would be Zope Objects, like they
 currently are.

 for ZShell AnyScripts, vars like context, would be paths to Zope
 Objects, and accessible with names like $context for example.

 for C AnyScripts, vars would probably be something like PyObjects
 pointers.

 etc...

 So AnyScripts objects would interact with their interpreter object of
 choice to compile their source code, bind their vars, then finally
 execute the code and get the result back.

 What do you all think about this idea ?

 Are any of you interested ?

 I admit I don't know anything about the feasability of such a project
 with other languages than ZShell, however if a single implementation
 could be done, then anyone could add his own interpreter later...

 PS : I'll do ZShellScripts anyway...

 bye,

 Jerome Alet





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



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



Re: [Zope-dev] Zope 2.6 planning - call for contributors!

2002-03-07 Thread Adrian Hungate

I would like to second this idea.

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Mario Valente [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, March 06, 2002 3:47 PM
Subject: Re: [Zope-dev] Zope 2.6 planning - call for contributors!



   Hi:

   I would like to propose my Paste Reference/symlink hack for
  inclusion into Zope 2.6

   C U!

   -- Mario Valente



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



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



Re: [Zope-dev] MonkeyPatching in the Core (was: Zope 2.6 planning)

2002-03-05 Thread Adrian Hungate

Not a bad idea. On that note, can we add an API to add Control_Panel icons
please?

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Toby Dickenson [EMAIL PROTECTED]
To: Brian Lloyd [EMAIL PROTECTED]
Cc: seb bacon [EMAIL PROTECTED]; Chris Withers [EMAIL PROTECTED];
Richard Jones [EMAIL PROTECTED]; Casey Duncan
[EMAIL PROTECTED]; Anthony Baxter [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, March 05, 2002 11:00 AM
Subject: Re: [Zope-dev] MonkeyPatching in the Core (was: Zope 2.6 planning)


On Mon, 4 Mar 2002 15:20:58 -0500, Brian Lloyd [EMAIL PROTECTED]
wrote:

 I can attest that the only thing worse than confusing
code is _invisible_ code.

The main page of the Control_Panel already displays a fairly long list
of name/value pairs describing the state of the zope installation:
Zope Version, INSTANCE_HOME, etc.

Maybe Products should be able to include 'headline news' which also
gets displayed there.

?


Toby Dickenson
[EMAIL PROTECTED]

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



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



Re: [Zope-dev] Re: MonkeyPatching in the Core (was: Zope 2.6planning)

2002-03-05 Thread Adrian Hungate

Just as a follow up to my last comment: I think it would be a very good idea
to have a common framework with the basic distribution for patches (Who cam
up with monkeypatch?? nasty name), and to that end I offer PatchKit as a
starting point. The aim in my sugestion is to allow ideas such as Marc's
here to be applied to patches as well has fully formed products. If all
patches were loaded into a PatchManager, there could be a global off switch,
and an individual off switch for each patch.

This would also encorage patch writers to make their patches in a common
style, that could be easily queried (On the Control_Panel or a sub page) to
report on patches and their basic actions.

I could go on, but I think you can see where I am going here... (Sort of
components I guess) :)

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: marc lindahl [EMAIL PROTECTED]
To: Adrian Hungate [EMAIL PROTECTED]; Chris Withers
[EMAIL PROTECTED]; seb bacon [EMAIL PROTECTED]
Cc: Richard Jones [EMAIL PROTECTED]; Casey Duncan
[EMAIL PROTECTED]; Anthony Baxter [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, March 05, 2002 2:48 AM
Subject: Re: [Zope-dev] Re: MonkeyPatching in the Core (was: Zope
2.6planning)


 What about something like apple's Extension Manager, where you could
 disable/enable 'sets' of products?  Though frankly, it's not too tough to
 just move the subdirectory somewhere and restart...  but it would be a way
 to have a TTW way of configuring your Zope, and having the option of
 'loading up' the distribution with optional stuff (which might be disabled
 by default?)

  From: Adrian Hungate [EMAIL PROTECTED]
 
  I think that monkeypatching goes right to the very heart of the
language -
  Python was written not just to allow it, but it's opperation almost
  encorages it (Sort of). HOWEVER, I am somewhat against a monkeypatch
being
  made part of the core distribution (No disrespect to the authors of such
  products - me included), these should be optional downloads, up to the
point
  that the code is rolled into the core codebase.


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



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



Re: [Zope-dev] CallProfiler (was: MonkeyPatching in the Core (was: Zope 2.6 planning))

2002-03-05 Thread Adrian Hungate

Sorry, I think this was a mental aberration, as I have been completely
unable to find the email I thought I saw in the archives... I must have been
thinking of something else, and someone else, and for the life of me I can
not think who, or what... Sorry.

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Richard Jones [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Adrian Hungate [EMAIL PROTECTED]
Sent: Tuesday, March 05, 2002 12:04 AM
Subject: [Zope-dev] CallProfiler (was: MonkeyPatching in the Core (was: Zope
2.6 planning))


 On Tue, 5 Mar 2002 10:54, Adrian Hungate wrote:
  The call profiler seems to be a very popular feature, and it seems to
  provide very useful information. It's not rock solid yet (I am sure I
even
  remember it's author saying this a day or so ago)

 Any idea what I might have been referring to? I don't recall having said
 anything about the profiler in any forums except these about any topic
other
 than integrating it into the core. And certainly nothing about stability.

 Mind you, I was quite ill late last week, and I might have unwittingly
sent
 some email off in my delerious state... :)


 Richard

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



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



Re: [Zope-dev] Cookie Crumbler and similar products (Re: Zope 2.6 project updated)

2002-03-05 Thread Adrian Hungate

As far as I can tell from my experiences at work, the answer is somewhere in
between. Yes it acts on all User Folders below the folder containing the CC,
but it seems to get a little confused if the DTML scripts (Or at least some
of them) are not in the same folder with each UF.

Not fully tested as I say, but it is annoying. Didn't there used to be a UF
with a checkbox Use cookies in it's properties. Can't this functionality
be added to the basic UF API, to extend all UF's rather than adding an
acquirable object that we might rather not acquire. Surely the nature of the
logon method should be governed by some or all of the following:
1) The site designers wishes.
2) The browsers ability to do Basic Auth properly (Or at all).
3) The users preference (This might be undesirable in some cases).

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Matt Behrens [EMAIL PROTECTED]
To: Christian Theune [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, March 05, 2002 8:32 PM
Subject: Re: [Zope-dev] Cookie Crumbler and similar products (Re: Zope 2.6
project updated)


 Christian Theune wrote:

  Hmm. I didn't get an answer right now (well i don't find the question
again too)
  if the cookie crumbler would interfere subfolders (distor through
acquisition)
  or would only be active on a sibling userfolder, which he is
watching.

 I'm really not sure.  I imagine it could be troublesome.

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



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



Re: [Zope-dev] Re: MonkeyPatching in the Core (was: Zope 2.6 planning)

2002-03-04 Thread Adrian Hungate

I have to say I agree, up to a point.

I think that monkeypatching goes right to the very heart of the language -
Python was written not just to allow it, but it's opperation almost
encorages it (Sort of). HOWEVER, I am somewhat against a monkeypatch being
made part of the core distribution (No disrespect to the authors of such
products - me included), these should be optional downloads, up to the point
that the code is rolled into the core codebase.

The call profiler seems to be a very popular feature, and it seems to
provide very useful information. It's not rock solid yet (I am sure I even
remember it's author saying this a day or so ago), but it will be, and that
is the point that it should be considered for rolling in - Possibly to
replace the existing debug/profiling stuff, that seems to be somewhat
overshadowed by it...

Just my 2c (Or 0.02 E, take you pick)

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: seb bacon [EMAIL PROTECTED]
Cc: Richard Jones [EMAIL PROTECTED]; Casey Duncan
[EMAIL PROTECTED]; Anthony Baxter [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, March 04, 2002 12:54 PM
Subject: [Zope-dev] Re: MonkeyPatching in the Core (was: Zope 2.6 planning)


 seb bacon wrote:
 
   Pros - a tiny performance gain
   Cons - unpredictable interaction with future products;

 I'd rephrase that as a pro:

 Ability to work with products of the future, without the need to
understand their inner
 workings...

  not a well-known
  method of distributing products;

 Urm... that I gotta disagree with...
 Tehre are now many such products for Zope...

  not easily discoverable

 What do you mean by discoverable?

  But perhaps my 'cons' are misplaced?  Mostly, I'm uneasy that someone
  looking at ZPublisher code would have no way of knowing that
  CallProfiler hooks into it if it were monkeypatched.

 Yeah they would, 'cos CallProfiler will be well documented beforeit hits a
release and
 will onyl come into play if explicity enabled. And if you explicitly
enable it, you should
 read the documentation first...

 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 )



Re: [Zope-dev] Adding gzip compression to HTTPResponse.py

2002-02-05 Thread Adrian Hungate

I have been working on a compression patch as a component of my PatchKit
product for some time now, but I have been hitting a few problems, and had
put it to one side while I worked on a couple of other products. If people
still want to see something like this, I can bring the code out of
moth-balls and start working on the problems.

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Brad Clements [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 05, 2002 10:34 PM
Subject: [Zope-dev] Adding gzip compression to HTTPResponse.py


 I'm looking for architectural suggestions for adding gzip compression to
 HTTPResponse for text types.

 First, I just wanted to compress xml-rpc output, since I'm returing lots
of table data as
 XML text (not objects), then loading that text/xml into a DOM for XSLT
processing.

 I hacked the attached code into HTTPResponse, at the end of setBody. It
works for
 xml-rpc responses and I suppose any text output, so long as the response
object has a
 header named dogzip set.

 I know dogzip is a stupid name, but this is just a testing thing.

 Representative compressions:

 compress oldlen  150366 new len 11926
 compress oldlen  204382 new len 14170
 compress oldlen  12746 new len 1364

 As you can see, very useful compressions for xml-rpc output.

 But for HTML output, what's really needed is I think a special kind of
Cache Object.
 One that combines HTTP Caching with Ram caching to keep gzip compressed
objects
 in memory.

 Some HTML pages are really quite large, and gzip compression can make a
noticable
 difference. Just the javascript code sizes themselves are .. really big.

 For xml-rpc, obviously every response must be compressed if it's worth
it, and I can
 see that having to set a response property on a per request basis is
appropriate for
 xml-rpc.

 But for text file objects, Page Templates and stuff.. How does setBody
work with Ram
 Cache objects? I have some ideas...

 Anyone think this is worthwhile?

 Also, RESPONSE.setBody really should have access to REQUEST.headers.
What's
 the clean way to do that? Just pass the request object to response
object's init
 method?

 Here's quick gzip compression hack-in, based on code posted by Neil
Schemenauer

 Thanks Neil.

 Added about line 265 in HTTPResponse.py in Zope 2.5 B3

 try:
 dogzip = self.headers['dogzip']
 del self.headers['dogzip']
 if dogzip and split(content_type,'/')[0] == 'text':
 body = self.body
 startlen = len(body)
 import zlib, struct
 _gzip_header = (\037\213 # magic
 \010 # compression method
 \000 # flags
 \000\000\000\000 # time
 \002
 \377)
 co = zlib.compressobj(6,zlib.DEFLATED,-zlib.MAX_WBITS,
   zlib.DEF_MEM_LEVEL,0)
 chunks = [_gzip_header, co.compress(body),

co.flush(),struct.pack(ll,zlib.crc32(body),startlen)]
 z = join(chunks,)
 newlen = len(z)
 print compress oldlen ,startlen,new len,newlen
 if newlen  startlen:
 self.body = z
 self.setHeader('content-length', newlen)
 self.setHeader('content-encoding','gzip')
 except:
 pass



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


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



___
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] Urgent help required

2002-01-30 Thread Adrian Hungate

It uses the configuration set on the ODBC DSN I think. At least that is what
appears to happen.

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Peeyush Garg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 12:41 AM
Subject: [Zope-dev] Urgent help required


Hi,

Thanks for all the answers for running Zope (Linux) and MS-SQL(WinNT). Now I
have a different scenario. In case I use Win2K and MS-SQL-Server 2000, I
need to use ZODBCDA. Now my question is that does Zope use connection
pooling how do I configure that? If not, then suppose I get 10 database
requests, does it put them in queue (opening only one connection) or it
executes them parallely opening 10 separate connections?

Thanks,
Peeyush Garg.



___
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 on Linux and Database as MS-SQL Server on WinNT

2002-01-29 Thread Adrian Hungate

Just to paint the complete picture (As I think the readme/news article does
not at the moment).

1) The ODBC Socket Server software for the Windows database server can be
downloaded from http://odbc.sourceforge.net/ which is the primary source for
Team FXML's excellant product.

2) The next releases of XMLKit and ZDataQueryKit will see the ODBC Socket
Server Client move from XMLKit to ZDataQueryKit (Sorry about this) so that
they can all use the new relational logic and visual design tools. XMLKit
will continue to support the product (Erm somehow), but you will not be able
to add the XMLKit version. (I'll make a more detailed and understandable
announcement when I get all the bugs worked out).

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Paul Everitt [EMAIL PROTECTED]
To: Peeyush Garg [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 10:35 PM
Subject: Re: [Zope-dev] Zope on Linux and Database as MS-SQL Server on WinNT



 Take a look at:

http://www.zope.org/Members/haqa/XMLKit/news-1.1.1

 Adrian made an interface to ODBC Socket Server.

 --Paul

 Peeyush Garg wrote:
  Hi,
 
 
 
  What's the current best solution to utilize the combination of Zope on
  Linux and Database as MS-SQL Server running on WinNT. I don't find much
  information searching the Zope web site. Can somebody point me to some
link?
 
 
 
  Thanks,
 
  Peeyush.
 




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



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



Re: [Zope-dev] Defining Interfaces

2002-01-28 Thread Adrian Hungate

This is based on the new Python 2.2 stuff, isn't it? I would guess the
answer would be You exclude the 'self' first arg in a class method.
Unfortunately I am still trying to digest what has changed in Python 2.2, so
I am probably not the best person to answer beyond this point. There was a
link on here (Or was it -announce) to the change docs for 2.2, that might
give you some pointers.

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: Jeffrey P Shell [EMAIL PROTECTED]
Cc: Steve Alexander [EMAIL PROTECTED]; zope-dev [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 3:17 PM
Subject: Re: [Zope-dev] Defining Interfaces


 Jeffrey P Shell wrote:
 
  On 1/27/02 11:25 AM, Steve Alexander [EMAIL PROTECTED] wrote:
 
   Hi folks,
  
   When I define an Interface, are the methods of the interface supposed
to
   have self as the first argument?
 
  No.

 Can you expand on this a little?

 It doesn't make sense to me to exclude 'self'...

 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 )



Re: [Zope-dev] How to automatically redirect publishing request to another folder?

2002-01-24 Thread Adrian Hungate

Try using a site access rule, it's almost as powerfull as the traversal
roulette, but it happens after zope has finished traversing. You could write
a Python Script, something like:

=

import string

if string.split(context.REQUEST['PATH_INFO'], '/')[-1] ==
'my_parent_folder':
 context.REQUEST.RESPONSE.redirect('my_first_slide')


=

CAUTION: Remember how to turn off site access rules (Adding
_SUPPRESS_ACCESSRULE to the begining of the path) incase it all goes wrong
:)

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Craeg K. Strong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 25, 2002 6:51 AM
Subject: [Zope-dev] How to automatically redirect publishing request to
another folder?


 Hello:

 We have a Slideshow product that is similar to OrderedFolder in that it
 maintains an ordered
 list of contents.  Each subfolder represents a slide.   To view a
 particular slide, you navigate to the
 subfolder, it automatically calls index_html,  and there's your slide.

 All of the slides actually acquire their index_html DTMLDocument from
 high up on the food chain.   The index_html in turn calls dtml-var
 body   and the body is, of
 course, different for each slide.   This is convenient, b/c each slide
 shares header/footer/etc.

 My problem is this.  When you type in the URL of the top level folder
 (that is, the slideshow folder itself)
 I want Zope to behave as if you typed in the URL of the first slide
 automagically.   The Slideshow product
 has an easy way to get our mitts on the firstSlide object, so that part
 is not a problem, but I cannot get it to work.

 Of course, if I create an index_html() method directly in my
 Slideshow.py, that screws up my acquisition.
 Zope dies with an infinite recursion.

 Next try: using __bobo_traverse__()   That is a little bit nasty, b/c
 you have to figure out whether you are
 the end destination or if Zope is just passin' thru.
 [ See http://www.zope.org//Members/andym/wiki/MessingWithTraversal ]

 Nothing works quite right.   Conceptually I know what I want to do:
 call index_html on firstSlide()
 in the _context_ of firstSlide().   However, my Zope Zen is failing me.
Has anyone done something like this?

 Thanks in advance!

 --Craeg


 ___
 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] Testing my product

2002-01-17 Thread Adrian Hungate

I have had a lot of interest in a couple of my products, and I would like to
ensure they are as stable as I can make them. I have heard a lot on here
about unit-testing, is there a guide to creating unit-tests? Is there a
procedure, or something to follow so that I can be sure I am testing the
right things?

Any help would be greatly appreciated.

Adrian...

--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.



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



Re: [Zope-dev] Re: [Zope] Security Assertions

2002-01-17 Thread Adrian Hungate

Just a quick note on this point, there are two points during startup when a
product can get control:
1) When the __init__.py is imported
2) When the initialize function within that __init__.py is called.

These seem to occur quite far apart in terms of loaded modules so to get
something done early, do it at import time.

If you want a look at another monkeypatch type product, take a look at
PatchKit http://www.zope.org/Members/haqa/PatchKit .

Hope this helps

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious into
the direct, and misfortune into gain.
- Sun Tzu


- Original Message -
From: Chris McDonough [EMAIL PROTECTED]
To: Godefroid Chapelle [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 17, 2002 1:50 PM
Subject: Re: [Zope-dev] Re: [Zope] Security Assertions


  I do not know what you mean by a 'monkeypatch' but it is certainly worth
  it to add the patch to 2.3.x and 2.4.x branches.

 Thanks very much for the patch!  We don't maintain 2.3.X anymore (at
 least not that I know of, although somebody probably should).  And the
 2.4 branch is a little up in the air at the moment.  There will be a
 2.4.4 to fix crashing issues but I don't know what the policy will be
 for introducing noncrash bugfixes.  2.5 already has the fix.

 So... this is why I suggested a monkeypatch.  What I meant by
 monkeypatch is ... well, now you made me say it... hotfix.  There, I
 said it.  In other words, a Product that you can download and install
 that dynamically changes the running code without actually requiring
 that folks running 2.3.X/2.4.X patch their source code.

 Note that this is *not* a vulnerability in case anybody gets nervous.
 It is a bug that has to do with Zope security, but it is not a
 vulnerability.  (That's why I didn't want to use the term hotfix)

 You can make a monkey patch by creating code modeled after ZC hotfixes
 that does some specific set of steps.  In this case, you'd probably want
 to replace the ModuleSecurityInfo class/function with your fixed
 function dynamically.  Of course, in this case you'd need a way to
 arrange that it was among the first Products registered (in order for
 the other Products to make use of the patched function).  I think
 Products are initialized alphabetically, but may be wrong.  ;-(

 --
 Chris McDonoughZope Corporation
 http://www.zope.org http://www.zope.com
 Killing hundreds of birds with thousands of stones


 ___
 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] Accessing objects starting with _

2002-01-15 Thread Adrian Hungate

I know that Zope uses the fact that an object or method starts with _ as a
security feature, but is there a way of circumventing it? I am looking at
the posibility of developing a basic level of Microsoft Frontpage support,
but ALL frontpage actions contain _ in the folder names.

If there is just one point in the code that I need to add a few exceptions
to the Can't start with _ rule, then I can do that - This project is
fairly important.

Adrian...
--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.



___
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] Accessing objects starting with _

2002-01-15 Thread Adrian Hungate

Now there is an idea. Not product'able (Is that a word?) but it might work
for this specific instance.

Thanks

Adrian...
--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.

- Original Message -
From: Dieter Maurer [EMAIL PROTECTED]
To: Adrian Hungate [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, January 15, 2002 8:02 PM
Subject: Re: [Zope-dev] Accessing objects starting with _


 Adrian Hungate writes:
   I know that Zope uses the fact that an object or method starts with _
as a
   security feature, but is there a way of circumventing it? I am looking
at
   the posibility of developing a basic level of Microsoft Frontpage
support,
   but ALL frontpage actions contain _ in the folder names.
  
   If there is just one point in the code that I need to add a few
exceptions
   to the Can't start with _ rule, then I can do that - This project is
   fairly important.
 You can use a SiteAccess AccessRule to map the _ transparently
 to something different.

 There are HowTos on Zope.org on how to use SiteAccess for similar
 tasks.


 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 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] One object where there should be two

2002-01-15 Thread Adrian Hungate

I am having a problem with XMLKit. I have the following code in which should
use one disk based DTML Method and produce two slightly different creation
forms, one for XML and one for RSS (a specialization of the XML form):-

manage_addRSSDocumentForm = Globals.DTMLFile('www/addXMLDocument',
globals(), kind='RSS')
manage_addXMLDocumentForm = Globals.DTMLFile('www/addXMLDocument',
globals(), kind='XML')

The problem is that both of my constructors run the RSS form, the XML
version never gets displayed. I have checked the code in __init__ and it
appears fine:-

context.registerClass(
XMLDocument.XMLDocument,
meta_type='XML Document',
permission='Add XML Documents',
icon='www/XMLDocument.gif',
constructors=(
XMLDocument.manage_addXMLDocumentForm,
XMLDocument.manage_addXMLDocument,
),
)
context.registerClass(
XMLDocument.RSSDocument,
meta_type='RSS Document',
permission='Add RSS Documents',
icon='www/RSSDocument.gif',
constructors=(
XMLDocument.manage_addRSSDocumentForm,
XMLDocument.manage_addRSSDocument,
),
)

I've tried just about everything I can think of, can anyone shed any light?
Is this a special rule I have broken?

Thanks.

Adrian...

--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.



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



Re: [Zope-dev] Re: [Zope] ATENCION COMPATRIOTAS

2001-12-30 Thread Adrian Hungate

It's ok, the way the email was composed means that it will take on 3 local
names as the sender when it arrives. No one else saw it coming from you.

I was concerned for a moment when I saw it, that people thought I had sent
it, or even worse, that my machine was an open relay. But I think this is
just a case of someone abusing not only the internet, email, zope, and us,
but also RFC822.

Adrian...

--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.

- Original Message -
From: Dirk Datzert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, December 29, 2001 9:35 AM
Subject: [Zope-dev] Re: [Zope] ATENCION COMPATRIOTAS


 I need to say that the email with the subject above came not from me or
 a member of Rasselstein-Hoesch.

 The eMail-Adresses aren't real and unverified to this mailinglists

 Dirk Datzert
 Rasselstein Hoesch
 IT-Department
 postmaster and webmaster

 [EMAIL PROTECTED], [EMAIL PROTECTED],
 [EMAIL PROTECTED] schrieb:




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



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



Re: [Zope-dev] RAMCacheManager and gzip

2001-12-10 Thread Adrian Hungate

Ok, that was my though, so I have uninstalled IE6, just incase the install
was broken, and I will do some more testing tonight. I really need to put
this to one side in favour of another caching problem I have been asked to
look at though. I will probably pick it up again in a day or two.

Adrian...

--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.

- Original Message -
From: Martijn Jacobs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 2:42 PM
Subject: Re: [Zope-dev] RAMCacheManager and gzip


  There is zlib support in Python, and it is used in Medusa already.
ZServer
  does not call it, but the compression stuff is there.
 
  There is one good reason not to use zlib though, Micro$oft Internet
  Distorter does not support content-encoding: gzip and for
content-encoding:
  compress it expects data to be compressed using the Unix compress
tool... (I
  think someone reported this already... oh well)

 Hmm, how does mod_gzip compress it then? In every request I get from IE
 includes the accept-encoding: gzip string, and apache is sending it
 gzip-compressed back. Do you mean that the mod_gzip is compressing it
 different then zlib?

 mart(ijn)






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



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



Re: [Zope-dev] RAMCacheManager and gzip

2001-12-10 Thread Adrian Hungate

Ok, I stand corrected (and with egg on my face for abusing zlib). The moral
of the story is that zlib.compress(data) is NOT the same as gzip data
browser (Which I guess I should have known). Thanks for the pointer Jan!

I think I have figured out what I did wrong, but I now have compression
working for IE

If anyone wants the patch to play with, drop me a line (It's a file to add
to the PatchKit folder. PatchKit auto-loads all patches it finds - just
restart Zope, or refresh PatchKit).

Adrian...

--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.

- Original Message -
From: Adrian Hungate [EMAIL PROTECTED]
To: Martijn Jacobs [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 6:13 PM
Subject: Re: [Zope-dev] RAMCacheManager and gzip


 Ok, that was my though, so I have uninstalled IE6, just incase the install
 was broken, and I will do some more testing tonight. I really need to put
 this to one side in favour of another caching problem I have been asked to
 look at though. I will probably pick it up again in a day or two.

 Adrian...

 --
 Adrian Hungate

 All views expressed in this email are those of the whole world, however
some
 people don't realise this yet.

 - Original Message -
 From: Martijn Jacobs [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, December 10, 2001 2:42 PM
 Subject: Re: [Zope-dev] RAMCacheManager and gzip


   There is zlib support in Python, and it is used in Medusa already.
 ZServer
   does not call it, but the compression stuff is there.
  
   There is one good reason not to use zlib though, Micro$oft Internet
   Distorter does not support content-encoding: gzip and for
 content-encoding:
   compress it expects data to be compressed using the Unix compress
 tool... (I
   think someone reported this already... oh well)
 
  Hmm, how does mod_gzip compress it then? In every request I get from IE
  includes the accept-encoding: gzip string, and apache is sending it
  gzip-compressed back. Do you mean that the mod_gzip is compressing it
  different then zlib?
 
  mart(ijn)
 
 
 
 
 
 
  ___
  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 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] Integrating mailman with Zope?

2001-12-06 Thread Adrian Hungate

I've been away and I am only just catching up with Zope-dev. I have been
working on a ZCGI product for a long time, but I keep getting stuck when I
try to port it to Windows (No pipes - No nothing in fact) :(

If you want to look at the code, drop me a line

Adrian...

--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.

- Original Message -
From: Fred Wilson Horch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 26, 2001 5:39 PM
Subject: [Zope-dev] Integrating mailman with Zope?


 Hi everybody,

 After a hiatus on our project to integrate Mailman and Zope 2.3.x here
 at EcoAccess, we're about to tackle it again.

 Has anyone out there tried this already?  Last we heard, Mailman was
 a standalone CGI program, and in order to make it work with Zope you
 had to run both Mailman and Zope behind another web server (such as
 Apache).

 What we're planning to do is write a CGI product for Zope 2.3.3 so that we
 can run CGI programs with ZServer under Zope, eliminating the need to set
 up and configure Apache or any other web server.

 If you've already written a CGI Zope product (i.e., a product that lets
 you run CGI programs from any Zope folder), please let me know! Otherwise,
 I'll continue the experiments. ;-)

 Best regards,
 Fred
 --
 Fred Wilson Horch mailto:[EMAIL PROTECTED]
 Executive Director, EcoAccess http://ecoaccess.org/
 P.O. Box 2823, Durham, NC 27715-2823 phone: 919.419-8567

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



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



Re: [Zope-dev] Open Letter to zope-dev

2001-12-06 Thread Adrian Hungate

You might have a point there. RedHat seem to have quite a functional
business model going on, perhaps zope could borrow some ideas from there. I
know that many people that currently run Linux (Home and work) would no do
so except for RedHat, Suse or Mandrake.

Adrian...

--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.

- Original Message -
From: Joachim Werner [EMAIL PROTECTED]
To: Jeffrey P Shell [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, December 01, 2001 12:33 AM
Subject: Re: [Zope-dev] Open Letter to zope-dev


  Where's the $99 version of Zope?  The $499?  The $1499?  The
  $25999?  Zope Corp hasn't pulled that card out like many other
  vendors have.  There are actually many pieces of Zope that were
  initially commercial add-ons (or intended to be) that are now all
  open source.

 I sometimes have the feeling that we might NEED a $xx(x) version of
Zope --
 a ready-to-go, preconfigured Zope distro with a decent manual.

 Not for us, the community, but for the average user. O.k., we could do it
 for free, but would there be a Red Hat or SuSE Linux distro if it was
 totally for free? It even CAN be downloaded for free, and still people are
 willing to pay for it. And the money is needed. Without the support from
the
 major Linux distributors, projects like XFree would probably be in big
 trouble ...

 This is a totally different business model than the one Zope Corp. is
using
 right now, but it might help refinancing the overhead a good community
needs
 to have ...

 Just my 2 (euro)cents ...

 Joachim


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



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



Re: [Zope-dev] RAMCacheManager and gzip

2001-12-06 Thread Adrian Hungate

Just to let you know, I am looking at patching ZServer using my PatchKit
product to do Content-Encoding: ... stuff... anyone interested in testing
when I get it running?

(Probably a couple of days before I get a running version...)

Adrian...

--
Adrian Hungate

All views expressed in this email are those of the whole world, however some
people don't realise this yet.

- Original Message -
From: JanStiller T-Online [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 31, 2001 4:50 AM
Subject: [Zope-dev] RAMCacheManager and gzip


 Hi,

 Is it possible to marry the RAMCacheManager and gzip?

 I'm just working on a little shop and - for speed's sake - do 'ram-cache'
 the article-listings and push all the Zope-Content through mod_gzip. With
 this combination, I'm getting it 3x faster in Zope and 5x faster over the
 wire (normally 64k). That's great so far. But I don't see any sense in
 zipping cached content over and over, so I tried to zip the cached data in
 RAMCacheManager. In my first attempt, i replaced:


 ZCache_get (RAMCacheManager.py):

 entry.access_count = entry.access_count + 1
 return entry.data

 with:

 entry.access_count = entry.access_count + 1
 ob.REQUEST.RESPONSE.setHeader('Content-Encoding','compress')
 return zlib.compress(entry.data)


 The results:

 1.
 This works with Mozilla 0.96 only for very small entry.data. When I set
 entry.data to 'XX', it works, but any real page gets
 'htmlbody/html/body' as the result.

 2.
 This doesn't seem work in IE alltogether. (with 'Content-Encoding: gzip' -
 zlib.compress != gzip!?)


 I'm willing to spend some days of work for this feature, but although I
have
 2 years experience in Python I'm quite new to Zope and Internet-RFC's
 and this is definitely a point, where I would appreciate some hints from
 more experienced Zope-programmers (or a product, of course -- or the
 statement, that this won't be possible... ;o)



 regards

 Jan Stiller


 P.S. sorry, if my words seems a bit confused, I'm more used to reading
than
 writing english...




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



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



Re: [Zope-dev] Wild and crazzzzy idea: Hierarchial permissions

2001-12-05 Thread Adrian Hungate

Limiting the list of products in the Add Object list can be done currently
using my PatchKit product - http://www.zope.org/Members/haqa/PatchKit

(It does some other stuff too)

Adrian...
- Original Message -
From: Oliver Bleutgen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 12:22 PM
Subject: Re: [Zope-dev] Wild and cray idea: Hierarchial permissions


Lennart Regebro wrote:

 The list of permissions is getting quite long. It's the basic permissions
of
 Zope, plus the ones for our CM system. And we haven't even integrated CMF
 with it (which we may or may not do in the future).

 To make things easier to find we have names all our permissions Easy
 something. I then got the idea that the permission list could be
 hierarchial or filtered or grouped or something. All permissions would
have
 another setting to specify it group. That way the Zope base permissions
 could be grouped together into a Zope Base persmission group. We could
 group our in an Torped Easy Publisher permission group, and so on.

 Good idea or stupid?

Well, for your use you could just hardcode some permission groups and
include them in the dtml-file which resembles zopes security screen.
A little bit javascript and selecting one of your groups would
automagically be checked when you check one of your groups.

What I'm missig more is flexibility for the Add object mechanism.
The possibility to install products not globally, but locally for a
folder and it's subfolders and some hierachical sorting of add type
selectbox.
Perhaps the tree could be (ab-)used to get a structure like

+ text product
- DTML Document
- DTML Method
+ Images, Files
- Image
- File
+ SQL Stuff
- ZSQL Method
- PoPy Database Connection
- Search Interface

etc

To get back to the topic, perhaps your wishes and mine could be
combined: A permissions group for edit text products which would
automatically select the right permissions.

cheers,
oliver





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



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



Re: [Zope-dev] Any interest in a set of Zope products to support CVS-versioned, XML/XSLT-based Zope development?

2001-10-31 Thread Adrian Hungate

I'll leave the CVS to others, XML stuff is right where I am looking at the
moment. My XML kit is not standards based (And anyone who has spoken to me
about XMLKit will know that I don't like the current SAX/DOM implementations
in python as they try to make Python think like Java...). I have been
looking to greatly improve the proccessing in my XMLDocument because it is
currently both counter-intuitive and clumsy to use. I may have
misunderstood, but my XMLFile and XMLProxy objects my provide some of what
you were taking about with the Zope access to XML both inside and outside of
your Zope.

Maybe we can move XMLKit in the directions you are talking of aswell?

The two criteria that I have are:
1) The code needs to be Python, not C (For now at least) for the platform
independance. (A number of Zope products I would love to use will only run
on one platform and I need complete platform independance for most of my
installations).
2) The product needs to be easy enough to use that a someone who is not an
XML-guru can use it to good effect.

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious
into the direct, and misfortune into gain.
- Sun Tzu

- Original Message -
From: Craeg K. Strong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, October 31, 2001 2:30 AM
Subject: [Zope-dev] Any interest in a set of Zope products to support
CVS-versioned, XML/XSLT-based Zope development?


 Greetings!

 We at Ariel have recently started using Zope and, needless to say, we
 are enjoying a large increase in productivity
 compared to our previous Apache-Cocoon2-Tomcat-Servlet-dbXML-Java
 environment.   In our opinion, Zope
 is about a year or two ahead of where these guys are in many respects.
  Kudos!

 The main problems we faced while moving to Zope were these:

 - how to support version control, branching, merging, tagging, etc.
 etc.  (we use CVS)
 - how to support our XML/XSLT-pipeline based document publishing
 paradigm (cf Cocoon2)

 We have seen several efforts underway to address these issues within the
 Zope community.   We have gone a slightly different
 direction, but hope to contribute to these efforts in some way. In
 our environment:

 - multiple author/developers work on the same documents at the same time
 - we work on content for several clients at the same time
 - web pages are cobbled together from content pulled from several XML
 documents, according to a PagePolicy
(similar to the way articles are collected and pasted into a
 newspaper page).
 - the PagePolicies can be changed independent of the underlying content
 (header-body-leftmargin-footer, header-body, etc)
 - all content is in XML, transformed into HTML/DTML by XSLT.
 - we use lots of tools other than Zope, so we want to keep our content
 in XML, not pickled Zope objects. (hold the pickles ;-)

 In order to make all this work, we created three Zope Products:

 ExternalFile:
 Points to a file in the filesystem.  Unlike ExtFile, it is not copied
 into a repository directory, but remains in situ
 Behaves similarly to a symbolic link in UNIX or windows shortcut.
 Metadata stays in Zope, but content stays in the file.
 index_html and __call__ return the content as if it were a real Zope
 object, so Zope doesn't know the difference. :-)
 Due to permissioning and other possible problems, this is probably only
 appropriate for development, not production.
 In future, we hope to add an option to copy in the content to ZODB,
 essentially converting it to a DTMLDocument.  At that
 point we will probably rename the class ExternalizableFile  more on
 this later.

 CVSFile:
 inherits from ExternalFile.Same thing, but the file is assumed to be
 inside of a CVS sandbox.   Includes buttons for doing
 normal cvs commands.   Sandboxdir is stored in a cookie, so each
 developer can access his own sandbox via THE SAME ZOPE OBJECT.
 That is, all developers can share a single Zope server but each see
 content from his own sandbox.   (play in your own sandbox :-)
 This avoids the locking issues and other problems inherent in things
 like CVSwebClient.   It also enables the content to
 stay native rather than becoming a Zope extract like in
 ZCVSMixin/ZCVSFolder.

 XMLDocument:
 (Sorry for the name clash).  Inherits from CVSFile.Has a notion
 of a transformer property that points to an XSLT transformer.
 This enables it to be rendered automatically into HTML when __call__ or
 index_html is called.The underlying XML file
 can either be external or not.  The XMLDocument object represents the
 entire file, as opposed to the parsedXML stuff that explodes
 a single document into multiple Zope objects for each XML node (correct
 me if I am wrong...)

 There is lots more to do, but we do have initial development versions of
 all three working in the lab.   Is there interest in this kind
 of Product?   Would it be considered heretical? ;-)   Are others working
 

Re: [Zope-dev] improving str(REQUEST)

2001-10-30 Thread Adrian Hungate

This sugestion gets my vote. Simple enough that it could be implemented
without major work, transparent enough for people debugging, but making the
REQUEST object more accessible to non-experts.

I like!

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious
into the direct, and misfortune into gain.
- Sun Tzu

- Original Message -
From: Jens Quade [EMAIL PROTECTED]
To: seb bacon [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 30, 2001 2:55 PM
Subject: Re: [Zope-dev] improving str(REQUEST)


 seb bacon [EMAIL PROTECTED] writes:

  Yes, I think you are right about collapsible trees getting in the way
  when debugging.  Where trees are useful is when you don't know what
  you are looking for, i.e. newbies trying to understand Zope, so I
  think there's still a case for it.

 A short introduction (with link to the help system?!) and a small TOC
 with local links into the request at the top of the REQUEST
 representation may be more useful than a clickable tree. And easier
 to implement, too :)

 jens



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



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



Re: [Zope-dev] WebDAVLocks lost in Control_Panel (was:: [ZPT] how to unlock a webdav locked element ????)

2001-10-27 Thread Adrian Hungate

erm... I wrote a function in one of my products that contained something
like:

delattr(Control_Panel_Reference, '_objects')

Dirty but it seems to work :) It allows the class attribute to show through
and there have been no obvious ill effects.

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious
into the direct, and misfortune into gain.
- Sun Tzu

- Original Message -
From: Robert Rottermann [EMAIL PROTECTED]
To: Adrian Hungate [EMAIL PROTECTED]; Dieter Maurer
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, October 27, 2001 9:49 AM
Subject: Re: [Zope-dev] WebDAVLocks lost in Control_Panel (was:: [ZPT] how
to unlock a webdav locked element )


 and how did you delete _objects from the control panel ??
 Robert
 - Original Message -
 From: Adrian Hungate [EMAIL PROTECTED]
 To: Dieter Maurer [EMAIL PROTECTED]; Robert Rottermann
 [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, October 26, 2001 11:51 PM
 Subject: Re: [Zope-dev] WebDAVLocks lost in Control_Panel (was:: [ZPT]
how
 to unlock a webdav locked element )


  I suspect this is a bug. I thinmk it is due to upgrading your data.fs
from
  an earlier version of Zope. At some point in time Control_Panel has been
  created as a object in data.fs, and this object has an _objects tuple
that
  contains the objects from 2.2 or more likely 2.3...
 
  I have this at work, where the same data.fs has been upgraded from 2.1.x
 to
  2.4 and I had to manually remove the Control_Panel instance's _objects
  tuple, then everything worked fine.
 
  I do not see this at home where I have a fresh 2.4.1 install.
 
  Adrian...
 
  --
  The difficulty of tactical maneuvering consists in turning the devious
  into the direct, and misfortune into gain.
  - Sun Tzu
 
  - Original Message -
  From: Dieter Maurer [EMAIL PROTECTED]
  To: Robert Rottermann [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Sunday, October 21, 2001 4:59 PM
  Subject: [Zope-dev] WebDAVLocks lost in Control_Panel (was:: [ZPT] how
 to
  unlock a webdav locked element )
 
 
   Dieter Maurer writes:
 Robert Rottermann writes:
   I do not really understand this answer.
   Should there be such lock management??
   I have not found it?
 Sorry, you are right.

 I was convinced, I saw it there. But when I checked after receiving
 your reply, I did not find it either. Maybe wishful thinking
   I rechecked (do not like to be wrong...):
  
 There should be a DavLocks entry in the Control_Panel
 between Versions and Products.
  
 I am now sure, I have seen it.
  
 It is still in the code
  App.ApplicationManager.ApplicationManager._objects
 but objectItems now longer finds it and therefore, it is no longer
 shown in the control panel.
 I do not (yet) understand why
  
   You can use it anyway:
  
   http://your zope/Control_Panel/DavLocks/manage
  
  
   I will report, when I found out why it is no longer shown.
  
  
   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 maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope )
 



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



Re: [Zope-dev] WebDAVLocks lost in Control_Panel (was:: [ZPT] how to unlock a webdav locked element ????)

2001-10-26 Thread Adrian Hungate

I suspect this is a bug. I thinmk it is due to upgrading your data.fs from
an earlier version of Zope. At some point in time Control_Panel has been
created as a object in data.fs, and this object has an _objects tuple that
contains the objects from 2.2 or more likely 2.3...

I have this at work, where the same data.fs has been upgraded from 2.1.x to
2.4 and I had to manually remove the Control_Panel instance's _objects
tuple, then everything worked fine.

I do not see this at home where I have a fresh 2.4.1 install.

Adrian...

--
The difficulty of tactical maneuvering consists in turning the devious
into the direct, and misfortune into gain.
- Sun Tzu

- Original Message -
From: Dieter Maurer [EMAIL PROTECTED]
To: Robert Rottermann [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, October 21, 2001 4:59 PM
Subject: [Zope-dev] WebDAVLocks lost in Control_Panel (was:: [ZPT] how to
unlock a webdav locked element )


 Dieter Maurer writes:
   Robert Rottermann writes:
 I do not really understand this answer.
 Should there be such lock management??
 I have not found it?
   Sorry, you are right.
  
   I was convinced, I saw it there. But when I checked after receiving
   your reply, I did not find it either. Maybe wishful thinking
 I rechecked (do not like to be wrong...):

   There should be a DavLocks entry in the Control_Panel
   between Versions and Products.

   I am now sure, I have seen it.

   It is still in the code
App.ApplicationManager.ApplicationManager._objects
   but objectItems now longer finds it and therefore, it is no longer
   shown in the control panel.
   I do not (yet) understand why

 You can use it anyway:

 http://your zope/Control_Panel/DavLocks/manage


 I will report, when I found out why it is no longer shown.


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

2001-10-06 Thread Adrian Hungate

If I understand what you are trying to do correctly, then all you need is to
have your product's icon property be a method that returns the path to the
correct icon (Like you would normally have the icon property set to). I use
this for a couple of products too.

Something like:

class MyClass( normal stuff ...):
 
def icon(self):
 
if self._i_am_broken_:
return misc_/MyProduct/MyClassBrokenIcon
else:
return misc_/MyProduct/MyClassNotBrokenIcon

You've got to love python :)

Adrian...

--
Adrian Hungate
Try Zope -
http://www.zope.org
- You might like it.
If you do, try my Zope products -
http://www.zope.org/Members/haqa
- You might like them too!


-Original Message-
From: brian.r.brinegar.1 [mailto:[EMAIL PROTECTED]]
Sent: 05 October 2001 22:05
To: [EMAIL PROTECTED]
Subject: [Zope-dev] Product Icon



I am currently working on a product which has the sole purpose of
referencing other objects. One of the properties is the path to
another Zope object. Then methods are defined like getObject(),
getPath(). We use it as a way to manage news and events that show
on several sites that opperate on our Zope server. It allows one
group to add a news document in their folder and if another group
would like that news item to show on their site they can create a
reference to it.

Anyway, what happens from time to time is an object is referencing
another object when it gets deleted/renamed/moved and that breaks the
reference. The product handles this gracefully, however I would like
to have the icon change from our standard icon to a broken icon.

Any hints?

--Brian Brinegar
  ECN Web Technician
  MSEE 104 A 494-3106
  http://www.geeksoft.net/



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

___
Zope-Dev 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 on Windows: enhancements proposed

2001-09-25 Thread Adrian Hungate

I have to disagree about the Zope (%s), I have been known to run 2 or 3 Zope
services, for different instances, and I always know that I can find them
all huddled together at the bottom of the Service Manager - Very useful.

Adrian...

--
Adrian Hungate
Try Zope -
http://www.zope.org
- You might like it.
If you do, try my Zope products -
http://www.zope.org/Members/haqa
- You might like them too!


-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: 25 September 2001 05:23
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [Zope-dev] Zope on Windows: enhancements proposed


 We'd like to propose that the service distributed with Zope move over to
 using our code.

Great, Im really looking forward to an improved Windows installation. But
lets get it out there play with it before anything major happens like
shipping Zope with it :)

 As a separate issue - we're curious about the naming of the Zope
installation
 - why is it called WebSite (and the Zope service Zope (WebSite))? The
name
 clashes with another product that's fairly well-known in the windows
 community originally from O'Reilly:
http://www.oreilly.com/software/index.html
 ... and since Zope is a fairly distinctive name ...

It is annoying but Zope wins there because OReilly isnt making WebSite
anymore. Its just a name, I find the Zope (%s) bit more annoying than
anything :)

 ps. happy to put this up as a project if required.

Thats probably a good idea. What about other issues such as install and
removing service easily later, STDERR logging not going to /dev/null, lack
of start menu icons and other windows issues...

Cheers
--
  Andy McKay



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

___
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 on Windows: enhancements proposed

2001-09-25 Thread Adrian Hungate

I edit the registry... One of my many favourite pass-times, right up there
with running out in traffic.

Seriously though, once an instance is configured, why would you want to
change it? (Assuming you get it right that is)

Adrian...

--
Adrian Hungate
Try Zope -
http://www.zope.org
- You might like it.
If you do, try my Zope products -
http://www.zope.org/Members/haqa
- You might like them too!


-Original Message-
From: Richard Jones [mailto:[EMAIL PROTECTED]]
Sent: 25 September 2001 07:33
To: Adrian Hungate; [EMAIL PROTECTED]
Subject: Re: [Zope-dev] Zope on Windows: enhancements proposed


On Tuesday 25 September 2001 16:26, Adrian Hungate wrote:
 I have to disagree about the Zope (%s), I have been known to run 2 or 3
 Zope services, for different instances, and I always know that I can find
 them all huddled together at the bottom of the Service Manager - Very
 useful.

So does that mean they have different names in the service manager? How do 
you configure the instances?


 Richard

___
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] Management Interface in ZODB

2001-07-13 Thread Adrian Hungate

You might want to look at my PatchKit product that may provide the vehicle
you need for your patch. It provides an override for the management style
sheet (Among other unrelated patches).

Adrian...

-Original Message-
From: Tim R Ansell [mailto:[EMAIL PROTECTED]]
Sent: Monday, 09 July 2001 15:03
To: [EMAIL PROTECTED]
Subject: [Zope-dev] Management Interface in ZODB


I have a couple of small patches here that allow you to override the
manage options (i.e. manage_tabs, manage_page_header,
manage_page_footer) in the ZODB. This simple patch seems a nice way to
provide this option without breaking compatibility with the current
system. It patches the App/Management.py and OFS/Application.py file.

This also causes risk of locking yourself out of management, there are 2
ways around this problem; First is to ftp/webDAV in and delete the
offending file.
I've also added a SUPPRESS_CUST_MANAGE option, (for example
abc/SUPPRESS_CUST_MANAGE/manage_main) when this is in the path it will
stop use the core zope management interface instead of the custom ones.
The problem with this is that i get a Override instance at 8189638
instead of the DTML code that should be in place of the object. As well
this option IS NOT thread safe. I'm looking for a better solution but i
can't think of one?

What do people think of this patch? Is there a better way to do this? Is
it possible to get a patch similar to this integrated into the Zope core
because it's an extremely useful.

Hope to hear from you soon

Mithro

___
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] ZClass and ZCatalog

2001-07-05 Thread Adrian Hungate

Rename the catalog from 'events' to 'Catalog' and CatalogAwareBase should
start working.

Adrian...

-Original Message-
From: Marco Nova [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 05 July 2001 09:47
To: [EMAIL PROTECTED]
Subject: [Zope-dev] ZClass and ZCatalog


Hello Guys,

I've a problem with a ZClass (JCEvent) I've created and ZCatalog.
Base classes for JCEvent are: ZObject, JCObject, CatalogAwareBase.
JCObject is another ZClass whose base class is ZObject.

Instances of JCEvent are added to a ZCatalog but they are not automatically
indexed by the catalog. The catalog is named 'events'.
How can I automaticallly index them ?


Thanks,

- mn

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

___
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] Formatted Document

2001-07-03 Thread Adrian Hungate
Title: Formatted Document





Is the code for the Formatted Document object type used in the Zope.org Members area available anywhere? I would like to use it as the basis for something I am working on.

If not I'll just roll my own STXDocument and STXMethod types.


--
Adrian Hungate
Manager, European I.S.
Acucorp UK Limited


  A Perl script is correct if it gets the job done before your boss fires you.
  - Programming Perl, Introduction 
http://www.zopezen.org/Zope/Quotes





RE: [Zope-dev] ZClass not in a Product

2001-07-02 Thread Adrian Hungate
Title: RE: [Zope-dev] ZClass not in a Product





I have to say that I agree with you Dieter. It would be very useful to have the ZClasses that relate to a project in a single branch with the rest of the project code for a number of reasons

* Security (As you said). Users could have full write permissions to one branch only.
* Backups or exporting from development to production servers. With the code all in one place, it would be possible to export the entire project from a development server and import it to the production server in one action (Ok, one action each end) eliminating the possibility of getting code and ZClasses out of sync.

* Reducing the size of the Add List - This has to be a pain for everyone!


However I also understand the appeal of having a central, restricted, ZClass repository as well, it just serves a different (Not incompatible) purpose. I think that both situations would be useful ... Now we just need to find out if they are possible. :)

--
Adrian Hungate
Manager, European I.S.
Acucorp UK Limited


  To a database person, every nail looks like a thumb. Or something like that.
  - Jamie W. Zawinski 
http://www.zopezen.org/Zope/Quotes



-Original Message-
From: Dieter Maurer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 26 June 2001 05:07
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [Zope-dev] ZClass not in a Product



Joachim Werner writes:
 I know about the duality of Python classes. I just don't see what I could
 really do with a ZClass in the instance space (reading this twice, see
 below for some possible examples). A totally different aspect is whether
 Zope should have something like an in-built support for virtual instances,
 i.e. sub-folders could be like full Zope instances, providing a local
 Products directory etc.
To clarify, you use instance here in the spirit of Zope instance
a-la INSTANCE_HOME and not in the sense of instance of a class...


That would probably be a good thing.


 I am more in favor of getting things OUT of the instance folders than
 getting more stuff in.
That is completely different from what I would like to do.


 It makes absolutely no sense to me why the Zope management interface
 displays database adaptors, user folders, and actual content objects all in
 the same folder.
It makes lots of sense for me!


 Consider a large site hosting many applications, partly
 developed and maintained by different people/departments.


 It is very nice to be able to structure the site hierarchy
 into folders corresponding to appliciations and allow each 
 team responsible for an application to put in
 everything they need for the implementation:


 database adapters, additional user definitions,
 special roles, ZClasses, 


 Zope already allows this partially. Unfortunately, the
 product registry is global and not managed similar
 to user folders.


 Your proposed virtual instances would be an alternative
 solution. I could live with it, though I would not
 think it is better.


 
 To come back to the ZClass question: I see and use them mainly as templates.
 That's what they are good for. So they should reside in a template folder.
 Right now, this folder is the Products folder. Maybe we need local
 Products/Templates folders, so that it is possible to have ZClasses that
 just work locally or that overload a base ZClass defined up in the tree. But
 what we definitely don't need is freely floating ZClasses.
I am much in favor to structure objects *NOT* according to type
(e.g. all images in a folder, all SQL methods in a folder,
all Scripts in a folder, ...) but according to
applications/services:


 One folder for each service which contains everything needed
 only for this service: images, scripts, SQL methods, content,
 ZClasses, 


 There are things that are used more globally. They may
 go into type specific folders.


 ...



Dieter


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





RE: [Zope-dev] request.set

2001-06-11 Thread Adrian Hungate
Title: RE: [Zope-dev] request.set





What this does is set a key/value pair in the REQUEST variable (Which is a sort of python dictionary, just with extra smarts).

DTML will not let you do dtml-call REQUEST['record_ids']=0 for security reasons, so the REQUEST variable has the .set method which performs the same function.

Hope this helps


Adrian...


-Original Message-
From: Derek Quayle [mailto:[EMAIL PROTECTED]]
Sent: Monday, 11 June 2001 05:47
To: [EMAIL PROTECTED]
Subject: [Zope-dev] request.set



I am fairly new to Zope and still coming to grips with it. Could
someone please explain how this piece of code works


!--#call REQUEST.set('record_ids', 0)--


Cheers
wabirdman





RE: [Zope-dev] SOAP again (or, xml-rpc client for MSIE)

2001-06-05 Thread Adrian Hungate
Title: RE: [Zope-dev] SOAP again (or, xml-rpc client for MSIE)





What are you actually trying to achive?


Adrian...



Phil Harris wrote:
 
 Brad,
 
 There are a few COM/COM+ components around that do xml-rpc.
 
 I use them with MS Word to write Word files directly to Zope for instance.
 
 Some are better than others, but ymmv so I'll hesitate to recommend one.
 
 At least one of them is listed on xmlrpc.com.
 
 Having them you could script them via jscript, and basically open up the
 connection easily.





RE: [Zope-dev] dtml-in batching improved

2001-06-05 Thread Adrian Hungate
Title: RE: [Zope-dev] dtml-in batching improved





Back before the zope.org product directory became so easy to navigate I wrote an index
that I used to use which has batch links top and bottom:


http://www.zope.org/Members/haqa/productlist/view_source


Dunno if this helps...


Adrian...


-Original Message-
From: Chris Withers [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 30 May 2001 22:03
To: Ivo van der Wijk; [EMAIL PROTECTED]; [EMAIL PROTECTED]; Simon Coles
Subject: Re: [Zope-dev] dtml-in batching improved



 When using batching in dtml-in, why is 'previous-sequence' only defined at
 the first iteration of the current batch? And why is 'next-sequence' only
 defined at the last iteration of the current batch?


I know this problem ;-)


I had it too, and stuck something in the collector about it. I did manage to
get the layout you're after without modifying Zope though (see the search
page on www.nipltd.com)


If you want the code, maybe someone at NIP could fish it out, if you can
wait until next Thursday, I'll grab it myself :-)


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] manage_tabs

2001-05-04 Thread Adrian Hungate
Title: RE: [Zope-dev] manage_tabs





Could this be an Internet Explorer failing to pass the AUTH info problem?


It sounds as though you are getting access to the edit tab via Anonymous permissions (Have you restricted access to the manage_main method using the __permissions__ settings)? In that case, Zope will not show you the other tabs because the Anonymous User is not allow to see them.

(Does it show that this one got me too???)


What version of which browser are you using?


Adrian...
--
Adrian Hungate
Manager, European I.S.
Acucorp UK Limited



-Original Message-
From: Magnus Heino (Rivermen) [mailto:[EMAIL PROTECTED]]
Sent: Friday, 04 May 2001 13:09
To: '[EMAIL PROTECTED]'
Subject: [Zope-dev] manage_tabs




Hi.


In my Zope product, I've got this;


manage_options = SimpleItem.manage_options+(
 {'label':'Edit', 'action':'manage_main'},
 )


If I view the management sceen of this product, I get four tabs (Undo,
Ownership, Security and Edit).


But If I click on Edit, all tabs but the edit tab is removed. Why?


My Edit dtml looks like this;


dtml-var manage_page_header
dtml-var manage_tabs

p class=form-help
This is the edit form.
/p

dtml-var manage_page_footer


Thanks,


/Magnus


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





RE: [Zope-dev] ZCatalog features

2001-04-30 Thread Adrian Hungate
Title: RE: [Zope-dev] ZCatalog features





Sorry... a user came into the office as I was writing that email and completely broke my train of though :( g...


What I meant to say was, I think that access to the Union and Intersection operators would be a very useful feature as long as it would not involve a change to any other documented APIs etc...

By user visible, I meant the AND/OR keyword processing in catalog queries on textindex fields. Would it be possible/easy to add this to other field types?

Adrian...



-Original Message-
From: Chris McDonough [mailto:[EMAIL PROTECTED]]
Sent: Monday, 30 April 2001 17:17
To: Adrian Hungate
Cc: [EMAIL PROTECTED]
Subject: Re: [Zope-dev] ZCatalog features



RE: [Zope-dev] ZCatalog features I think that the idea of exposing these
_in addition_ to (as opposed to instead
 of) the current way it works is a good idea.


What does these refer to here? if you mean intersection and union
operations, this is the plan.


 How hard would it be to add the current 'user visible' boolean logic to
field
 types other than text?


I'm not sure what you mean... what feature are you referring to?


Thanks!


- C



-Original Message-
From: Chris McDonough [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 28 April 2001 17:10
To: Morten W. Petersen
Cc: [EMAIL PROTECTED]
Subject: Re: [Zope-dev] ZCatalog features



Morten W. Petersen wrote:

 Hia guys,

 A couple of comments and questions about the ZCatalog:

 Is it possible to pass an argument to the catalog so that returned brains
 would instead be actual objects?
Not currentl, although the new brain objects have a method 'getObject'
that makes getting the object straightforward while you're iterating
over a bunch of them.
 Given that we have to manually join search results, because ZCatalog
 doesn't support ORs etc (for FieldIndexes), wouldn't it be useful to have
 some sort of tool that could take a set of results, and return a result
 with only unique values?
Yes. There's a propsal on dev.zope.org to expose union and intersection
operations to users of the catalog.
http://dev.zope.org/Wikis/DevSite/Proposals/UnionAndIntersectionOperations
. Comments are appreciated.
___
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] CoreSessionTracking

2001-04-23 Thread Adrian Hungate
Title: RE: [Zope-dev] CoreSessionTracking





Do you mean:


from AccessControl import getSecurityManager


security = getSecurityManager()
user = security.getUser()
userName = user.getUserName()


???


Adrian...


-Original Message-
From: Chris Withers [mailto:[EMAIL PROTECTED]]
Sent: Monday, 23 April 2001 16:57
To: Chris McDonough
Cc: Magnus Heino (Rivermen); [EMAIL PROTECTED]
Subject: Re: [Zope-dev] CoreSessionTracking



Chris McDonough wrote:
 
 Alternately (and this will be in the next CST release), add this to the
 session data object class (SessionData.SessionData):
 
 __guarded_setitem__ = __setitem__


OK, that'll teach me to read the whole thread before I post :-)


 As far as finding the currently logged in user's name, try this:
 
 context.REQUEST['AUTHENTICATED_USER'].getUserName()
 
 This is a deprecated API, however. The new one I can't find at the moment,
 though. ;-)


When you find out, can you let us know :-S


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] ZSQL and Normalized databases (or why ZSQL sucks)

2001-04-20 Thread Adrian Hungate
Title: RE: [Zope-dev] ZSQL and Normalized databases (or why ZSQL sucks)





May be I am misunderstanding your problem here, but are you suggesting that


 SELECT tab1.col1 col1, tab2.col1 col2
 FROM ... etc ...


Does not expose 'col1' and 'col2' in the namespace for you? This is not my experience. Ok, I only have about 50 ZSQL methods on my intranet but they are all complex queries with column naming clashes. If it failed to work as you are suggesting, I would not have continued using Zope - Database connectivity was one of my criteria.

The normality (or abnormality) of your databases should make no difference, (Except to how complex your individual SQL statements become). What database are you running against? Maybe you have hit a database connector bug?

I have the following query that our sales-reps use to check how much product we sold in the last 'n' days/weeks/months etc...

-
PARAMS: dDate, sOffsetSize, nOffset


SELECT DISTINCT
 Order_.Shipped_Date Date,
 Region.Region_Name Region,
 Employee.Number_ ID,
 Territory.Territory_Name Territory,
 Currency_Exchange_Rate.From_Currency_Code Currency,
 SUM(Order_.Sub_Total - Order_.Order_Discount_Amount) Local,
 Currency_Exchange_Rate.Current_Exchange_Rate * SUM(Order_.Sub_Total - Order_.Order_Discount_Amount) Dollar
FROM Region
INNER JOIN Territory ON Region.Region_Id = Territory.Region_Id
INNER JOIN Company ON Territory.Territory_ID = Company.Territory_ID
INNER JOIN Order_ ON Company.Company_ID = Order_.Bill_To_Company_ID
INNER JOIN Currency_Exchange_Rate ON Order_.Currency_ID = Currency_Exchange_Rate.From_Currency_ID
INNER JOIN Employee ON Order_.Account_Manager = Employee.Employee_Id
dtml-sqlgroup where
(Currency_Exchange_Rate.To_Currency_Code = 'USD')
dtml-and
(Order_.Status IN ('Invoiced', 'Billed', 'Shipped'))
dtml-and
(Order_.Shipped_Date IS NOT NULL)
dtml-and
(Order_.Sub_Total  0)
dtml-and
(datediff(day, Order_.Shipped_Date, 'dtml-var dDate') = 0)
dtml-and
(datediff(dtml-var sOffsetSize, Order_.Shipped_Date, 'dtml-var dDate')  dtml-var nOffset)
/dtml-sqlgroup
GROUP BY Order_.Shipped_Date, Region.Region_Name, Employee.Number_, Territory.Territory_Name, Currency_Exchange_Rate.From_Currency_Code, Currency_Exchange_Rate.Current_Exchange_Rate

ORDER BY Region.Region_Name, Employee.Number_, Territory.Territory_Name, Currency_Exchange_Rate.From_Currency_Code


-


This exposes 'Date', 'Region', 'ID', 'Territory', 'Currency', 'Local' and 'Dollar' to the calling script. I use this from a Python product, python scripts and from DTML all the time (10's or 100's of times per day at least).

As far as the 'foo=0' example, if you set foo to 0, and do nothing in between to change it, of course a test for not equal to 0 will fail, what would you expect?

Adrian...


-Original Message-
From: The Doctor What [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 19 April 2001 23:22
To: Paul Erickson
Cc: [EMAIL PROTECTED]
Subject: Re: [Zope-dev] ZSQL and Normalized databases (or why ZSQL
sucks)



* Paul Erickson ([EMAIL PROTECTED]) [010419 17:02]:
 The Doctor What wrote:
   * Loosing the variable between the form and dtml-if
 
 I don't understand this. I'm assuming that you are losing values that
 are not in your argument list. All you have to do is add the arguments.


That isn't what I mean. Try this (typed in, so it may need to be
adjusted):
paramfoo=0/param
dtml-if expr=foo != 0Life is good/dtml-if


You'll NEVER get Life is good to print out. EVER. This is because
ZSQL is setting foo to 0. But dtml-var and dtml-sqlvar both work.


   * Inability to handle table.field names for variables
   * And enough flexibility to work around the above problems
  
   This makes ZSQL extreamely nasty, and impossible to use with a
   normalized database.
 
 Database normalization isn't really an issue. It sounds like you're
 really just having problems with the syntax of joins.


Nope, can do joins. Been doing joins (mainly inner). Not the
problem. The problem is that if I have tables like:
Table1
--
id
name
desc


Table2
--
id
Table1ID -- Foreign Key thrown in for fun.
name
desc


And I join them, then I MUST rename all the selects using AS:
select
 Table1.id as id1
 Table1.name as name1
...etc


Because I can't have zsql put the variables in the caller's
namespace as Table1.id. It puts them in as id (without the AS).


Fortunately, I found the column for sqltest (which is the other end
of ZSQL):
dtml-sqltest id1 column=Table1.id 


  
   What's the point? ZSQL sucks, how do I talk to the DB directly?
 
 Grab the Python database adapter and write some python classes or
 external methods to do what you need.


Can I use them from a python script? If not, what's the point? I
mean: External methods are nice to have when you have *no other
choice*, but they aren't something I'd want to debug and deal with
for object.


  This makes things work MUCH better. So there are work arounds.
 
 This isn't a work-around, it is the way that it is intended to be used.


RE: [Zope-dev] ZSQL and Normalized databases (or why ZSQL sucks)

2001-04-20 Thread Adrian Hungate
Title: RE: [Zope-dev] ZSQL and Normalized databases (or why ZSQL sucks)





I am using ZODBC talking to an MS-SQL7 database (Yack spit), so the syntax is a little different.


As for the unchangeable defaults, I use defaults a lot, and I don't think I've ever seen your problem.


What you appear to be trying to do with the ZSQL Method in your example strikes me as 'A Bad Idea'(tm). Having the schema of the returned data change depending on the value of a parameter seems to be asking for problems (IMHO).

If you look back at the my last example, and replace the PARAMS with:


 dDate=2001/03/31
 sOffsetSize=month
 nOffset=1


This certainly does work, I just tested it. Interestingly, so does:


PARAMS: testval:int=0
dtml-if testval
select count(shipped_date) cnt
dtml-else
select count(shipped_date)/2 halfcnt
/dtml-if
from order_


If you call it with testval=1, you get a column called cnt, with testval=0 you get a column called halfcnt. Isn't this just what you are saying doesn't work?

Adrian...


--
Adrian Hungate
Manager, European I.S.
Acucorp UK Limited


-Original Message-
From: The Doctor What [mailto:[EMAIL PROTECTED]]
Sent: Friday, 20 April 2001 15:21
To: [EMAIL PROTECTED]
Subject: Re: [Zope-dev] ZSQL and Normalized databases (or why ZSQL
sucks)



* Adrian Hungate ([EMAIL PROTECTED]) [010420 05:06]:
 May be I am misunderstanding your problem here, but are you suggesting that
 
 SELECT tab1.col1 col1, tab2.col1 col2
 FROM ... etc ...
 
 Does not expose 'col1' and 'col2' in the namespace for you? This is not my
 experience. Ok, I only have about 50 ZSQL methods on my intranet but they
 are all complex queries with column naming clashes. If it failed to work as
 you are suggesting, I would not have continued using Zope - Database
 connectivity was one of my criteria.


I mean that:
 SELECT tab1.col1, tab2.col1
 FROM ... etc ...


Does not expose 'tab1.col1' and 'tab2.col1'. In otherwords, it
doesn't gracefully handle name clashes. I realize that calling out
the variable 'tab1.col1' out of the namespace is a pain, but
(hopefully) in the future it would be made easier.


Perhaps like so:
dtml-var name='tab1.col1' (note single quotes)


 The normality (or abnormality) of your databases should make no difference,
 (Except to how complex your individual SQL statements become). What database
 are you running against? Maybe you have hit a database connector bug?


Postgresql. I've tried all three of the DAs: Psyco, Popy and
PostresDA


[Nice Example Snipped]


What DB was that? The syntax isn't what I expect from Postgres,
Tandem and MySQL.


 As far as the 'foo=0' example, if you set foo to 0, and do nothing in
 between to change it, of course a test for not equal to 0 will fail, what
 would you expect?


Here is the example again, but better:
paramfoo:int=0/param
dtml-if expr=foo  0Not Zerodtml-elseZero/dtml-if


If called like so:
dtml-var expr=zsql_example(foo=200)


It will ALWAYS print 'Zero'.


This makes it hard to do something with a param that defaults to
nothing like:

paramcategory_id=/param
SELECT
 url.id,
 url.name
 dtml-if category_id,
 xref_url_category.categoryid as category_id,
 /dtml-if
FROM
 url
 dtml-if category_id,
 xref_url_category
 /dtml-if
dtml-sqlgroup where
 dtml-if category_id
 dtml-sqltest category_id column=xref_url_category.categoryid type=int
 dtml-and
 xref_url_category.urlid = url.id
 /dtml-if
/dtml-sqlgroup



You can't even replace the param with category_id:int=0 and then
check for category_id = 0 in the dtml-ifs.


I finished my project, so I'm happy for the moment. I have another
ZSQL project (a DVD, Comic Book and Video tracker for my Manga and
Anime), so I'll be back.


Thanks to everyone who spent time to help out.


Ciao!


-- 
Who are you going to believe, me or your own eyes?
 -- Groucho Marx


The Doctor What: Guru to the Gods http://docwhat.gerf.org/
[EMAIL PROTECTED] KF6VNC





[Zope-dev] Catalog in 2.3.1

2001-04-19 Thread Adrian Hungate
Title: Catalog in 2.3.1





Are there some problems with the new catalog?


I have spotted two possible problems:
1) In CatalogAware, there is a function reindex_all, which appears to have a few problems, like calling index_object instead of reindex_object. Also, why sub = self.objectValues() when sub is never used?

2) If I search a text index for a value that it does not contain, I get nothing back (No surprises there), but if I search for a word that is a substring of a word in the index, I get a Type Error (expected integer key). Did I do something wrong, or have I hit a bug?

Here is the traceback of the following search. A Title index that contains the word wibble, search for the single word wib:

Traceback (innermost last):
 File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 223, in publish_module
 File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 187, in publish
 File C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook
 (Object: catalog_support)
 File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 171, in publish
 File C:\PROGRA~1\WebSite\lib\python\ZPublisher\mapply.py, line 160, in mapply
 (Object: results)
 File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 112, in call_object
 (Object: results)
 File C:\PROGRA~1\WebSite\lib\python\App\special_dtml.py, line 127, in __call__
 (Object: results)
 File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_String.py, line 538, in __call__
 (Object: results)
 File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_Let.py, line 146, in render
 (Object: rs=quot;Catalog.searchResults(REQUEST)quot;)
 File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 334, in eval
 (Object: Catalog.searchResults(REQUEST))
 (Info: REQUEST)
 File lt;stringgt;, line 0, in ?
 File C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\ZCatalog.py, line 535, in searchResults
 (Object: Traversable)
 File C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\Catalog.py, line 651, in searchResults
 File C:\PROGRA~1\WebSite\lib\python\Products\ZCatalog\Catalog.py, line 542, in _indexedSearch
 File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line 513, in _apply_index
 File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line 576, in query
 File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line 616, in evaluate
 File C:\PROGRA~1\WebSite\lib\python\SearchIndex\UnTextIndex.py, line 448, in __getitem__
TypeError: (see above)


--
Adrian Hungate
Manager, European I.S.
Acucorp UK Limited





RE: [Zope-dev] Catalog in 2.3.1

2001-04-19 Thread Adrian Hungate
Title: RE: [Zope-dev] Catalog in 2.3.1





Does anyone know if/when this will make it into a release? I am about to deploy a Helpdesk/Knowledge Base product which is very heavily Catalog based.

--
Adrian Hungate
Manager, European I.S.
Acucorp UK Limited



-Original Message-
From: seb bacon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 19 April 2001 10:13
To: Adrian Hungate
Cc: Zope Developers List (E-mail)
Subject: Re: [Zope-dev] Catalog in 2.3.1



* Adrian Hungate [EMAIL PROTECTED] [010419 10:09]:
 Are there some problems with the new catalog?
 
 I have spotted two possible problems:
 1) In CatalogAware, there is a function reindex_all, which appears to have a
 few problems, like calling index_object instead of reindex_object. Also, why
 sub = self.objectValues() when sub is never used?
 2) If I search a text index for a value that it does not contain, I get
 nothing back (No surprises there), but if I search for a word that is a
 substring of a word in the index, I get a Type Error (expected integer key).
 Did I do something wrong, or have I hit a bug?


Don't know much about (1), but (2) is certainly a bug, and seems to
have been fixed in CVS.


seb





[Zope-dev] ZClass Permissions

2001-02-09 Thread Adrian Hungate

Is it just me, or is there a bug in the "Edit" tab of the "Zope Permission"
object used when creating ZClass products?

When I hit "Save Changes" I get:

-

Zope Error
Zope has encountered an error while publishing this resource.

Invalid request

The parameter, name, was omitted from the request.
Make sure to specify all required parameters, and try the request again.


Traceback (innermost last):
  File /usr/zope/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /usr/zope/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /usr/zope/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: RoleManager)
  File /usr/zope/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /usr/zope/lib/python/ZPublisher/mapply.py, line 155, in mapply
(Object: manage_edit)
  File /usr/zope/lib/python/ZPublisher/Publish.py, line 117, in missing_name
  File /usr/zope/lib/python/ZPublisher/HTTPResponse.py, line 570, in
badRequestError
BadRequest: (see above)

-

On closer inspection I found that the Title and Name fields both have the
name="" set to "title". ... I'm guessing this is a bug.

Adrian...


___
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] 2.3.0 release badness

2001-01-29 Thread Adrian Hungate

Does the same occur if you serve using something else ('DTML Method',
'File', 'ZStyleSheet' etc)

I have noticed problems with Netscapes handling of Text/CSS stylesheets. It
appears that long or particularly complex stylesheets that can be (And here
is the kicker) downloaded too quickly, do not seem to complete correctly and
for me they have even resulted in Netscape locking up (Linux and Win32).

Admitedly, my stylesheets were HUGE! :) - I was trying to break my
ZSytleSheet product and was browsing the sheet using Netscape on the server.

I don't know if this is related...

Adrian...




___
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] MS-SQL Server Connector

2001-01-20 Thread Adrian Hungate

Is there a database connector or similar for MS-SQL Server that might run on
non-windows Zopes?

Adrian...


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