Re: [Zope-dev] The Application object

2000-07-18 Thread Shane Hathaway

Yves-Eric Martin wrote:
 
 Shane Hathaway [EMAIL PROTECTED] wrote:
  You *must* remember to close the connection:
 
  app._p_jar.close()
 
 This is not mentionned in the above document, so I was doing without
 so far, and did not run into any problem. Now that I see it, I believe
 this is the Right Thing to Do and will include it in the release. But
 since you put an emphasis on its being required, can you tell us what
 evil things may happen if you don't close the connection? (Consuming
 ressources?)

That's correct.  Only a certain number of connections are allowed at a
time.  Currently, as the "app" object falls out of scope it should
close the connection automatically, but that may not always be the case
IMHO.

BTW if you're using this technique, be sure you're not opening two
connections in one thread.  It can prove hazardous.

Shane

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




[Zope-dev] Traceback

2000-07-18 Thread jpenny

How hard would it be to add more of the called URL to the traceback?

Background:
I have been developing relatively baroque SQL sites for internal use 
and find that when I am making changes to facilitate re-use higher up
in the hierarchy, it can be relatively difficult to find out what 
failed.  For example, I get this traceback:

Traceback (innermost last):
  File /home/jpenny/zope/Zope-2.2.0b4-src/lib/python/ZPublisher/Publish.py, line 222, 
in publish_module
  File /home/jpenny/zope/Zope-2.2.0b4-src/lib/python/ZPublisher/Publish.py, line 187, 
in publish
  File /home/jpenny/zope/Zope-2.2.0b4-src/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File /home/jpenny/zope/Zope-2.2.0b4-src/lib/python/ZPublisher/Publish.py, line 171, 
in publish
  File /home/jpenny/zope/Zope-2.2.0b4-src/lib/python/ZPublisher/mapply.py, line 160, 
in mapply
(Object: index_html)
  File /home/jpenny/zope/Zope-2.2.0b4-src/lib/python/ZPublisher/Publish.py, line 112, 
in call_object
(Object: index_html)
  File /home/jpenny/zope/Zope-2.2.0b4-src/lib/python/OFS/DTMLDocument.py, line 170, in 
__call__
(Object: index_html)
  File /home/jpenny/zope/Zope-2.2.0b4-src/lib/python/DocumentTemplate/DT_String.py, 
line 502, in __call__
(Object: index_html)
  File /home/jpenny/zope/Zope-2.2.0b4-src/lib/python/DocumentTemplate/DT_Util.py, line 
337, in eval
(Object: product_number)
(Info: product_number)
  File string, line 0, in ?
NameError: (see above)

Great, I know that I have not put product_number in as a cookie or a hidden
value, and it could not be found by acquisition.  It failed in rendering
index_html.  But there are 5 index_html's it could have failed in.

How hard would it be to change the error message to say:

Traceback (innermost last):
  Exception raised while constructing 
  http:
 .
.
 .

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

2000-07-18 Thread Chris Withers

"Phillip J. Eby" wrote:
 Yep, like "Acquisition" and "object publishing".  :)  Seriously, that is
 very much the level we're talking about here. 

I know, there are docs explaining acquisition and object publishing has
an implicit meaning. Things like 'Specialist' and 'DataSkin' don't have
implicit enough meaning unless you're on the 'inside' of ZPatterns...

 Also, as in the early days of Zope, terminology
 evolves and changes as the developers of the concepts seek better ways to
 explain them to other people.

Hmm, unlike the early days of Zope, would you mind documenting these
changes so we have more to 'grab hold of'? ;-)

snip where 'specialist' came from

Perhaps a set of 'glossary' wiki pages? These would have the name of the
object/class/type/word/whatever with links to what it used to be called
as well as to documentation abotu what it currently is and if it's been
outdated, what it's called now (and why its name changed).
I might take a hack at this for you to fill in but I doubt I have the
time or understanding to make much headway...

SteveA, you seem to get all this stuff? could you knock something up for
Ty and Phil to 'fill in'?

snip things are becoming simpler

I think I see that now, but if the wiki was kept up to date by the
people who understand it best, Ty  Phil ;-), then the rest of us might
have a chance of keeping up :-)

 Unfortunately, all this evolution makes ZPatterns a moving target for
 comprehension at the moment.  In spite of this, my reading of the lists
 seems to indicate that there are a few people besides Ty and myself who are
 actually achieving results with the framework. 

I've noticed this too, and it's very cool :-))

 I hope that they can help
 to provide more accessible how-to materials, 

Someone must have money for this? (sadly not me... CoSource time?)

 because I'm still very focused
 on *finishing* ZPatterns to the level that my "paying job" requires.  And
 it's likely going to be a few months before my "paying job" requires that I
 have introductory docs available for the tools (although I'd personally
 really like to have some available before then).

Ah well, hopefully I won't need it till then... :S

Good luck in the meantime,

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

2000-07-18 Thread Chris Withers

Ty Sarna wrote:
 
 In article [EMAIL PROTECTED],
 Chris Withers  [EMAIL PROTECTED] wrote:
  1. Too much jargon... by far... Lots of complicated words that are
  meanlingless to the layman and don't help to convey the concepts. This
 
 Can you point out some examples of which ones you think are especially bad?

Just everything in general... ;-)

The Glossary Wiki I mentioned would help lots...

...also, can you send the list a copy of your recommended books in this
area?

 Naming has been a struggle.  It's hard to come up with descriptive names
 for these things. Part of the confusion is that some things have been
 renamed in an effort to make the meanings clearer in the long term.  But
 short term, it's confusing and it seems like there are lots of new
 concepts, when in fact there are just several names for the same concept
 (Implementor - Specialist, Rack-mountable - DataSkin, etc).  

I know, hence the glossary suggestion :-)


 I'll also
 admit that Rack-mountable was a clearer name, but it was no longer
 accurate.  We tend to err on the side of a name that doesn't clearly
 describe something instead of a name that clearly describes something,
 but describes it *wrong* so that you think you understand something and
 really don't.  ("Well, at least the name tells you that you don't know
 what it is!", as I've said :-)

Fair enough, but then they really need to be explained for us mortals...

 You mention in another post that you feel lots of unnecessary features
 have been added -- can you give some examples of which ones you feel are
 extraneous? 

Probably me just misreadign the new terms popping up all the time :-)

 There has been only one major feature added in ZPatterns
 0.4.0, which is the ability to have Rack-mountable-like things that
 don't live in racks.  This is important for PTK-like applications where
 you don't want to lump everything into one container, but would instead
 like to have it distributed between member's folders, for example.  I
 think it was worth it.

So do I, I just didn't understand it ;-)


 The PlugIns stuff is indeed separate, and is not really a part of
 ZPatterns as much as it's stuff that we wrote to make ZPatterns and
 other Zope products easier to write. 

Maybe split it into a seperate product then? It might make learning
ZPatterns easier since this area won't get dragged into it...

 You can pretty much ignore it if
 you won't be writing python products or working in ZPatterns internals.

I will on the first count, hence the interest. Squishdot PTK is looming
ever closer now...

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

Any idea on a beta or final release schedule?

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

No, but maybe the percieved pretentiousness upsets some people?

 As someone who used Zope for quite a while before it was
 even called that, and spent much time banging my head against the wall,
 I'm guessing I have a pretty good idea of how you feel.  I've gained a
 new sympathy for DC.  

heh ;-)

 and it's hard to find time right now to work on things in
 ZPatterns that don't directly affect our paid work.  (Much the same
 situation DC is in a lot of the time, I suspect).

Maybe try and leverage the community liek DC too? How about a ZPatterns
fishbowl? *grin*

 So, in summary, please bear with us.  

...will do, keep up the great work, we may bitch now but will probably
aprpeciate it in the long run :-)

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

2000-07-18 Thread Chris Withers

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

Sadly tarballs only address issues 1  2 that I can see above...

I wonder if ZPatterns Specialists address 3?


 Tarballs are flexible enough to install both a Python Products and
 associated ZClasses from ZEXP's (the products "__init__" function
 imports the ZEXP at the appropriate place, if it is not already
 there).

I presume you mean the thing created by the 'Distribution' tab of
products?

cheers,

Chris

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




Re: [Zope-dev] More comments on ZPatterns

2000-07-18 Thread Chris Withers

"Phillip J. Eby" wrote:
 2) I need
 a good way to make the methods overrideable without any subclassing
 (whether in Python or ZClasses),

Ah, so it's not just me who wants this ;-)

 I think this may relate to an existing interest of yours regarding
 specification of interfaces and overriding them in instances; I'd be
 interested in hearing your comments regardless.

My interest too, don't know how to make it happen though :(

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] Zope is memory intensive?

2000-07-18 Thread Firestar

Hi, i have installed Zope on a RH6 box, and looking at the processes,
Zope(running as 'python') consumes abt 20% of the memory usage! A single
apache daemon only takes abt 9-10%. Is Zope supposed to be so memory
intensive?

regards,
firestar


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


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




Re: [Zope] Zope is memory intensive?

2000-07-18 Thread Curtis Maloney

On Tue, 18 Jul 2000, Firestar wrote:
 Hi, i have installed Zope on a RH6 box, and looking at the processes,
 Zope(running as 'python') consumes abt 20% of the memory usage! A single
 apache daemon only takes abt 9-10%. Is Zope supposed to be so memory
 intensive?

Well, it's all relative, isn't it? (o8

I mean, does Apache do the same work as Zope?  Does it cache Python objects, 
is is maintaining database connections, etc etc etc.

I am running Zope on a RH6.1 box, with 96M RAM.  It's using about 12.5% of my 
memory, so far as I can tell.

However, a % isn't much of a guage unless you tell us how much actual memory 
you have.

Personally, I find that Netscape is more of a problem memory wise than Zope 
ever will be. (o8

 regards,
 firestar


Have a better one,
Curtis Maloney

dtml-var standard_work_disclaimer

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




RE: [Zope] Zope Components and ZPatterns

2000-07-18 Thread RC Compaan

Thanks Holger

I used the source distribution and it worked.  Why is this not part of the
binary distribution?

Roché

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
 Holger Hoffmann
 Sent: 17 July 2000 05:43
 To: RC Compaan
 Subject: Re: [Zope] Zope Components and ZPatterns


 Hi,

 RC Compaan wrote:
 
  In trying to install ZPatterns on linux the install fails
 during the "make"
  part of the install, complaining about a non-existant ExtensionClass.h,
  which should be in the Zope Components directory (also not existent).  I
 [snip]

 i think you need the source distribution of zope. There the
 file ExtensionClass.h exists in lib/Components/ExtensionClass.

 ... Holger



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




Re: [Zope] Zope Components and ZPatterns

2000-07-18 Thread Bill Anderson

RC Compaan wrote:
 
 Thanks Holger
 
 I used the source distribution and it worked.  Why is this not part of the
 binary distribution?


Because it is source  :-)

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

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




Re: [Zope] Zope is memory intensive?

2000-07-18 Thread Wolfgang Strobl

On 18 Jul 2000, 2:15  Firestar wrote:

 Hi, i have installed Zope on a RH6 box, and looking at the processes,
 Zope(running as 'python') consumes abt 20% of the memory usage! A
 single apache daemon only takes abt 9-10%. Is Zope supposed to be so
 memory intensive?

Well, I'm running both IIS and Zope side to side, on one of our 
intranet servers a four year old NT4 box. Both are moslty idle. Zope 
currently consumes 7.5 M, IIS needs 6.5 M.  IMHO, these 
numbers represent the lower bound, more or less. 

I wouldn't call that "memory intensive". A eight line http-server 
written in python consumes much less memory, though. :-)


--
  o  ( [EMAIL PROTECTED] (+49 2241) 14-2394
 /\*   GMD mbH   #include 
   _`\ `_===  Schloss Birlinghoven, std.disclaimer
__(_)/_(_)___.-._  53754 Sankt Augustin, Germany 

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




Re: [Zope] Tim's Gripe Of The Week -- was: [Zope] (no subject)

2000-07-18 Thread Bill Anderson

Tim Cook wrote:
 
 Hi all,
 
 I have given myself permission to post this gripe.
 Thank You g
 
 While I do use the list archives and I try to get others that are
 new to Zope to do the same.  I have a gripe for the Zen Masters.
 It's the subject line above.
 
 Granted most of the "No Subject" mail starts with a newbie
 question.  That doesn't mean you have to let it ride like that.
 Simply do what I did above.  WHY?


One of my gripes is the subject line too. In fact, I nearly always
ignore (no subject) posts. Seems to me it should not be too difficult to
make Mailman reject posts with that subject, with a message indicating
the reason.

I'll leave whether or not it _should_ be done as an excercise for the
reader

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

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




RE: [Zope] Zope Components and ZPatterns

2000-07-18 Thread RC Compaan

And no source is distributed with the binary distro?  It seems harless to
include the zope components into the binary distro.

Roché

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
 Bill Anderson
 Sent: 18 July 2000 10:40
 To: RC Compaan
 Cc: Zope
 Subject: Re: [Zope] Zope Components and ZPatterns


 RC Compaan wrote:
 
  Thanks Holger
 
  I used the source distribution and it worked.  Why is this not
 part of the
  binary distribution?


 Because it is source  :-)

 --
 Do not meddle in the affairs of sysadmins, for they are easy to annoy,
 and have the root password.



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




Re: [Zope] Creating Factory Objects (Products)

2000-07-18 Thread Pierre Rougier

Hi Fire,
This should work:

-Create a new product (here InstantSiteProduct) (from here, your product can be
accessed through the "Add" list)
-In this product, add a Z Class (name it Instant Site)
-In this ZClass, create your DTML methods (Designer and Builder)

If u need to store properties in the Product, create a propertysheet in this Z
Class.
U will be able to access these properties from your product methods by using
   "dtml-var propertysheets.your_property "

and, if u want to change the properties in your methods, use

dtml-call propertysheets.your_property.manage_changeProperties(
prop1=val1,,propn=valn)

One more thing: all your changes on the product modify all the instances of your
product...

These things should work
Hope this help

Pierre :)

 I'm following the tutorial in Zope Content Manager's Guide. I created an
 'InstantSite' product, with 2 DTML methods, Designer and Builder. I followed
 most of the instructions, and managed to see the product in my 'Add List'.
 But when i tried to add it into my other folders, the Builder page(which
 would be called after Designer) could not be accessed. The error is:

 "Resource not found

 Sorry, the requested Zope resource does not exist.
 Check the URL and try again." followed by the tracebacks...

 In fact, the tutorial doesn't seem comprehensive and contain errors(e.g.
 screenshots different from description). Could anyone give this newbie some
 pointers here? TIA.

 regards,
 Firestar


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




Re: [Zope] How to require an @ symbol in email form field??

2000-07-18 Thread Peter Be

The nicest way would be to use a JavaScript clientside script on the form
page.
I think you can find a good one @ javascript.internet.com

If you don't want to use Javascript, you can use the regular expression
found from the javascript and use it in a python method of module.

- Original Message -
From: Stacy Formby [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 17, 2000 7:57 PM
Subject: [Zope] How to require an @ symbol in email form field??


 Hello,

 I am new to Zope; since our webmaster left I'm trying to make small
 changes to the website. We have a standard registration form that
 collects information from users (first name, last name, email, company
 name, etc.) All of the fields are required, except address 2, address3.

 Great. fine. If the user doesn't fill out a field, they get an alert.
 But they can fill each field out with gibberish--as long as there is a
 character in the input, we accept it.

 Is there a way to require at least an "@" sign in the email field? The
 powers that be think this would be useful.

 Here's the form processing code as it stands today. Any help is
 appreciated.

 Sformby

 !-- Check whether any fields are missing. -- dtml-in required
 dtml-comment
 The length of the following expr is due to the fact that some types of
 form elements
 (e.g. text) always create a var, while others (e.g. radio) don't.
 /dtml-comment

 dtml-unless expr="REQUEST.form.has_key(_['sequence-key']) and
 REQUEST.form[_['sequence-key']]"
 dtml-call request.set(missing_fields1)" /dtml-unless /dtml-in

  !-- If fields are missing, inform the user. --
 dtml-if request.has_key(missing_fields')" The following input fields
 are required
 and have not been filled out: !-- List missing fields. --
 ul
   dtml-in required dtml-unless
 expr="REQUEST.form.has_key(_['sequence-key']) and
 REQUEST.form[_['sequence-key']]"
   lidtml-var sequence-item
   /dtml-unless /dtml-in
 /ul
 Please click on your browser's "Back" button to update your information,
 or a href="registration.html"click
 here/a to start over. dtml-else



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



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




Re: [Zope] Importing exchange rates

2000-07-18 Thread Peter Be

If you don't have too much traffic on your site, you can let the "first user
of the day" be responsible for triggering new values to a db/file using the
ZopeTime function.

Something like this maybe:
IF (SELECT day FROM currencytable == ZopeTime(day)):
SHOW FROM DB
ELSE:
START THE COLLECTORS SCRIPT
AND PUT IN THESE VALUES IN THE DB

- Original Message -
From: ethan mindlace fremen [EMAIL PROTECTED]
To: Adrian Madrid [EMAIL PROTECTED]
Cc: Zope Mailing List [EMAIL PROTECTED]
Sent: Tuesday, July 18, 2000 4:06 AM
Subject: Re: [Zope] Importing exchange rates


 Adrian Madrid wrote:
 
  I need to obtain the current exchange rates for the yen, mark, etc. with
  at least once a day, preferrably every other 15". Is there an easy way
  to do this in Zope?

 It depends on where the exchange rates are.

 If you get them from a database, you can make zope display the current
 rates.

 If you get them from a web page, you can use the client feature of zope
 to go snarf the web page and then extract what you need (hope you have
 permission :)

 If some other mechanism can write them to a file, you can suck them up
 with an external method whenever someone asks for it.

 hope that helps,
 --
 ethan mindlace fremen
 Zopatista Community Liason
 Abnegate I!

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



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




[Zope] user authentification

2000-07-18 Thread Wolfgang Klinger

Hi!

How does the www.zope.org login procedure work?

I need a way to authenticate users without
LoginManager or GUF or whatever ...
and without a popup window!!

There should be a login site.

How does this work? 

tia

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





Re: [Zope] ZEO and a front end...

2000-07-18 Thread Bill Anderson

Curtis Maloney wrote:
 
 On Tue, 18 Jul 2000, ethan mindlace fremen wrote:
  Curtis Maloney wrote:
   Yes, however his point is that by having each Zope instance
   'predominantly' serving one portion of the site, its cache will contain
   more objects relevant, and thus be just that little bit faster.
  
   Personally, I find this such a simple idea that it MUST be good. (o8
   So much so, in fact, that I've decided to have a crack at writing just
   such a redirector.  I feel the Zope world (and others, most likely) could
   benefit from a 'preferential' redirector.
 
  The way I would do this is have
 
  section1.contrived-example.com
  section2.contrived-example.com
  section3.contrived-example.com
 
  with siteAccess, and then each zope would serve it according to it's IP
  (though each "could" serve each site).  Then you can use whatever IP/DNS
  load balancing tool your heart desires.
 
 I think most people seem to be missing the point here.
 
 The idea is that ALL servers can serve ALL content.  HOWEVER, the 'load
 balancer' will opt for a certain server for a certain URL, in order to
 improve cache hits.
 
 So, for www.contrived-example.com/dir1  it will first try server1, but if
 it's busy (or down) it will try others.  This way, the cache on server1 is
 more likely to contain objects relevant to /dir1  and thus have a higher hit
 rate, therefore improving performance.

No, I understand what is being discussed, I doubt the problem. :-)

Given an equal distribution*, then all the back-end (BE) servers will
have a fairly consistent cache content from server to server. you are
_equally_ likely to hit a server with that object in cache. The more
requests you have for a given object, the greater odds you'll see it in
the caches of all BE servers.  

* Now, not all systems are equal, this is true. However, in an
intelligent load balancing sysstem, you 'weight' the faster/better
performing machines, such that they are hit more often. Since these
machines will be used more frequently, they will have the best chance to
have what you want in cache already. I just don't see that the
additional effort is worth it. The job is already done, and the
additional overhead would seem to outweigh any perceived increases in
performance.  See below.

 
 An enforced 'mapping', as you were suggesting, removes ALL redundancy from
 the site, but would likely provide even better cache hits.

How so?

http://my.site.com/sec1 is mapped to: sec1.site.com, which is load
balanced across as many machines as possible, using ZEO and a load
balancing tool. Any of the machines in the pool known as sec1 (nobody
said it had to be a single machine) could respond. since these machines
serve out sec1 predominantly (they can also participate in the general
site load balanceing servers), these would have a better cache hit rate
on sec1 stuff than the primary BE servers.

Perhaps this can help:

www.libc.org (real site, fictional setup :) is a ZEO cluster.
 o The site's primary ZEO Clients number 5.
 o My load balancing tool lets me weight some servers over others.

/Members is a heavily trafficked section, so I want it to be seperated
out using a rewrite tool (SiteAccess, Roxen, Apache mod_rewrite,
whatever) to send all /Members urls to members.libc.org. 

I set up two ZEO clients, M1 and M2. These two talk to the same ZSS as
the other 5, and respond to members.libc.org.

So, when you go to www.libc.org/Members, you will wind up on either M1
or M2. These machines are set up as low-weighted primary site servers
(bringing the total up to 7), so they will have a cache that is biased
towards /Members, but still can serve up any part of www.libc.org 

If M1 or M2 goes down, you stay up.

For added redundancy, you can add the other 5 primary servers as
low-weighted servers for  members.libc.org, such that if both M1 and M2
die, or get heavily loaded, one or more of the other 5 can pick up the
overage, just as M1 and M2 can for teh 5 primary servewrs for the main
site.

Now you have 'preferred' machines, to improve cache-hit-rate for certain
heavily trafficked sections of your site, and maintain (or even improve)
overall performance and redundancy of the system.  Of course, you still
have ZSS as a SPOF, but even that can be gotten around with good design
and planning. :^)

If that isn't enough, you can throw eddieware into the mix, which
*already* has the ability to redirect based upon the URL.

And-yes,-McGuyver-is-my-hero-ly y'rs Bill

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

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




[Zope] Announce: ZBabel a Translation Assistant for Zope

2000-07-18 Thread Andrew Kenneth Milton

Some people have been bugging me to release this so here we go:-

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

The doco is shambolic to say the least, and there are no examples at
the moment and no list of what hooks are available.

It does not automatically translate for you, it assists you to build
a multi-lingual site once, and then maintain it in different languages,
rather than building it once for every language (or rebuilding the same
thing over and over).

It does however make it pretty easy to get things going fairly cheaply.

There is a trade off between resuable phrase lengths and making phrases
unambiguous that you have to deal with.

If it breaks, you get to keep both bits.

Readme Excerpt:



This is the ZBabel Translation System for ZOPE, the Z Object Publishing 
Environment (http://www.zope.org/)

This is a phrase by phrase translation system, it allows you to translate
key parts of your site, and the content if you desire. With this you don't
need to maintain seperate source for each supported language, or mix different
languages in your source. You can do your entire site in one language and
then translate it without re-editing the source code.

This system also automatically creates the catalogs as you go, you do not 
need to manually insert text strings into databases for translation.

ZBabel comes as a two part kit, to help you with translating your ZOPE Content.

The first part is the tag dtml-babel which allows you to register and
translate your phrases.

The second part is a the ZBabel Tower Product. This is a Folderish Object
that does most of the legwork. You will need a ZBabel Tower Product installed
somewhere that your documents can acquire it if you want translations to occur.
If you do not install the product, the dtml-babel tag will simply return
the existing text.

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

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




[Zope] how to make an Product executable

2000-07-18 Thread Armando



hello 

I have a question .. 
I create a product and i would like to to use my product when 
I select it from the objects combo box. But It always puts me into the security 
screen !!! and not my index_html. I have several methods in that product 
..


Armando



RE: [Zope] how to make an Product executable

2000-07-18 Thread Andy Dawkins


 I have a question ..
 I create a product and i would like to to use my product when I select
 it from the objects combo box. But It always puts me into the security
 screen !!! and not my index_html. I have several methods in that product
..

To create a new object you must supply an addForm and a method to add the
product.
e.g.

manage_addMyProductForm = HTMLFile('MyProductAdd',globals())

def manage_addMyProduct(self, id, title='')
"""Adds the product"""
self.setObject(id, MyProduct(id,title))
if REQUEST is not None:
return self.manage_main(self, REQUEST)

The product tabs are defined in the manage_options section of the product.py
The order is important the first item in the list is called when you access
the object from the management screens.  The index_html is the default when
accessed without the management screens.

For example:
manage_options = ( # the management options available
{'label': 'Contents',   'action': 'manage_main'},
{'label': 'View',   'action': ''}, # defaults to index_html
{'label': 'Properties',   'action': 'manage_propertiesForm'},
{'label': 'Security',   'action': 'manage_access'},
)

Download the boring product from zope.org
It is a plain shell of an object that does nothing, but works.

Hope that helps
-AndyD


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




Re: [Zope] Importing exchange rates

2000-07-18 Thread Gidon Friedman

hi

i have a similar problem, i have to import live date (prices)
from an excel application. i think they have a vb
application that exchanges the data with other applications
(i.e. reuters). but how do i get this data without
conflicting with other apps and programming as little
 vb as possible :(

anybody did something in that flavor?

thankx

gidon



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




Re: [Zope] linuxworld article

2000-07-18 Thread Bill Anderson

Chris Withers wrote:
 
 Graham Chiu wrote:
  The author creates a straw man ( a shoe shop built upon a shoe object )
  without mentioning that Zope users can use a relational database instead
  to build their store.
 
 I think that's a Zope Documentation problem ;-)


Not when you can see that in plain english from no more than two clicks
off of Zope's homepage. The level of difficulty or the complexity to do
it is irrelevant, since that wasn't the issue.  The author's gripe (in
this case) was that Zope is sooo OOP, and that Zope docs don't explain
OO concepts to users. The fact that Zope can talk to RDMSes was
conveniently left out, and the fact that you can do so is not hidden in
any way on zope.org. It is right there in plain sight, two clicks from
the main page. How can that be a Zope Documentation Problem (ZDP?,
oops,that's taken ;-) )

Bill

--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

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




[Zope] Apache+mod_SSL+FastCGI+ZServer

2000-07-18 Thread Jasper

I am fairly new to zope and evaluating its use for a medium traffic
commercial site where security is a requirement. After reading through a
lot of opinions and info on the zope site (http://www.zope.org), I came
to the conclusion that to get scalability and security, Apache + mod_SSL
+ FastCGI + ZServer was the way to go. There was also mention of a zope
product (called MX-Crypto?) which allowed SSL with ZServer without
requiring Apache, but it looked to me to be in early development (I did
not look at this closely).

I set up the mod_SSL + FastCGI, etc and tried it out. Details on the
installation, problems encountered, etc may be found in
http://www.zope.org/Members/jasperh/SSL_FastCGI_setup In particular, I
had trouble getting the zope management screens to work when SSL was
compiled in.

Any comments as to whether the Apache+mod_SSL+FastCGI+ZServer idea is
good, bad or ugly for the intended use would be much appreciated.

jasper (jasperh at mweb dot co dot za)




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




RE: [Zope] Announce: ZBabel a Translation Assistant for Zope

2000-07-18 Thread Albert Langer

Thanks for "ZBabel". I've only just downloaded it and haven't played with it
yet, but from just reading through, it looks like it will be a great
approach!

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

One thing I'm not clear on, which you might want to deal with in future
releases, either by documenting what wasn't obvious to me, or by adding a
separate layer, is how to deal with "Composite Strings". Often a "phrase"
that will need translation is a concatenation of more than one text string
with embedded dynamically generated parameters, such as a date, name, price
etc. In different languages the actual ordering of the concatenated elements
may differ and the structure of the destination language may even result in
a different number of text strings to translate than for the source
language.

Often the original author of a dynamically generated web page will be
tempted to use a repeated string for common parts of different UI strings,
which cannot in fact be translated that way for other languages.

Unless there is some provision for that in the management interface for
translation, and the documentation, page authors are very likely to assume
they have internationalized something when they haven't, because they may
concatenate ZBabelized strings themselves.

See for example:
http://msdn.microsoft.com/library/default.asp?URL=/library/books/techlang/de
vintl/D3/S24AA.HTM

I would imagine that Zope is ideally suited to using some sort of class for
each composite, with properties for the phrase identifier and the
constituent dynamically generated parameters, and leaving it to the specific
translation to determine the number and positioning of the elements
required.

Is that already taken into account somehow by allowing the embedding of DTML
within the text phrase to be translated?

Also worth thinking about for a future release, is the integration of this
with layout considerations. Other languages often require 50% more space
than english when translated and this results in layout problems after
translation. Reasonably precise formulae are available for what to expect,
depending on the length of the string and the source and destination
languages. I would imagine that Zope would also be ideal for automatically
generating the maximum of this for the acquired set of expected future
translations and returning it as a parameter that could be used with dynamic
layout.

Finally, is there some way that the "magic" behind Zwicki structured text
formatting could be used, to allow an author to just write the phrase in
their own language and automatically generate related DTML tags for
parameters etc? (Rather vague idea I know, but somehow make it easier for
people just writing content, like Zwiki contributors, to know nothing about
DTML at all, yet still make it easier for scripters to integrate their
translatable content with DTML as well as integrating with HTML layout).


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




Re: [Zope] ZEO and a front end...

2000-07-18 Thread Toby Dickenson

On Tue, 18 Jul 2000 04:22:16 -0600, Bill Anderson [EMAIL PROTECTED]
wrote:

 I think most people seem to be missing the point here.
 
 The idea is that ALL servers can serve ALL content.  HOWEVER, the 'load
 balancer' will opt for a certain server for a certain URL, in order to
 improve cache hits.
 
 So, for www.contrived-example.com/dir1  it will first try server1, but if
 it's busy (or down) it will try others.  This way, the cache on server1 is
 more likely to contain objects relevant to /dir1  and thus have a higher hit
 rate, therefore improving performance.

No, I understand what is being discussed, I doubt the problem. :-)

You are right, theres no problem in the scenario you described. 

Ill fill in some more details about the fictional example for which I
still can't see an easy solution

Zope is used to store books. Each book object contains:
1. The text of the books, each page in a separate object
2. Images and diagrams for the book.
3. A ZCatalog full-text-index of the book.
Each book object allows:
1. Searching, viewing pages, etc.
2. Dynamically rendering a range of pages as pdf, postscript, etc.

The whole database stores 10,000 books, and is served by a cluster of
many identical Zope servers.

A typical usage pattern might be:
a. Users searches through a book to find the interesting pages
b. He browses the pdf version of those pages
c. He tweaks the page range, and double-checks the pdf version.
d. then downloads a postscript version of that page range for printing

Assume that noone has accessed this book recently, so it's not in any
caches.

The cache has to be filled at step b. This transfers alot of data -
possibly the whole content of the book - and introduces a noticeable
delay.

The possibility for optimisation comes at steps c and d. There is one
cache already filled with the right data - if the requests from c and
d can be directed to the same server as the original then the
cache-filling delay can be avoided.

This extra delay might not have a great impact of actual site
performance, but I've found a catastrophic affect on perceived
performance in some usability tests. Users seem happy to accept a
delay when they first access their data, but not if it repeated in a
subsequent request.

Bill wrote...

 http://my.site.com/sec1 is mapped to: sec1.site.com, which
 is load balanced across as many machines as possible

I might be reading more into his words than was intended, but I think
this demonstrates the problem. Distributing multiple requests for one
section across multiple servers is (what I consider to be)
undesirable.

I want to move load balancing up one level of abstraction -
distributing sections across machines (rather than connections).

If that isn't enough, you can throw eddieware into the mix, which
*already* has the ability to redirect based upon the URL.

Ive not seen eddieware before - so it looks like Ive got some reading
to do.

At a first glance it doesn't have any integrated http caching
(although it seems to have everything else ;-) and theres no obvious
place to hang squid. In my example above, I really want to be able to
cache the rendered pdf files.



Toby Dickenson
[EMAIL PROTECTED]

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




Re: [Zope] Announce: ZBabel a Translation Assistant for Zope

2000-07-18 Thread Andrew Kenneth Milton

+[ Albert Langer ]-
|
| Thanks for "ZBabel". I've only just downloaded it and haven't played with it
| yet, but from just reading through, it looks like it will be a great
| approach!

Ta.

| One thing I'm not clear on, which you might want to deal with in future
| releases, either by documenting what wasn't obvious to me, or by adding a
| separate layer, is how to deal with "Composite Strings". Often a "phrase"
| that will need translation is a concatenation of more than one text string
| with embedded dynamically generated parameters, such as a date, name, price
| etc. In different languages the actual ordering of the concatenated elements
| may differ and the structure of the destination language may even result in
| a different number of text strings to translate than for the source
| language.

I'm not a linguist nor do I play one on TV d8). This system is obviously
not ideal for very dynamic content, what it is useful for is as you 
describe below, UI elements.

Dates, and currency, time etc are usually best handled by fixed catalogs
(usually provided by the operating system) where sort orders etc are already 
well defined and well handled. You can usually change your locale on the
fly before calling the routines that require a known locale to function
correctly.

| Often the original author of a dynamically generated web page will be
| tempted to use a repeated string for common parts of different UI strings,
| which cannot in fact be translated that way for other languages.

You must be disciplined and try to include as much context as possible,
especially when your source language is going to be something as 
crappy as English is. Generally it pays not to be lazy when it comes
to translating, and it also pays to have a good thesaurus on hand for
replacing really common words with multiple meanings like 'bank' which
annoying for having three common meanings.

| I would imagine that Zope is ideally suited to using some sort of class for
| each composite, with properties for the phrase identifier and the
| constituent dynamically generated parameters, and leaving it to the specific
| translation to determine the number and positioning of the elements
| required.
| 
| Is that already taken into account somehow by allowing the embedding of DTML
| within the text phrase to be translated?

Yes you can embed DTML inside the block and it will resolve all of the
DTML before translating the result. You can turn this behaviour off.
This is why I opted for a container tag, rather than a simple tag.

| Finally, is there some way that the "magic" behind Zwicki structured text
| formatting could be used, to allow an author to just write the phrase in
| their own language and automatically generate related DTML tags for
| parameters etc?
|
|  (Rather vague idea I know, but somehow make it easier for
| people just writing content, like Zwiki contributors, to know nothing about
| DTML at all, yet still make it easier for scripters to integrate their
| translatable content with DTML as well as integrating with HTML layout).

I have another project on my TO DO list which is a dynamic components
product which this would integrate well with.

Any "Form Generation" products would probably be able to integrate
the same stuff as well fairly easily.

It is rather intrusive I know, but, there are few if any options that
don't require massive amounts of effort to achieve the same thing. 
Especially building the catalogs. I know of another ASP based system
that's pretty much the same as this, but, they have to go through
and change the source code after translating (they have to provide a
dummy 'phrase id' which is then altered). It is really really ugly.

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

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




[Zope] Zope 2.2.0 and UserDB-1.2.0 conflict

2000-07-18 Thread Tony McDonald

Hi,
I've just set up a new 2.2 system and moved my Data.fs file across 
and started it up. That is, I *haven't* moved all my tar.gz products 
and rebuilt them. I have built MySQL (ZMySQLDA-1-1-3) , LocalFS-0.9.3 
, TinyTableB2, and PythonMethod-0.1.7  (with do_XXX set to '1', ie 
devil methods) It seems to work ok, but when I try to click 
'properties' in a UserDB object from the management screen, I get the 
following;

!--
  Error type:  KeyError
  Error value: SQLConnectionIDs
  --

[snipped]

!--
Traceback (innermost last):
   File /home/zope/Zope/lib/python/ZPublisher/Publish.py, line 222, in 
publish_module
   File /home/zope/Zope/lib/python/ZPublisher/Publish.py, line 187, in publish
   File /home/zope/Zope/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
 (Object: RoleManager)
   File /home/zope/Zope/lib/python/ZPublisher/Publish.py, line 171, in publish
   File /home/zope/Zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
 (Object: manage_properties)
   File /home/zope/Zope/lib/python/ZPublisher/Publish.py, line 112, in 
call_object
 (Object: manage_properties)
   File /home/zope/Zope/lib/python/App/special_dtml.py, line 121, in __call__
 (Object: manage_properties)
   File /home/zope/Zope/lib/python/DocumentTemplate/DT_String.py, line 
502, in __call__
 (Object: manage_properties)
   File /home/zope/Zope/lib/python/DocumentTemplate/DT_In.py, line 
630, in renderwob
 (Object: SQLConnectionIDs)
KeyError: (see above)
--

This is 2.2.0 built from source on Solaris 2.5 and Python 1.5.2

Any thoughts would be mightily appreciated.
tone
--
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2

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




[Zope] Re: GUF Permission Problem

2000-07-18 Thread Mario Premke

Thanks a lot Brad it also works for me ...
Only now I have a new and extraordinary bizarre problem:
The folder I want to protect has GUF, openticket and index.html.
When I log in I see index.html *but* while downloading index.html
he suddenly says Authorization failed. To go into openticket I have
to type login and password again as I have when going back to
index.html. there is obviously something wrong with the permissions,
but why then starts Zope to show half of index.html ? It stops showing
an image in the dtml-var standard_html_header which is defined in the
root folder - but it can be shown in the openticket folder!

Any hints ???
Mario

P.S: Want to look? http://134.96.119.88:8080/ login:test, password:test


 
 Hmmm, I'm not sure about that one.  I use dtml-in and dtml-var in my GUF
 userList method.
 
 dtml-in SQL_get_users
 dtml-var user_account
 
 -=Brad=-
 
 
 -Original Message-
 From: Mario Premke [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 17, 2000 3:25 PM
 To: Brad Mabe
 Cc: [EMAIL PROTECTED]
 Subject: Re: GUF Permission Problem
 
 
 Hi - You were absolutely right !!!
 
 Thanks a lot!
 
 There is still a problem remaining in my User-Authentication.
 In the DTML-method userList I have the SQL-Method :
 dtml-return "sql_get_user_list()"
 When I write the usernames in userList everything goes well.
 Usind the SQL-method results in the Zope-message:
 
 2000-07-17T22:20:44 ERROR(200) GUF An exception was raised by
 http://134.96.119.88:8080/portal_folder/acl_users/userList
 (('Unsupported Type', 'userList method returned an unsupported type',
 traceback object at 8592580))
 
 The Sql-method is tested an OK ...
 What does the error 'Unsupported Type' mean ???
 
 Any hints will be appreciated ...
 MArio
 
 
  Hi Mario,
  In reference to your problem where GUF cannot access "real_password", try
  turning on "Access contents information" for your role(s) in the security
  permissions area of the acl_users folder.  I just ran into a similar
 problem
  where I could access my sql methods, but could not access the results from
  them.  Setting this permission for my user defined role in the acl_users
  folder fixed it.
 
  Let me know how it goes and if you have any questions.
 
 -=brad=-
 
 


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




Re: [Zope] How to require an @ symbol in email form field??

2000-07-18 Thread Duncan Booth

 Is there a way to require at least an "@" sign in the email field? The
 powers that be think this would be useful.
dtml-unless "'@' in REQUEST.email"... complain here .../dtml-
unless

 
 Here's the form processing code as it stands today. Any help is
 appreciated.
Use javascript to check that all required fields are present before 
the form is actually submitted. Here is some of the code I use:

SCRIPT Language="Javascript1.2" src="jsvalidate"/SCRIPT
form action="..." method="post" onSubmit="return 
Validate(this);"
/SCRIPT

where jsvalidate is a DTMLDocument that may be found at 
http://www.zope.com/members/Duncan/jsvalidate.

Also, consider using the :default modifier on fields to force them to 
have a value. For example, if you put
input type="hidden" name="field1:default" value="whatever"

then if the field is left empty, or in the case of a radio button not 
selected, the default value will be used.

 !-- Check whether any fields are missing. --
... code snipped ...

Here's a somewhat shorter, albeit more obscure, way to check 
whether all the fields you want are in the REQUEST form:

dtml-let required="[ 'name', 'email' ]"
   present="_.reorder(REQUEST.form.keys(), with=required)"
   missing="_.reorder(required, without=present)"
dtml-if missing
Missing fields:
 dtml-in missingdtml-var sequence-item /dtml-inbr
dtml-else
  ... insert code here ...
/dtml-if
/dtml-let


-- 
Duncan Booth [EMAIL PROTECTED]
int month(char *p){return(124864/((p[0]+p[1]-p[2]0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
http://dales.rmplc.co.uk/Duncan

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




[Zope] Powered by Oasis?

2000-07-18 Thread Ng Pheng Siong


http://www.cyclic.com/CVS/Dev/codewindow/linkhere

Gives a Zope error.

Icon at bottom says "Powered by Oasis".

-- 
Ng Pheng Siong [EMAIL PROTECTED] * http://www.post1.com/home/ngps


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




[Zope] Need an SQL based auth system that works with Zope 2.2

2000-07-18 Thread Tony McDonald

Hi all,
I think the time has come to bite the bullet and change our 
authentication engine to work in line with Zope 2.2 and above. 
UserDB-1.2 seems to have some problems with it (see my message 
today), and frankly, I haven't got the time to try and figure out 
why. Another point against UserDB is that it's not being developed 
any more. Ah well, it did the job for a long time

Can anyone who's using an SQL based authentication system with Zope 
2.2 successfully please let me know which one you used and how you 
did it?

ta muchly,
tone.
--
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2

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




[Zope] tree expand_all

2000-07-18 Thread Tom Scheidt

Hi All,

How can you get a tree to be expanded automatically upon initially loading
the page?

I did see that the documentation is wrong on the Zope.org site in that
expand-all should be expand_all.

I've seen other people ask this question, but haven't found any responses.

Thanks.

Tom Scheidt   |   www.falsemirror.com   |   [EMAIL PROTECTED]

---


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




Re: [Zope] product docs Re: [Zope] Zope docs ??

2000-07-18 Thread Andy McKay

Im curious too...

But then I had to write a trivial class to do xyz yesterday morning and
doing it in ZClasses was just quicker.

- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: "ethan mindlace fremen" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; "Zope Mailing List" [EMAIL PROTECTED]
Sent: Tuesday, July 18, 2000 1:38 AM
Subject: Re: [Zope] product docs Re: [Zope] Zope docs ??


 ethan mindlace fremen wrote:
  Beehive has a zclasses tutorial availiable for DM25 at
  http://www.beehive.de . I would recommend zclasses over "pure python"
  products.

 Why?

 (that's not negative, I'm just curious ;-)

 cheers,

 Chris

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



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




RE: [Zope] Announce: ZBabel a Translation Assistant for Zope

2000-07-18 Thread Albert Langer

[Andrew]
Yes you can embed DTML inside the block and it will resolve all of the
DTML before translating the result. You can turn this behaviour off.
This is why I opted for a container tag, rather than a simple tag.

[Albert]
That is what I am still not clear on. Noticed the container, but still
confused about "literal" and about "before", "after", "off" and "on".

Suppose web site in source language has something like this:

'Click A href="{fieldX(someVar.A)}"here/A, for {fieldY(someVar.B)}'

With suitably horrific DTML instead of ' ' and {}.

Rendered english result would be, for some particular dynamic instance of
someVar:

'Click A href="http://www.zope.org/"here/A for Zope'

Translator for language X decides to reverse the positions of fieldA and
fieldB and use 3 separate substrings, because it is too abrupt for that
language, so translates to something like:

'If you would like {fieldY(someVar.B)}, click A
href="{fieldX(someVar.A)}"this link/A, please'

There are now 3 substrings in the translation because it would be rude not
to start or end with something like "please" in language X, and it reads
better with the fields reversed in that language.

Final rendered result becomes (in language X):

'If you would like Zope, click A href="http://www.zope.org/"this link/A,
please'

depending on the particular value of someVar at the time.

Does ZBabel allow this? If so, that's *exactly* what I was hoping for.

(Naturally it is up to the classes for fieldY and fieldX to do their own
thing, and localize it if its a date or currency etc, not up to ZBabel).

| Finally, is there some way that the "magic" behind Zwicki structured text
| formatting could be used, to allow an author to just write the phrase in
| their own language and automatically generate related DTML tags for
| parameters etc?
|
|  (Rather vague idea I know, but somehow make it easier for
| people just writing content, like Zwiki contributors, to know nothing
about
| DTML at all, yet still make it easier for scripters to integrate their
| translatable content with DTML as well as integrating with HTML layout).

[Andrew]
I have another project on my TO DO list which is a dynamic components
product which this would integrate well with.

Any "Form Generation" products would probably be able to integrate
the same stuff as well fairly easily.

It is rather intrusive I know, but, there are few if any options that
don't require massive amounts of effort to achieve the same thing.
Especially building the catalogs. I know of another ASP based system
that's pretty much the same as this, but, they have to go through
and change the source code after translating (they have to provide a
dummy 'phrase id' which is then altered). It is really really ugly.

[Albert]
The lack of a dummy "phrase id" is what I thought was really great about
your approach. Thanks!

I regard HTML/DTML as possibly avoidable clutter in the same way that a
"phrase id" is.

If ZBabel already does what I asked above, my question about something
closer to Zwiki structured text might be more clear in terms of wondering
whether anything can be done to hide the HTML/DTML tagging and field coding
from the translator by giving them some sort of template like this:

'Click [here] for {Zope}'

So that they would translate it to:

'If you would like {Zope} click [this link[here]], please'

Note that the two original substrings of ordinary text AND the [bracketed]
text all denote elements to be translated, while the text in {braces} does
not, but is sample data visible in the UI as a prototype example for the
translator.

Then the magic which extracted the HTML (and DTML) tagging and field names
etc to give the translator something more understandable, would just stick
it back in, replacing "here" with "this link", but ALSO restoring the
surrounding DTML/HTML for that element and for the {Zope} element, in much
the same way that you already do not need a "phrase id" but work directly
with the text. Translators understand prototypes much more easily than they
understand web pages.

(Also useful for content managers cf HTML/DTML designers and convenient for
HTML/DTML designers too ;-).

Any possibility of doing that automatically? By clicking "generate
template", a web developer might be able to generate simplified template
strings like above for the translator, using a sample prototype from actual
data. Then, when the translator has processed it, a web developer or content
manager could just click "import translation".

Otherwise either the web developer might still need to generate such
prototypes manually to make life easier for translators, or the translators
need to understand some HTML/DTML as well as understanding translation.

Seeya, Albert


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

[Zope] dtml-if errors in sql method

2000-07-18 Thread Tim Hicks

dtml-if "which_table == 'Plays'"

SELECT *
FROM dtml-var which_table
WHERE "Play title" like dtml-sqlvar
"'%'+_.string.strip(form_string)+'%'" type=string;

Can anybody explain to me what is going on with my zsql method?  Zope
gives me the following error when I try and change my method to what
is above.

Invalid attribute name, "which_table", for tag dtml-if "which_table
== 'Plays'", on line 16 of string

I've scoured the mailing list, but I'm still mightily confused.
which_table is one of the arguments for the the sql method and Plays
is a string that I want to compare it with.  which_table comes from a
form elsewhere.  I'm sure it's something really simple, and I'm sure
it's been discussed here before (at length?), but ATM, I don't even
know what I'm looking for!

Thanks for the help

tim


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




[Zope] http://www.atomasoft.com/yahoo-yes!.something

2000-07-18 Thread Jonathan Desp

Hi,

If you go there -

http://www.atomasoft.com/yahoo-yes!.something

You will see my "Not Found" page, because there is no such page in my
database.

But I'm always seeing those ugly sentences below, and I'd like to cut them
and then don't see them anymore, what I can do ? Where is the file to edit ?
What I need to erase ? I searched the mailing list with several keyword, my
"standard_html_footer (Standard Html Footer) " file is very good and
perfect, but I don't want to see the "ugly sentences" like:

Traceback (innermost last):
  File /home/jonano/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line
222, in publish_module
  File /home/jonano/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /home/jonano/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
  File /home/jonano/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line
162, in publish
  File /home/jonano/Zope-2.2.0-src/lib/python/ZPublisher/BaseRequest.py,
line 354, in traverse
  File /home/jonano/Zope-2.2.0-src/lib/python/ZPublisher/HTTPResponse.py,
line 533, in debugError
NotFound: (see above)

Anyone can help me a  little bit ? my business is cool ? more to come, I
will announce the opening of my site soon, on this mailing lis !

mailto:[EMAIL PROTECTED]

Very truly yours,


Jonathan Desp
Atomasoft
Matter will become software
http://www.atomasoft.com


"I used to think that the brain was the most wonderful organ in my body.
Then I realized who was telling me this."


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




[Zope] Newbie: How to create a Oracle connection (DCOracle)

2000-07-18 Thread gustavo

Hi List,

Finally, I installed DCOracle and works fine. But, how to create a Oracle
connection inside Zope? I tried to add a SQL Method and received this warning:
 
Warning: There are no SQL database connections. You need to add a Zope SQL database
connection before you can use a Zope SQL Method. 

I not found nothing about that in documentation. Could you help me?

Gustavo

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




[Zope] Re: Python or DTML

2000-07-18 Thread Andy McKay

 ...if I call an external method as an action resulting from a
 form post, and spit out raw html, it works great.  BUT I cannot
 seem to use DTML objects very easily from within it.

You can, its just very difficult.

 Not so if one of those DTML
 methods is an EXTERNAL method which would like to manipulate
 DTML methods (from its own folder) with the same ease--or so
 I think, being unable to find really *good* documentation
 on exactly what I can do with my "self."  (if a posting is
 going to be long, it darn well better be entertaining...)

...erm yep its difficult. I tried to write and explanation, but figured
after a while that I didnt really understand the exact reason why not. I
have rendered dtml in python by writing a class that is derived from DTMLDoc
(similar to the Wiki style).


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




[Zope] Products and 2.2 Final

2000-07-18 Thread Rogerio Atem de Carvalho

Just a simple question:

I am using 2.1.6 with LocalFS, CachePool, SQL Input 
Wizard, MetaPublisher and others... I am thinking now 
in upgrading to 2.2 final.
Is there any product that is not compatible with 2.2 
final?

regards,

Rogerio Atem
---
E-mail enviado pelo servidor do CEFETCampos

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




Re: [Zope] dtml-if errors in sql method

2000-07-18 Thread Tim Hicks

- Original Message -
From: "Gregory Haley" [EMAIL PROTECTED]
To: "Tim Hicks" [EMAIL PROTECTED]
Sent: Tuesday, July 18, 2000 7:35 PM
Subject: Re: [Zope] dtml-if errors in sql method


 Hi,

 Are you searching for the exact word "Plays", or is there a
 variable called Plays against which you are trying to match
 a value?  If it's the latter, having the single quotes is
 teling it to search for the literal.  If you are setting the
 value of plays in a higher call, eg. dtml-call
 "REQUEST.set('Plays', Play_titles)", your if expression
 would need to be "which_table == Plays".

 Hope this is helpful, as it is a mistake I am always making!

 ciao!
 greg.

 Gregory Haley
 venaca.com


Thanks for that... I am trying to compare which_table to the exact
string Plays.  Plays is not a variable/argument/integer//whatever,
I am just trying to see if the string that is returned from one of the
fields of my form (which_table) is equal to the string Plays.

snip

Tim:  [EMAIL PROTECTED]





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




RE: [Zope] Importing exchange rates

2000-07-18 Thread Richard Folwell

It is also possible to set up an ODBC connection to Excel.  Depending on your 
background, this might
be simpler to set up.  See the Excel help for the fine details.  (No VB programming at 
all :-).

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jim
 Sanford
 Sent: 18 July 2000 16:21
 To: Gidon Friedman; [EMAIL PROTECTED]
 Subject: Re: [Zope] Importing exchange rates


 you can use COM to access the excel file.

 - Original Message -
 From: Gidon Friedman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 18, 2000 7:16 AM
 Subject: Re: [Zope] Importing exchange rates


 hi

 i have a similar problem, i have to import live date (prices)
 from an excel application. i think they have a vb
 application that exchanges the data with other applications
 (i.e. reuters). but how do i get this data without
 conflicting with other apps and programming as little
  vb as possible :(

 anybody did something in that flavor?

 thankx

 gidon



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




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




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




Re: [Zope] Products and 2.2 Final

2000-07-18 Thread J. Atwood

Mine ZUBB - Zope Ultimate Bulletin Board

But that is not important here.

It would be nice if someone could compile a list of products that are 2.2
compatible.


JMA

 From: Rogerio Atem de Carvalho [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 Date: Tue, 18 Jul 2000 16:11:35 -0400
 To: [EMAIL PROTECTED]
 Subject: [Zope] Products and 2.2 Final
 
 Just a simple question:
 
 I am using 2.1.6 with LocalFS, CachePool, SQL Input
 Wizard, MetaPublisher and others... I am thinking now
 in upgrading to 2.2 final.
 Is there any product that is not compatible with 2.2
 final?
 
 regards,
 
 Rogerio Atem
 ---
 E-mail enviado pelo servidor do CEFETCampos
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )
 
 


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




[Zope] Re: An oldnewbie writes (Was [Zope] DTML?)

2000-07-18 Thread Chris Withers

Paul Browning wrote:
 OK, this is true of most things (computer languages, foreign
 languages, mental arithmetic, parenthood, etc) - if you don't
 use it, you lose it. But there is something about DTML that
 distinguishes it (for me) from other languages - it's the rate
 at which it decays on you. Python's decay constant is much
 more favourable.

I think this would be a very useful metric to measure how effective any
improvements to DTML are, can you stick it in the relevent wiki
somewhere?

 So I've learned a rule of thumb - if I'm writing DTML and
 it isn't flowing then I really ought to be using Python. 

This isn't always true IMHO...

 PythonMethods
 are nice but, as they stand, you only have access to built-in
 functions. So if you want to import modules you have to resort
 to External Methods. [Am I talking nonsense here? My empirical
 experience is that I can use string functions in a PythonMethod
 but not, say, stuff from the time module. Neither string nor time
 are built-in though . so why one and not the other?]

I hope you're talking nonsense ;-)

 The point of these reflections:
 * PythonMethods ought to be a high priority IMHO.

Very much so...

 * DTML is holding Zope back for the rest of us (and is
   arguably a "proprietary" component of Zope (in that
   you can't use it anywhere else) - this is a disincentive
   to many power-Perl,JSP,name-your-scripting-poison users
   I suspect.

I think all these scripting poisions are proprietery and will remain so
in that sense. The sad fact is that DTML ranks amoung the worst of them
right now, IMVHO...

 * Please can we import Python modules from PythonMethods (or
   can we already and I don't about it, or does this break the
   sandbox that PythonMethods is meant to provide)?

Would be nice, if not, reasons why not... :-)

 * Don't worry about changing DTML syntax. It's an excellent
   marketing ploy to ensure good sales of the 2nd edition of
   The Zope Book ;-)

heh :-)

Well, thanks for your views, I guess you started when it was still !--
-- ? ;-)

cheers,

Chris

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




[Zope] The proper usage of Sequence-item

2000-07-18 Thread jesse

I'm improving on Smarter forms so that instead of having to hard code every field into 
the code that checks for errors, it automaticly reads the dictionary that is in 
REQUEST and checks every key in it.  I'm trying to work with this...

dtml-call "REQUEST.set('finished','true')"

dtml-in "REQUEST.keys()"   
dtml-comment starting the loop /dtml-comment
dtml-if "_[sequence-key].value('')"
dtml-comment I'm saying that if the current key is empty, display this. 
/dtml-comment
liPlease fill in your dtml-var "_['sequence-key']" below
dtml-call "REQUEST.set('finished','false')"
/dtml-if
/dtml-in

dtml-if "REQUEST.get('finished')=='true'"
pYou're done! Thanks for your input dtml-var fname./p
pYou could put a link to somewhere else on your site here.../p
dtml-else
p
Please correct this and click the iNext/i button to complete
the form.
/p
dtml-var expr="mainform_include()"
/dtml-if


any input would be helpful. 

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




[Zope] sequence-item and

2000-07-18 Thread Diego Rodrigo Neufert

Hi ppl...

Why I cant use dtml-var "sequence-item"??

Every time I try to access sequence-item under "" in a dtml-call dtml-var or
anything else I got this error:

Error Type: NameError
Error Value: sequence

Well, I found a solution:
dtml-let si=sequence-item
dtml-var "si"
/dtml-let
Now everything is ok... but I dont want to do this, I want to access the
*@%$#@ sequence-item in "".

Can anyone help me?

-
Diego Rodrigo Neufert
-webmaster
---
(Magic Web Design)
(email) ([EMAIL PROTECTED])
(curitiba) (pr)

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




Re: [Zope] sequence-item and

2000-07-18 Thread Christopher J. Kucera

Diego Rodrigo Neufert wrote:
 
 Why I cant use dtml-var "sequence-item"??

Because anything inside quotes is evaluated as a Python expression.
It's trying to subtract 'item' from 'sequence.'

Try:

dtml-var "_['sequence-item']"

-CJ

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




Re: [Zope] sequence-item and

2000-07-18 Thread Chris Withers

"Christopher J. Kucera" wrote:
 Try:
 
 dtml-var "_['sequence-item']"

or 

dtml-var "_getitem('sequence-item',0)"

If you don't want the object to be called ebfore being displayed...

cheers,

Chris

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




Re: [Zope] sequence-item and

2000-07-18 Thread Rob Miller


Diego Rodrigo Neufert writes:

 Hi ppl...
 
 Why I cant use dtml-var "sequence-item"??

Because, as I understand it, anything within "" gets treated as Python code
by the DTML interpreter.  Thus "sequence-item" is parsed as an expression:
sequence _minus_ item.  A dash is not a valid variable name character in
Python, but it is in DTML; this is unfortunate.

 
 Every time I try to access sequence-item under "" in a dtml-call dtml-var or
 anything else I got this error:
 
 Error Type: NameError
 Error Value: sequence
 
 Well, I found a solution:
 dtml-let si=sequence-item
 dtml-var "si"
 /dtml-let
 Now everything is ok... but I dont want to do this, I want to access the
 *@%$#@ sequence-item in "".

I've searched through the list archives and come to the conclusion that
your solution above is the cleanest way to handle this, for now.  There are
other ways, but they involve ugly-looking permutations of the "_" namespace
variable, and they approach the splendor of Perl in their readability.  The
"right" solution, IMHO, would be to rename the "sequence-..." variables to
a different set of names that doesn't cause the Python interpreter to
choke.  I seem to recall someone saying that this (or something similar)
was being worked on, but, alas, for now dtml-let is our best option.

rob

 
 Can anyone help me?
 
 -
 Diego Rodrigo Neufert
 -webmaster
 ---
 (Magic Web Design)
 (email) ([EMAIL PROTECTED])
 (curitiba) (pr)
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )
 




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




Re: [Zope] http://www.atomasoft.com/yahoo-yes!.something

2000-07-18 Thread Nick Garcia

Jonathan Desp wrote:
 
 Hi,
 
 If you go there -
 
 http://www.atomasoft.com/yahoo-yes!.something
 
 You will see my "Not Found" page, because there is no such page in my
 database.
 
 But I'm always seeing those ugly sentences below, and I'd like to cut them
 and then don't see them anymore, what I can do ? Where is the file to edit ?
 What I need to erase ? I searched the mailing list with several keyword, my
 "standard_html_footer (Standard Html Footer) " file is very good and
 perfect, but I don't want to see the "ugly sentences" like:

You're running your server in debug mode.  Turn debug mode off and you
won't see them anymore.  If you're using ZServer you need to edit start
and take out the -D option.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

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




Re: [Zope] dtml-if errors in sql method

2000-07-18 Thread Tim Hicks

- Original Message -
From: "Dieter Maurer" [EMAIL PROTECTED]
To: "Tim Hicks" [EMAIL PROTECTED]
Sent: Tuesday, July 18, 2000 9:51 PM
Subject: Re: [Zope] dtml-if errors in sql method


 Tim Hicks writes:
   dtml-if "which_table == 'Plays'"
  
   SELECT *
   FROM dtml-var which_table
   WHERE "Play title" like dtml-sqlvar
   "'%'+_.string.strip(form_string)+'%'" type=string;
  
   Can anybody explain to me what is going on with my zsql method?
Zope
   gives me the following error when I try and change my method to
what
   is above.
  
   Invalid attribute name, "which_table", for tag dtml-if
"which_table
   == 'Plays'", on line 16 of string
 The error message looks strange.
 It seems that the parser does not see the "...", because
"which_table"
 actually is not an attribute at all.

 Did you declare "which_table" as argument of the Z SQL method.
 This will probably not remove your current problem but
 may later come up.


 Dieter


Yes, which_table and form_string are both declared as arguments in the
zsql method.

Tim:  [EMAIL PROTECTED]




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




[Zope] New How-To on Cookies (need feedack)

2000-07-18 Thread J. Atwood

I started a little how-to on cookies. Take a look and send your feedback.


http://www.zope.org/Members/BwanaZulia/cookies/index_html


J


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




Re: [Zope] ZEO and a front end...

2000-07-18 Thread Bill Anderson

Toby Dickenson wrote:
 
 On Tue, 18 Jul 2000 04:22:16 -0600, Bill Anderson [EMAIL PROTECTED]
 wrote:
 
  I think most people seem to be missing the point here.
 
  The idea is that ALL servers can serve ALL content.  HOWEVER, the 'load
  balancer' will opt for a certain server for a certain URL, in order to
  improve cache hits.
 
  So, for www.contrived-example.com/dir1  it will first try server1, but if
  it's busy (or down) it will try others.  This way, the cache on server1 is
  more likely to contain objects relevant to /dir1  and thus have a higher hit
  rate, therefore improving performance.
 
 No, I understand what is being discussed, I doubt the problem. :-)
 
 You are right, theres no problem in the scenario you described.
 
 Ill fill in some more details about the fictional example for which I
 still can't see an easy solution
 
 Zope is used to store books. Each book object contains:
 1. The text of the books, each page in a separate object
 2. Images and diagrams for the book.
 3. A ZCatalog full-text-index of the book.
 Each book object allows:
 1. Searching, viewing pages, etc.
 2. Dynamically rendering a range of pages as pdf, postscript, etc.
 
 The whole database stores 10,000 books, and is served by a cluster of
 many identical Zope servers.
 
 A typical usage pattern might be:
 a. Users searches through a book to find the interesting pages
 b. He browses the pdf version of those pages
 c. He tweaks the page range, and double-checks the pdf version.
 d. then downloads a postscript version of that page range for printing
 
 Assume that noone has accessed this book recently, so it's not in any
 caches.
 
 The cache has to be filled at step b. This transfers alot of data -
 possibly the whole content of the book - and introduces a noticeable
 delay.
 
 The possibility for optimisation comes at steps c and d. There is one
 cache already filled with the right data - if the requests from c and
 d can be directed to the same server as the original then the
 cache-filling delay can be avoided.
 
 This extra delay might not have a great impact of actual site
 performance, but I've found a catastrophic affect on perceived
 performance in some usability tests. Users seem happy to accept a
 delay when they first access their data, but not if it repeated in a
 subsequent request.
 
 Bill wrote...
 
  http://my.site.com/sec1 is mapped to: sec1.site.com, which
  is load balanced across as many machines as possible
 
 I might be reading more into his words than was intended, but I think
 this demonstrates the problem. Distributing multiple requests for one
 section across multiple servers is (what I consider to be)
 undesirable.

You can actually do it either way. Curtis (AIUI) complained that the
method described meant your site depended upon each of th esection's
servers being up, that there was no redundancy. So I described a way of
doing it with redundancy. 
 
 I want to move load balancing up one level of abstraction -
 distributing sections across machines (rather than connections).

That's easier :) Make sec1.site.com a single machine, and all requests
for my.site.com/sec1 go to this machine, thus the cache will have it
loaded if it has been accessed at all. The downside, like Curtis
mentioned, is that if sec1 dies, you lose that part of the site.

 
 If that isn't enough, you can throw eddieware into the mix, which
 *already* has the ability to redirect based upon the URL.
 
 Ive not seen eddieware before - so it looks like Ive got some reading
 to do.
 
 At a first glance it doesn't have any integrated http caching
 (although it seems to have everything else ;-) and theres no obvious
 place to hang squid. In my example above, I really want to be able to
 cache the rendered pdf files.

EddieWare does do 'intellgient' caching, allowing you to seperate out
sections of a site to a server (for example, all images come from this
machine, and text from that one, etc.), and it works at the IP Address
level. You simply plug in squid wherever, AIUI.



--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

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




Re: [Zope] New How-To on Cookies (need feedack)

2000-07-18 Thread Chris Withers

"J. Atwood" wrote:
 
 I started a little how-to on cookies. Take a look and send your feedback.
 
 http://www.zope.org/Members/BwanaZulia/cookies/index_html

I found I got very confused unless I remembered to set path='/' with
cookies..

Ask MJ about the fun we had on #zope ;-)

cheers,

Chris

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




[Zope] ZCatalog Reindex_object Problems

2000-07-18 Thread Manuel Schulte

Hi,

I've been struggling trying to get the catalog to index catalog
aware objects.  There are several messages from people with similar
problems, in the archives, but none of the solutions seem to work.  I have
created a Product with a catalog aware class called Job_Request.  The
Product also has a Job_Request_addForm method and a Job_Request_add
method.  The form simply asks for user input for various fields and the
Job_Request_add method is meant to create the class instance, set the
properties, and index the object.  In order to test the class I made an
object which lists all items the catalog as well as allows me to search on
a single field.  The problem seems to be that the catalog will not update
after I Input a value that the catalog has not yet seen for a particular
field.  Some Examples:

 1. The catalog already has a Job_Request object with the
agency_name property set to NASA.  If I add another object to the catalog
with agency_name = 'NASA', the result lists for an unrestricted search and
a search restricted to NASA both contain the correct record.

2. I delete all objects where agency_name ='NASA' and then I add
a new one with the same agency_name, I get the same results as above.

3. I add a new Job_Request where the value of agency_name is one 
that has yet to have been cataloged i.e. agency_name =
'NeverHadThisValue', and the results for an unrestricted search on
agency_name shows the record, but the results restricted by agency_name =
'NeverHadThisValue' comes up empty.


Any help on this would be greatly appreciated (Is it a bug?  If so
what's the best workaround)

Manuel


What follows is the code for my Job_Request_add method and my SearchTest
method:


Job_Request_add:


dtml-var standard_html_header

   dtml-call "REQUEST.set('ts', ZopeTime())"
   dtml-call "REQUEST.set('id',_.str(_.int(ts)))"
   dtml-call "REQUEST.set('agency_name', agency_name)"
  
..many more REQUEST.set's ... 

dtml-with "Job_Request.createInObjectManager(REQUEST['id'], REQUEST)"
dtml-call
  "propertysheets.Job_Details.manage_editProperties(REQUEST)"
   dtml-call reindex_object
/dtml-with

dtml-if NoRedir
 dtml-else

dtml-if DestinationURL

 dtml-call "RESPONSE.redirect(
   DestinationURL+'/manage_workspace')"

dtml-else

dtml-call "RESPONSE.redirect(
   URL2+'/manage_workspace')"


/dtml-if
/dtml-if
dtml-var standard_html_footer

 
TestSearch:



dtml-var standard_html_header
H2Entire Catalog/H2
p
dtml-in "Catalog(agency_name='')"
BR
dtml-var agency_name
dtml-var id
/dtml-in

H2Single Record/H2
p
dtml-in "Catalog(agency_name='NewName')"
BR
dtml-var agency_name
dtml-var id
/dtml-in

H2Try a Search/H2
form action="available_positions_report" method="get"
trthAgency_name/th
tdinput name="agency_name"
width=30 value=""/td/tr

trtd colspan=2 align=center
input type="SUBMIT" name="SUBMIT" value="Submit Query"
/td/tr
/table
/form
dtml-var standard_html_footer




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




Re: [Zope] ZEO and a front end...

2000-07-18 Thread ethan mindlace fremen

Curtis Maloney wrote:
 I think most people seem to be missing the point here.

While I think Bill addressed this, I am not missing your point.  By subdomaining
areas, you can assign those subdomains an IP address, which can be primarily
served by a Zope Client.

 The idea is that ALL servers can serve ALL content.  HOWEVER, the 'load
 balancer' will opt for a certain server for a certain URL, in order to
 improve cache hits.

Because you're using SiteAccess, every node can access the objects that the
subdomain-primary serves, so you can do loadbalancing or failover.  There might
be some delay as the secondaries draw objects from the siteserver.

 Have a better one,

My life has been so good lately I'm almost afraid to think of what that would be
like.

ethan mindlace fremen
Zopatistas Unite!

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




Re: [Zope] sequence-item and

2000-07-18 Thread Jonothan Farr

I've patched this for 2.1.6. Now you can use sequence_item in addition to
sequence-item.

http://www.zope.org/Members/jfarr/Patches/dtml-in-sv

There's a much cooler and more elegant solution in the pipe for 2.2.

http://www.zope.org/Members/4am/DTMLWiki/NamedDTMLInLoop

--jfarr

"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998

- Original Message -
From: Rob Miller [EMAIL PROTECTED]
To: Diego Rodrigo Neufert [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, July 18, 2000 1:30 PM
Subject: Re: [Zope] sequence-item and ""



 Diego Rodrigo Neufert writes:

  Hi ppl...
 
  Why I cant use dtml-var "sequence-item"??

 Because, as I understand it, anything within "" gets treated as Python code
 by the DTML interpreter.  Thus "sequence-item" is parsed as an expression:
 sequence _minus_ item.  A dash is not a valid variable name character in
 Python, but it is in DTML; this is unfortunate.

 
  Every time I try to access sequence-item under "" in a dtml-call dtml-var or
  anything else I got this error:
 
  Error Type: NameError
  Error Value: sequence
 
  Well, I found a solution:
  dtml-let si=sequence-item
  dtml-var "si"
  /dtml-let
  Now everything is ok... but I dont want to do this, I want to access the
  *@%$#@ sequence-item in "".

 I've searched through the list archives and come to the conclusion that
 your solution above is the cleanest way to handle this, for now.  There are
 other ways, but they involve ugly-looking permutations of the "_" namespace
 variable, and they approach the splendor of Perl in their readability.  The
 "right" solution, IMHO, would be to rename the "sequence-..." variables to
 a different set of names that doesn't cause the Python interpreter to
 choke.  I seem to recall someone saying that this (or something similar)
 was being worked on, but, alas, for now dtml-let is our best option.

 rob

 
  Can anyone help me?
 
  -
  Diego Rodrigo Neufert
  -webmaster
  ---
  (Magic Web Design)
  (email) ([EMAIL PROTECTED])
  (curitiba) (pr)
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope-dev )
 




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



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




Re: [Zope] Need an SQL based auth system that works with Zope 2.2

2000-07-18 Thread Graham Chiu

In article v0422081ab59a36ddacad@[128.240.198.13], Tony McDonald
[EMAIL PROTECTED] writes
Can anyone who's using an SQL based authentication system with Zope 2.2 
successfully please let me know which one you used and how you did it?

What are the requirements for such a beast?

-- 
Regards,  Graham Chiu
gchiuatcompkarori.co.nz
http://www.compkarori.co.nz/index.php
Powered by Interbase and Zope

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




Re: [Zope] Announce: ZBabel a Translation Assistant for Zope

2000-07-18 Thread Andrew Kenneth Milton

+[ Albert Langer ]-
[Charset iso-8859-1 unsupported, filtering to ASCII...]
| [Andrew]
| Yes you can embed DTML inside the block and it will resolve all of the
| DTML before translating the result. You can turn this behaviour off.
| This is why I opted for a container tag, rather than a simple tag.
| 
| [Albert]
| That is what I am still not clear on. Noticed the container, but still
| confused about "literal" and about "before", "after", "off" and "on".
| 
| Suppose web site in source language has something like this:
| 
| 'Click A href="{fieldX(someVar.A)}"here/A, for {fieldY(someVar.B)}'
| 
| With suitably horrific DTML instead of ' ' and {}.
| 
| Rendered english result would be, for some particular dynamic instance of
| someVar:
| 
| 'Click A href="http://www.zope.org/"here/A for Zope'
| 
| Translator for language X decides to reverse the positions of fieldA and
| fieldB and use 3 separate substrings, because it is too abrupt for that
| language, so translates to something like:
| 
| 'If you would like {fieldY(someVar.B)}, click A
| href="{fieldX(someVar.A)}"this link/A, please'

Aha! This is not translation d8) This is re-wording and then translating,
which is a bit of fine hair splitting I know. If you reached a point
where something couldn't be translated, you would have to revisit the source.

| There are now 3 substrings in the translation because it would be rude not
| to start or end with something like "please" in language X, and it reads
| better with the fields reversed in that language.
| 
| Final rendered result becomes (in language X):
| 
| 'If you would like Zope, click A href="http://www.zope.org/"this link/A,
| please'
| 
| depending on the particular value of someVar at the time.
| 
| Does ZBabel allow this? If so, that's *exactly* what I was hoping for.


I think it does what you want to do...

dtml-babel src="langA" dst="langX"dtml-var GreetAndLink/dtml-babel

GreetAndLink...
Click a href="dtml-langXUrl;" For dtml-var AJollyRogering


You would end up with the following to be translated:-

Click a href="the.langx.url" For a good langX clicking

So you would end up with a phrase that would be partially
translated ready for translating because your langXUrl and
AJollyRogering already do some localisation.

However if langXUrl and AJollyRogering are dynamic you should probably 
not wrap them in dtml-babel tags.

| [Andrew]
| I have another project on my TO DO list which is a dynamic components
| product which this would integrate well with.
| 
| Any "Form Generation" products would probably be able to integrate
| the same stuff as well fairly easily.
| 
| It is rather intrusive I know, but, there are few if any options that
| don't require massive amounts of effort to achieve the same thing.
| Especially building the catalogs. I know of another ASP based system
| that's pretty much the same as this, but, they have to go through
| and change the source code after translating (they have to provide a
| dummy 'phrase id' which is then altered). It is really really ugly.
| 
| [Albert]
| The lack of a dummy "phrase id" is what I thought was really great about
| your approach. Thanks!
| 
| I regard HTML/DTML as possibly avoidable clutter in the same way that a
| "phrase id" is.
| 
| If ZBabel already does what I asked above, my question about something
| closer to Zwiki structured text might be more clear in terms of wondering
| whether anything can be done to hide the HTML/DTML tagging and field coding
| from the translator by giving them some sort of template like this:
| 
| 'Click [here] for {Zope}'
| 
| So that they would translate it to:
| 
| 'If you would like {Zope} click [this link[here]], please'
| 
| Note that the two original substrings of ordinary text AND the [bracketed]
| text all denote elements to be translated, while the text in {braces} does
| not, but is sample data visible in the UI as a prototype example for the
| translator.

You can do this by nesting dtml-babel calls...

dtml-babeldtml-babelClick here/dtml-babel dtml-babelfor 
Zope/dtml-babel/dtml-babel

Would yield the following to be translated:-
o Click here
o for Zope
o Click here for Zope

| Then the magic which extracted the HTML (and DTML) tagging and field names
| etc to give the translator something more understandable, would just stick
| it back in, replacing "here" with "this link", but ALSO restoring the
| surrounding DTML/HTML for that element and for the {Zope} element, in much
| the same way that you already do not need a "phrase id" but work directly
| with the text. Translators understand prototypes much more easily than they
| understand web pages.
| 
| (Also useful for content managers cf HTML/DTML designers and convenient for
| HTML/DTML designers too ;-).
| 
| Any possibility of doing that automatically? By clicking "generate
| template", a web developer might be able to generate simplified template
| strings like above for the translator, using a 

Re: [Zope] Need an SQL based auth system that works with Zope 2.2

2000-07-18 Thread Bak @ kedai

On Wed, 19 Jul 2000, Tony McDonald wrote:
 Hi all,
 I think the time has come to bite the bullet and change our 
 authentication engine to work in line with Zope 2.2 and above. 
 UserDB-1.2 seems to have some problems with it (see my message 
 today), a

i use userdb with 2.2 and it worked great.  no problems at all.  maybe you
could try it on a fresh zope install or try it on a copy of your zope
install.  

 -- 
--
http://www.kedai.com.my/kk
Am I Evil?


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




Re: [Zope] Creating Factory Objects (Products)

2000-07-18 Thread Firestar

Hi Dieter,

Surprisingly, even though there's an error message, the product still manage
to 'perform' its function, i.e. build a site from its template.
host:8080/manage still works ok; i guess Data.fs not corrupted. *scratch
head* - does zope like to raise false alarms?? Anyway, thanks for your help.

regards,
firestar

--Original Message--
From: Dieter Maurer [EMAIL PROTECTED]
To: [EMAIL PROTECTED] (Firestar)
Sent: July 18, 2000 6:41:51 PM GMT
Subject: Re: [Zope] Creating Factory Objects (Products)


Firestar writes:
 Haha, thanks for the 'wisdom' cookies:) Here are the last two lines of the
 traceback:

 File /usr/local/Zope-2.1.6/lib/python/OFS/Application.py, line 249, in
 __bobo_traverse__
 (Object: ApplicationDefaultPermissions)
 File /usr/local/Zope-2.1.6/lib/python/ZPublisher/HTTPResponse.py, line
511,
 in notFoundError
 NotFound: (see above)

I have to admit that in this case the end of the traceback
tells not much about the problem.

I found in the sources (ZPublisher.HTTPResponse)
that the resource not found is indicated as
an HTML *comment* in the error page.
I do not know, why the implementers hide this information.


Anyway, the traceback seems to suggest that the problem
is immediately at the top level of your URL.
Is it possible that your "Data.fs" is empty or otherwise in a
strange state?
What happens, if you access your site with
"host:port/manage"?


Dieter


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


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




Re: [Zope] Creating Factory Objects (Products)

2000-07-18 Thread Firestar

Hmm...Z Class was not mentioned in the guide that i'm reading now. Guess i
have to check out on that later...

thanks,
firestar

--Original Message--
From: Pierre Rougier [EMAIL PROTECTED]
To: Firestar [EMAIL PROTECTED], [EMAIL PROTECTED]
Sent: July 18, 2000 9:22:21 AM GMT
Subject: Re: [Zope] Creating Factory Objects (Products)


Hi Fire,
This should work:

-Create a new product (here InstantSiteProduct) (from here, your product can
be
accessed through the "Add" list)
-In this product, add a Z Class (name it Instant Site)
-In this ZClass, create your DTML methods (Designer and Builder)

If u need to store properties in the Product, create a propertysheet in this
Z
Class.
U will be able to access these properties from your product methods by using
"dtml-var propertysheets.your_property "

and, if u want to change the properties in your methods, use

dtml-call propertysheets.your_property.manage_changeProperties(
prop1=val1,,propn=valn)

One more thing: all your changes on the product modify all the instances of
your
product...

These things should work
Hope this help

Pierre :)

 I'm following the tutorial in Zope Content Manager's Guide. I created an
 'InstantSite' product, with 2 DTML methods, Designer and Builder. I
followed
 most of the instructions, and managed to see the product in my 'Add List'.
 But when i tried to add it into my other folders, the Builder page(which
 would be called after Designer) could not be accessed. The error is:

 "Resource not found

 Sorry, the requested Zope resource does not exist.
 Check the URL and try again." followed by the tracebacks...

 In fact, the tutorial doesn't seem comprehensive and contain errors(e.g.
 screenshots different from description). Could anyone give this newbie
some
 pointers here? TIA.

 regards,
 Firestar


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


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




Re: [Zope] Zope is memory intensive?

2000-07-18 Thread Firestar

oops...my mistake for not listing out my configuration. basically i am
testing out zope on a junk machine - PPro 233
with 32MB RAM only:) At the same time, i'm running mysql, apache+php combo,
and each process only consumes abt 8-9% of the memory usage. That's why the
20% from Zope surprised me...

regards,
firestar

--Original Message--
From: Curtis Maloney [EMAIL PROTECTED]
To: Firestar [EMAIL PROTECTED]
Sent: July 18, 2000 6:37:49 AM GMT
Subject: Re: [Zope] Zope is memory intensive?


On Tue, 18 Jul 2000, Firestar wrote:
 Hi, i have installed Zope on a RH6 box, and looking at the processes,
 Zope(running as 'python') consumes abt 20% of the memory usage! A single
 apache daemon only takes abt 9-10%. Is Zope supposed to be so memory
 intensive?

Well, it's all relative, isn't it? (o8

I mean, does Apache do the same work as Zope?  Does it cache Python objects,
is is maintaining database connections, etc etc etc.

I am running Zope on a RH6.1 box, with 96M RAM.  It's using about 12.5% of
my
memory, so far as I can tell.

However, a % isn't much of a guage unless you tell us how much actual memory
you have.

Personally, I find that Netscape is more of a problem memory wise than Zope
ever will be. (o8

 regards,
 firestar


Have a better one,
Curtis Maloney

dtml-var standard_work_disclaimer


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


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




[Zope] Re: Member Login

2000-07-18 Thread ethan mindlace fremen

Frank McNamara wrote:
 
 Thanks for the help. Wouldn't it be a good idea to include this information
 somewhere in the documentation, or have I missed it?

Basic Authentication is part of the "architecture standards", like
TCP/IP and
HTML, are generally beyond the purview of zope documentation. 
The standard in this case is HTTP, where Basic Authentication is
defined:

 http://www.cis.ohio-state.edu/htbin/rfc/rfc2068.html

There is another rfc - the next one, submitted the same month- that
describes
digest authentication, a vastly more intelligent scheme.  However,
despite the
fact that Netscape and Microsoft both partook in making this RFC nearly
three
*years* ago, neither of the browsers support the standard.

RSA's patent caused a modularization of Mozilla's crypto functions, so
there is
a faint hope that some enterprising soul will implement digest auth. 
There's a
post just to that effect in this week's status update at mozilla.org.

It would be even better (for me at any rate) if there was some other way
to change user and/or log out.

We definitely feel your pain: there are many authentication packages out
there. 
LoginManager, MySQL user folder, smb User Folder, etcUserFolder and
GenericUserFolder are all tools people have used to provide
authentication in
different ways.

Hope that helps,

ethan fremen

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