[Zope-dev] basci properties

2000-10-07 Thread Robin Becker

I want to create a ZClass that is essentially a folder with some added
properties. I can see no way to add to the Basic properties of my
ZClass.

Is there a way to do that?
-- 
Robin Becker

___
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] Refresh and debugging product creation issues.....

2000-10-07 Thread Steve Spicklemire


Debugging products is a pain... restarting Zope all the time is a Pain

THANK GOD for Shane Hathaway. ;-)

I am delighted to report general success with the Refresh product!  My
only problem is while debugging the process of creating new EMarket
instances, I find that every time I run 'Refresh' I get a new
"EMarket" in the 'Available Objects' popup. A quick test of other
Products shows the same behavior. 

Soo... I snooped through the product creation code and found
that Products.meta_types was being unconditionally appended to
every time context.registerClass was called so I changed
my initialize to this:

def initialize(context):

import Products

context.registerClass(
EMarket.EMarket,
permission='Add EMarkets',
constructors=(EMarket.addEMarketForm,
  EMarket.addEMarket),
icon='emarket.gif',
)

found_count = 0

new_products_meta_types = []

for index in range(len(Products.meta_types)):
if Products.meta_types[index]['name'] == EMarket.EMarket.meta_type:
found_count = found_count + 1
if found_count == 1:
new_products_meta_types.append( Products.meta_types[index] )
else:
new_products_meta_types.append( Products.meta_types[index] )

Products.meta_types = tuple( new_products_meta_types)

In other words... only include the original version of EMarket.EMarket.meta_type
in the Product.meta_types tuple... if there are others... leave them out.

...and that seems to have solved the problem

Does this seem like an OK idea?

thanks,
-steve


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




Re: [Zope-dev] Strange Error - in collector yet?

2000-10-07 Thread Lalo Martins

On Thu, Oct 05, 2000 at 10:01:15AM +0100, Chris Withers wrote:
 Lalo Martins wrote:
  
  This is on Zope 2.2.1. I'd really appreciate some clues on how
  to bust these ghosts.
 
 Have you put a full description in the bug collector yet?

Now it is. It was assigned number 1676.

I also busted my ghosts - by manually manipulating the ZODB via
Python. Felt kind like a brain surgery - on myself, using a
paperclip, a pencil and a pocket mirror. But it worked.

(To the tune of the Ghostbusters Theme by Ray Parker Jr.)

"An invisible ZClass sleeping in your bed? Who you're gonna
call? Py-thon!"

[]s,
   |alo
   +
--
  Hack and Roll  ( http://www.hackandroll.org )
News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo   mailto:[EMAIL PROTECTED]
 pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar

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




Re: [Zope-dev] ZPatterns design questions

2000-10-07 Thread Michael Bernstein

"Phillip J. Eby" wrote:
 
 How (and why) do you distinguish between UI implementation
 and presentation logic?
 
 Presentation logic lives with an object's class, and deals with what that
 object knows about presenting itself.  UI implementation is "glue"
 presentation that lives in a Specialist for use by any object that needs to
 present UI related to objects of the kind the Specialist handles.  The
 terms used here are "official" terminology with precise definitions, btw.
 I am just trying to answer your questions as best I know how.

I'm not sure, but did you mean 'are not' in that last
sentence?

 An example of presentation logic would be a method which displays a form to
 perform some action on the object.  E.g., let's say we have a "Task" object
 with an "Assign To" form.  Tasks are assigned to Assignees, but in a given
 application, there could be many possible kinds of Assignees and the means
 of selecting an Assignee is context-dependent.  Thus, a Task's presentation
 logic cannot implement such a thing directly; it must ask the Assignees
 specialist for a code snippet (UI implementation) that displays an assignee
 selection sub-form within its "Assign To" form.
 [snip]
 The Assignees specialist is responsible for providing an appropriate UI
 implementation (hence the name) for this operation.  It could provide a
 dropdown list, a type-in box with a button to pop up a search window that
 lets you search the employee directory, or any number of other possible
 implementations that would get the necessary data back to the assignment
 method once the form was submitted.  We could include a simple
 implementation with our task management framework, and the application
 integrator would override it if needed for their situation.

Thanks, this is starting to make a lot of sense WRT reusable
frameworks.

Here is where my 'Specialist/Generalist' confusion came
from. It seems to me, that the simple implementation (you
might also call it the default implementation) for the
selector UI in your example should be contained in a
'Generalist' object that could be overridden by a
'Specialist'. This would help make crystal clear the line
between Presentation Logic and Implementation UI, and would
also serve as a useful starting point for creating the
overriding methods in the 'Specialist' by the framework
customizer.

  We have not yet released any actual frameworks based on ZPatterns, [snip]
 
 Isn't LoginManager a framework?
 
 Okay, you've got me there.  I tend not to think of it that way, if only
 because there are many things less than satisfactory about its current
 state of implementation.  For example, if we had it to do over again, I
 would re-work the internal API so that roles, domains, authentication,
 etc., could be controlled by plug-ins on the user sources.  At that point
 there would be no need for different kinds of user sources, as they would
 all be fully generic.  But anyway, I digress.

In light of my own dificulties in adding SMB authentication
to PersistentUserSouce.py, and Bill Andersons dificulties
with password encryption on some Unices, I think that this
would be a *very* worthwhile effort. Such a project might
also give you the mandate to get DC to fix the Zope internal
acl_users interfaces that were getting in your way.

How large of a project would this be?

Thanks for your patience in answering my questions. I think
I'm getting a good understanding of this approach, but I'm
still working on internalizing it.

Michael Bernstein.

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




Re: [Zope-dev] ZPatterns design questions

2000-10-07 Thread Michael Bernstein

Steve Spicklemire wrote:

  - How does this product (simple though it is) exemplify the
  RIPP approach?
 
 pje I'm not sure that you can say it *exemplifies* the RIPP
 pje approach, although it certainly goes along with that
 pje approach.  My hesitation is mainly that it doesn't really
 pje show any of RIPP's major benefits, which are associated with
 pje framework re-use and integration.  For that, you really need
 pje to have more than one kind of object, with some kind of
 pje collaboration taking place.
 
 Hmm.. can anyone thing of a good collaboration 'partner' for
 a simple ToDo list? If it's not too complex.. I'd be happy to
 add it.

I've thought about this since yesterday, and the simplest
kind of 'partner' that I can imagine for a 'ToDo', would be
a 'Deliverable'.

A deliverable would probably have a title, it's own 'Done'
boolean property, and probably an optional DeliverableURL
property. I'm not sure if it would need it's own 'Doer'.

ToDo would need to be reworked so that it's 'Done' property
could only be set if all associated Deliverables (if any)
were also done (Steve McConnel (sp?) calls these 'binary
milestones').

What do you think, is that simple enough?

Michael Bernstein.

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




[Zope-dev] A good collaboration 'partner' ? Was: ZPatterns design questions

2000-10-07 Thread Spicklemire, Jerry

Hi Steve, and fellow ZPatterns Wannabees,

As to the sorts of things most of us need to keep track of that could tie
into a simple "ToDo" List, so far we've seen suggestions for an Address Book
and Deliverables. The first sounds kind of like a Contact List to me, or
maybe an Ownership or Collaboration List. A way to keep track of other folks
involved or concerned with each "ToDo" item. The second sounds like adding a
Status Field to each "ToDo" item, and defining what it takes for each to be
tagged as "Done". This might take the form of completed steps, finished
output, or whatever, making up a sort of mini-workflow.

In the a Normalization process of a tabular database each of these could be
seen as child tables, since there could be more than one Contact or
Deliverable for a "ToDo" item in the parent table.

While we're on the subject of fleshing out a "ToDo" schema, consider a
interfacing with a simple calendar, for task scheduling. This would enable
assignment of target dates, and dependencies. For example, if task B must be
done by the 37th of Penultember, the closer we get to the 37th, the "hotter"
task B gets. Furthermore, if task A must be at least halfway complete before
task B can be started, task A should heat up even sooner.

This is basically the sort of thing a Project Management system does. A
simple dependency model might be added in the form of a few "rules" based on
comparing status, dependency, and target dates. "Hot" items could be
highlighted for special attention, when a critical threshold is crossed.

This may be too ambitious, or even counter productive. I realize the point
is not to create the ultimate Personal Information Manager application, but
to illustrate how ZPatterns aids integration across "unrelated"
applications. Still, integrating an Address Book, Calendar, and ToDo list
isn't all the far fetched, as each one could have been created as handy
little stand alone utilities.

On the other hand, knowing you're working on something that could actually
turn out to be useful might assist in the motivation process! 

Later,
Jerry S.

___
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] Underscore Caracter

2000-10-07 Thread Kapil Thangavelu

Chris McDonough wrote:
 
 Yes.  Thank you.
 
 Note however that methods of modules accessed via the underscore namespace
 may be filtered individually, so although 'replace' exists as a method of
 the Python string module, this does not necessarily make it accessible
 implicitly through Zope via _.string.replace.  It happens to be accessible
 in this case, but I'd bet there are cases in which methods accessible
 via modules of the _ namespace have been removed for "safe scripting"
 purposes.

having recently gone through the code to produce ZModules (defined
interface for adding modules to _), it was apparent that all the modules
that live in namespace are completely exposed.


Kapil

___
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] Problem of Catalog Find items to ZCatalog

2000-10-07 Thread iap_y2fun.com

Hi,

In the management view of a Catalog (ex. /Catalog),
there is a tab named "Find items to ZCatalog".
In that tab, there is a field "Find objects of type:".
The options listed there were retrieved from the "factory" of a ZClass.
(The "add list name" field, a good feature for people who are not native
speakers of English.).

I doubt that what "Find items to ZCatalog" actually searched is the
meta_type of the objects not the value of "add list name" in its ZClass.
Because I have to identify these two in order to find my items to ZCalalog.
Is that true?

Iap, Singuan





___
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] Underscore Caracter

2000-10-07 Thread knight

 Chris McDonough wrote:
  
  Yes.  Thank you.
  
  Note however that methods of modules accessed via the underscore namespace
  may be filtered individually, so although 'replace' exists as a method of
  the Python string module, this does not necessarily make it accessible
  implicitly through Zope via _.string.replace.  It happens to be accessible
  in this case, but I'd bet there are cases in which methods accessible
  via modules of the _ namespace have been removed for "safe scripting"
  purposes.
 
 having recently gone through the code to produce ZModules (defined
 interface for adding modules to _), it was apparent that all the modules
 that live in namespace are completely exposed.

What's the problem with that? Aren't most, if not all, the modules living
in the _ namespace just standard python modules available anyways?

Knight


___
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 user authentication in Python

2000-10-07 Thread Philipp Auersperg


The core of HTTP authentication is the following (you have to put the authentication 
into the HTTP header):

import httplib
h=httplib.HTTP()

h.putheader("AUTHORIZATION", "Basic %s" % string.replace(
encodestring("%s:%s" % (self.username, self.password)),
"\012", ""))


there is a xmlrpc howto where you find a detailed description:

http://www.zope.org/Members/Amos/XML-RPC

good luck
phil

*** REPLY SEPARATOR  ***

On 06.10.2000 at 14:22 Hung Jung Lu wrote:

Hi,

Where can I find out more information on HTTP user authentication? I have 
seen the RFC before, but it's a bit too technical to follow. I think Python 
does not include the authentication/cookie handling part probably because 
out of concern about abuses. :)

Does anyone know where I can find more info on the authentication and cookie 
protocol stuff? Is there any Python module already written to handle these 
things?

The idea is to be able to fetch external webpages automatically using 
Python, including providing the necessary auth and cookie info. Of course 
this opens up a whole can of security worms, but heck, it's open information 
and someone must already have written something in Python already.

regards,

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

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


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




___
Zope 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] A DTML problem using Namespaces

2000-10-07 Thread tav

hi, i am running into a slight problem due to STILL not being able to
understand namespaces perfectly, and would appreciate if someone could help
out.

-
the situation is this:
-

i have a dtml document called "pageowners", on which i have a list property
called owners. which changes every hour. lets assume right now, it says tav
and Bill.

now, in the same folder, i have a dtml method called "parseit", and i have
three dtml documents, called "tav", "noa" and "Bill". there is a dtml
document corresponding to each owner.

each of the three documents have a title and content. parseit simply gives
them a table layout, which simplified immensely, looks like:

tabletrtd
dtml-var title
/tdtd
dtml-var owner-name
/td/tr/tablebr

what i want to do is display whomever is listed as an owner, in such nice
tables.

-
the problem is this:
-

in "standard_html_header", it looks up which owners are listed in
"pageowners", and then runs through them in a sequence. however, (and this
is where it gets tricky), i want the owners to be formatted by running them
thru "parseit".

however i get stuck when in parseit, as i dont know how to do dtml-var
Bill, i tried to set Bill in the namespace by using dtml-with
Billdtml-var parseit, and then tried to call dtml-var id within
"parseit" but that doesn't work :/

and, again, i want this to be done automatically, so i dont want to have to
manually list Bill, tav, noa, etc

i am pretty sure that DTML can handle this, and this is one of the reasons
why i like zope, because it lends itself to a structured system which is
easily maintainable, e.g. the owners could increase from 5 to a 1000, and
this would still work.

Any help would be much appreciated. Thanks in advance

--
best regards, tav


___
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] 'Offline' mailhost

2000-10-07 Thread Jan H. Haul

Terry Kerr wrote:
 
 Chris Withers wrote:
 
  Hannu Krosing wrote:
 
   Also you could send just one message to all the recipients instead of
   sending individual messages.
 
  Urm, they could be pretty unfriendly mail messages if they're being sent
  to a coupla thousand people. The bandwidth dcoming out of your server
  alone would be far higher than it needed to be :-(
 
 How would the bandwidth change??

Well, suppose you send a message of, say, 2 KByte (about one page
of typed text) to 1,000 recipients. You'll make about 1,000
connections to the recipients' MX hosts. 

Each of these will be around 42 KByte large.

Huh? Why that? you ask.
Because in the header of each mail, the whole recipient list will
be listed under To: or Cc: (I assumed 40 bytes per address as a
roundabout figure). In the envelope (what the SMTP protocol
*uses* to deliver the message, only one address will be used, the
body To: list is mainly for the recipients' use (to show them who
else got it).

Besides, there are other problems why you will want separate
mails:

- privacy: You would not like to have "your" recipients end up on
other people's mailing lists
- stability: When E-mail bounces, you would like to hanle it
intelligently, like trying this address once again (as it could
be a temporary outage) and take the address off the list if it
still bounces a week or so later
- stability again: You woulld not like to be blacklisted as
either a spammer or clueless by the recipients' postmaster :-)

I would probably use a stable MTA (like qmail, which has good
mailing list processing software, or postfix) for the job.

Cheers,
Jan


___
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] Quotes in DTML (Python) expressions(was: [Zope] HTML-Code in variables (addition)) (was: [Zope] HTML-Code in variables (addition))

2000-10-07 Thread Dieter Maurer

Lars Heber writes:
  dtml-let text="my html text with a link to a
  href="http://www.yahoo.com"Yahoo!/a"
dtml-let text="'my html text with a link to a 
href=\x22http://www.yahoo.com\x22Yahoo!/a'"

I.e. you use Python's hexadecimal (or octal) quoting for '"' (\x22)
inside the Python string.


Dieter

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




Re: [Zope] Problem with DTML-CALL

2000-10-07 Thread Dieter Maurer

Tim Gildersleeve writes:
  The line is
  
   dtml-call "REQUEST.set('TOTALDEVIATION',fSTART)"
  Error Type: TypeError
  Error Value: number coercion failed
I can assure you, that the "number coercion failed" is not
raised in the above "REQUEST.set". "set" accepts any
type.

The problem arises at a later time, probably because "fSTART"
or some other computation incredient does not have the correct
type.

You know about the magic ":type" suffixes in form variables.
There is a howto about them at Zope.org.



Dieter

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




Re: [Zope] external method import error (ImportError)...

2000-10-07 Thread Dieter Maurer

Eric writes:
  To summarize: How do I import modules in an External Method's .py file?
I remember, I read this in some "External Method" related documentation.

You do *NOT* place such modules inside the folder "Extensions"
but put them somewhere else reachable by "PYTHONPATH".

The documentation suggests that you create a subpackage inside
"Shared", say "myCompanyExtensions", and place there
your module (don't forget "__init__.py" in the subfolder
representing the subpackage), say "myModule".

Then, in your external method, you would use:

from Shared.myCompanyExtensions import myModule


Dieter

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




Re: [Zope] Wierd 2.2.2 start up problem

2000-10-07 Thread Dieter Maurer

J. Atwood writes:
  I have installed 2.2.2 on more than a few machines on my fifth machine I
  got this after doing the install.
  
  2000-10-04T19:54:35 ERROR(200) ZODB Couldn't load state for
  '\000\000\000\000\000\000\000\003'
  Traceback (innermost last):
File /usr/local/Zope-2.2.2-linux2-x86/lib/python/ZODB/Connection.py, line
  446, in setstate
  ImportError: No module named Document
  
  I have tried wiping it away and trying again like three times. Anyone know
  what this? Why it is not happening in installs. All RH Linux.
On your fifth machine, the ZODB seems to contain an object
referencing a module "Document" which apparently is not installed.

Activate the logging facility (by starting Zope
with "start  STUPID_LOG_FILE=zope.log ...") and check,
whether you see anything suspicious in "zope.log".


Dieter

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




Re: [Zope] client proxy setting

2000-10-07 Thread Dieter Maurer

TMGB writes:
  Can I get the user's client proxy setting using 'REQUEST' or some other
  syntax, product, or utility.  This is not Proxy Roles or ProxyPass, but
  the client's proxy settings if any.  I am working on a help page to
  debug a user's settings if he or she can't get to certain pages with our
  proxy server settings on their browser. 
I am not sure, I understand what you want to know.

I you mean:
  
  how is the browser's proxie configuration: manually, direct connection
  or automatic (with what configuration file).
  Then, I fear, you will not get this information.

If you want to know, which proxie was used for a given request,
then there is some chance.
Some proxies set the HTTP "VIA" header. Inside Zope, you
access it as "HTTP_VIA". It can tell you through which proxies
the request was routed.



Dieter

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




Re: [Zope] LDAP won't work - yes I've applied the patch

2000-10-07 Thread Dieter Maurer

Roman Milner writes:
  I'm trying to get ldap methods to work with 2.2.2.  I can access the
  attributes of the objects returned from an ldap method with a python
  extension fine, but dtml-in'ing the returned list doesn't work. I keep
  getting an error (traceback below).

  !--
  Error Type: KeyError
The new Zope 2.2 security model hides objects you are not
authorized to use. Therefore, you get "KeyError" where
you may (or not) expect "Authorization Error".

Probably, the LDAP product is not yet adapted for Zope 2.2.
Probably, there need to be a
 "__allow_access_to_unprotected_subobjects__ = 1"
somewhere.

Maybe, you can contact the author, or try it yourself.
There is documentation from Brian decribing what products
need to do in order to be compatible with the new Zope 2.2
security policy.


Dieter
 

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




Re: [Zope] Container Class questions

2000-10-07 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
    product with associated image 
  Should I create a product that can contain said images?  If so, how do 
  I do this?  Should I simply force a naming conventions for the images 
  and tie them together with the sample catalog items that way?
I would use a ZClass to model the product.
I would inherid from "Folder". This makes the ZClass folder-like.
Especially, I can place images and other related objects inside
them (if they do not easily fit in properties).


Dieter

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




Re: [Zope] Container Class questions

2000-10-07 Thread Robin Becker

In article [EMAIL PROTECTED], Dieter Maurer
[EMAIL PROTECTED] writes
[EMAIL PROTECTED] writes:
    product with associated image 
  Should I create a product that can contain said images?  If so, how do 
  I do this?  Should I simply force a naming conventions for the images 
  and tie them together with the sample catalog items that way?
I would use a ZClass to model the product.
I would inherid from "Folder". This makes the ZClass folder-like.
Especially, I can place images and other related objects inside
them (if they do not easily fit in properties).


Dieter

I'm doing something similar to this inheriting from folder.

I would like to add properties in a property sheet, but cannot find a
neat way to see the properties on the base object and on the
propertySheet.

So I would like my properties to show
id
title

and the properties on my basic properties sheet.

I can easily add properties directly to the object during the Thing_add
and Thing_addForm and these appear on the properties tab for added
objects.

How do I get a tab for the property sheets?
-- 
Robin Becker

___
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] Web statistics

2000-10-07 Thread Stephan Goeldi

Is there something like webalizer for Zope?
I would like to create a statistic of my website's visits.
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.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] 'Offline' mailhost

2000-10-07 Thread Michael Bernstein

"Jan H. Haul" wrote:
 
 Each of these will be around 42 KByte large.
 
 Huh? Why that? you ask.
 Because in the header of each mail, the whole recipient list will
 be listed under To: or Cc:
 [snip]
 - privacy: You would not like to have "your" recipients end up on
 other people's mailing lists

What about using BCC: ?

Michael Bernstein.

___
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] Can Free Software Manage Your Web Site? http://www.inside.com/

2000-10-07 Thread Michael Bernstein

"Steven D. Majewski" wrote:
 
 Inside magazine http://www.inside.com/ has a feature on Zope:
"Can Free Software Manage Your Web Site?"

Here's the direct link:
http://www.inside.com/story/Story_Cached/0,2770,10617_13_32_1,00.html

Michael Bernstein.

___
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, Threads and Signals

2000-10-07 Thread Michael Bernstein

 Wilkinson Charlie E wrote:
 
 It all began when I was a small child, but I'll skip ahead
 a bit 

I almost hate to say this, since your post is an interesting
one otherwise, but please don't send HTML email to the list.
Some of the people here don't use HTML-capable mail clients.

Thanks,

Michael Bernstein.

___
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, Threads and Signals

2000-10-07 Thread Charlie Wilkinson

"Knight" once said:
 
 cw,
 
 Are you spawning additional threads by chance? Or just the threads that
 Zope creates?

No, I'm a Python newbie who doesn't know of threads yet, so this is just
Zope threads working their magic. :-)

Right now I'm just shooting for a simple network client as a proof of
concept, though ultimately I need to take into account that the server
this client is talking to is *cough* single instance and single threaded
(i.e. only one client at a time).  So what I really need to do for the
long haul is set my client software up to hold a persistent connection
and multiplex/queue the requests.  I assume that means I'll need to
rewrite my External Method interface as a Zope Product?

Maybe I should try to grok one of the database connection products and
model after that?


The server is Rand McNally's Unix Resident MileMaker (URMM) milage
calculation software for shipping, if you were wondering (what to avoid?)

Thanks,
Charlie

-- 
~
Charlie Wilkinson - [EMAIL PROTECTED] - N3HAZ
Parental Unit, UNIX Admin, Homebrewer, Cat Lover, Spam Fighter, HAM, SWLer...
Visit the Radio For Peace International Website: http://www.rfpi.org/
~
CLOBBER INTERNET SPAM:  See!! http://spam.abuse.net/
   Join!! http://www.cauce.org/
~
QOTD:
"Bush is a big corporation disguised as a human being running for president."
-- Ralph Nader on David Letterman (9/28/00)

___
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, Threads and Signals

2000-10-07 Thread Charlie Wilkinson

Michael Bernstein  [EMAIL PROTECTED] wrote:
  Wilkinson Charlie E wrote:
  
  It all began when I was a small child, but I'll skip ahead
  a bit 
 
 I almost hate to say this, since your post is an interesting
 one otherwise, but please don't send HTML email to the list.
 Some of the people here don't use HTML-capable mail clients.

RANT target="Microsoft"
[Charlie draws a deep breath and starts out softly]

I'm not a dummy.  I've been a UNIX application developer and SysAdmin
for ten years.  Really goofy hardware too.  Ever try and build Sendmail
on a Pyramid MIS-4?  For ten years before that I was an electronics
repair technician.  I've forgotten more technical details than most
people will ever know, and I relish that I can pick up some strange piece
of equipment and figure out how to operate it in a matter of minutes.
_And_ I'm a ham radio operator - we *love* buttons and knobs!

BUT I CAN'T SHUT OFF HTML IN OUTLOOK TO SAVE MY MISERABLE F*ING LIFE

Yes, yes, I've been through all the usual steps.  I even check the
format settings on the message before sending it to confirm that it is
in fact plaintext.  No matter.  It gets posted with f-ing HTML!  This is
despite the fact that I'm now stuck sending plaintext to everyone in
our organization!  My suspicion is that some well meaning but deranged
Exchange SMTP gateway server is doing the conversion, as there's a meta
tag that says the HTML generator is Exchange.  I've tried talking to
the people who run the servers, but they are clueless and keep saying
it's something I'm doing.

So I just try to avoid posting to the list from Outlook, but last night
at the office I was (and still am) desparate.  But now I'm home with
Linux/Mutt. Yay! :-)
/RANT

Sorry you had to read that.  (Where's my medication?)

-cw-

-- 
~
Charlie Wilkinson - [EMAIL PROTECTED] - N3HAZ
Parental Unit, UNIX Admin, Homebrewer, Cat Lover, Spam Fighter, HAM, SWLer...
Visit the Radio For Peace International Website: http://www.rfpi.org/
~
CLOBBER INTERNET SPAM:  See!! http://spam.abuse.net/
   Join!! http://www.cauce.org/
~
QOTD:
"Bush is a big corporation disguised as a human being running for president."
-- Ralph Nader on David Letterman (9/28/00)

___
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] Accessing a Zclass' method needs authentication of the superuser

2000-10-07 Thread Dieter Maurer

Nico Grubert writes:
  i created a zclass "myzclass" inside a product "myprod".
  inside of the zclass i created a dtml-method "mymethod_html" which can
  be found by the tab "Methods".
  
  in the root folder i have created a dtml-method "gimme_html" conatinintg
  the following code to access the method "mymethod_html" :
  
  dtml-with "manage_addProduct['myprod']"
  dtml-with "myzclass"
dtml-var "gimme_html"
Surely, you mean:
 dtml-var mymethod_html
  /dtml-with
  /dtml-with
  
  this code will bring me up a login-screen. 
  i am logged in as manager with the role Manager.
  i have no permission to access "mymethod_html". WHY ? WHERE DO I HAVE TO
  DEFINE THAT ?
  when i type in "superuser" and the password for the superuser I DO HAVE
  access to the dtml-method "mymethod_html".
When I try this in my (installed) Zope 2.2.2, I get a name error
both as manager and superuser. Obviously, the ZClass methods
are no longer directly accessable via the ZClass.

I suppose, ZClass methods are not supposed to be used independent
from ZClass instances. When I access the method via a ZClass
instance, everything works as expected, i.e. it can be used
both by manager and superuser (and probably others, I just did not
try).


Dieter

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




Re: [Zope] HTML-Code in variables (addition)

2000-10-07 Thread Tino Wildenhain

Hi Lars,

Lars Heber wrote:
 
 Sorry, I mixed something up. Normal html is no problem at all.
 The problem is how to use quotes or such things.
 
 Of course I get an error by typing:
 
 dtml-let text="my html text with a link to a
 href="http://www.yahoo.com"Yahoo!/a"
 
 I tried typing quot; instead of ", but then the "quot;" also goes into
 the html code on my page - thus the link is broken...
 
 Are there any possibilities to let Zope change the quot; into ", or
 perhaps there is another way to do it like with the \" in C.

Yes, there is. Use documenttemplates for this. This is exactly what Zope
is designed for :-)
I.e. make an dtml-method with the text instead of trying to build it
like
this.

Regards
Tino

___
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, Threads and Signals

2000-10-07 Thread Michael Bernstein

Charlie Wilkinson wrote:
 
 Michael Bernstein  [EMAIL PROTECTED] wrote:
   Wilkinson Charlie E wrote:
  
   It all began when I was a small child, but I'll skip ahead
   a bit
 
  I almost hate to say this, since your post is an interesting
  one otherwise, but please don't send HTML email to the list.
  Some of the people here don't use HTML-capable mail clients.
 
 RANT target="Microsoft"
 
 I'm not a dummy.

I didn't mean to imply that you were.

 [snip experience] 

 BUT I CAN'T SHUT OFF HTML IN OUTLOOK TO SAVE MY MISERABLE F*ING LIFE
 
 [snip attempts to supress HTML]
 
 My suspicion is that some well meaning but deranged
 Exchange SMTP gateway server is doing the conversion, as there's a meta
 tag that says the HTML generator is Exchange.  I've tried talking to
 the people who run the servers, but they are clueless and keep saying
 it's something I'm doing.
 [snip]
 /RANT

Monday I'll check with our sysadmin and take a look at the
Exchange Management UI myself. If I can identify the correct
'knob', I'll let you know, so you can pass this information
along to your server admins.

Meanwhile, you could use a free web-mail account, and just
set the Reply-To or CC to your actual email address. I like
netaddress.com (no Reply-To, though).

Michael Bernstein.

___
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] LDAP won't work - yes I've applied the patch

2000-10-07 Thread Roman Milner

 "DM" == Dieter Maurer [EMAIL PROTECTED] writes:

DM Maybe, you can contact the author, or try it yourself.  There
DM is documentation from Brian decribing what products need to do
DM in order to be compatible with the new Zope 2.2 security
DM policy.


DM Dieter
 

I've already littered the whole ldap productg with
_allow_access_to_unprotected_subobjects=1's, to no avail.  Besides,
with the patch applied, the product claims to work with 2.2. I guess
my next step will be to email the author.

^Roman


___
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] LoginManager - how does it work?

2000-10-07 Thread ed colmar



I've managed to get loginManager to install, but I 
am very confused as to what to do with it.

I've read the how-tos on zope.org, and the 
documentation of LoginManager itself... But I still don't understand what 
is supposed to happen.

A User Source is a location to find users, Say, my 
SQL database, right?

How do I tell it to use the SQL methods I have for 
retrieveing passwords?

The how-tos say to create dtml-methods called 
"userAuthenticate" "userExists" and "userRoles". Where do these go? 


Can anyone help me see the light on 
this?

Thank you




[Zope] AUTHENTICATED_USER (or something) making me crazy

2000-10-07 Thread Dennis Nichols

If I inspect REQUEST by inserting a dtml-var REQUEST in my dtml I can see 
that AUTHENTICATED_USER is set to Anonymous User. Yet when I insert the 
following code, it never displays Guest. It takes the else branch and then, 
perversely, displays Anonymous User. Please point out my stupid mistake.

dtml-if "AUTHENTICATED_USER=='Anonymous User'"
  Guest
dtml-else
  dtml-var AUTHENTICATED_USER
/dtml-if

Thanks. Maybe I shouldn't work on Saturdays. Zope 2.2.2 roughly, Python 
1.5.2, RH 6.2

--
Dennis Nichols
[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] AUTHENTICATED_USER (or something) making me crazy

2000-10-07 Thread Andy McKay

You can check the username of AUTHENTICATED_USER as in dtml-if
"AUTHENTICATED_USER.getUserName()=='Anonymous User'" (To all the people who
complained about me using _.str(...)) or you might want to check the role as
in dtml-if "AUTHENTICATED_USER.has_role('Anonymous User')".

- Original Message -
From: "Dennis Nichols" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 07, 2000 3:40 PM
Subject: [Zope] AUTHENTICATED_USER (or something) making me crazy


 If I inspect REQUEST by inserting a dtml-var REQUEST in my dtml I can
see
 that AUTHENTICATED_USER is set to Anonymous User. Yet when I insert the
 following code, it never displays Guest. It takes the else branch and
then,
 perversely, displays Anonymous User. Please point out my stupid mistake.

 dtml-if "AUTHENTICATED_USER=='Anonymous User'"
   Guest
 dtml-else
   dtml-var AUTHENTICATED_USER
 /dtml-if

 Thanks. Maybe I shouldn't work on Saturdays. Zope 2.2.2 roughly, Python
 1.5.2, RH 6.2

 --
 Dennis Nichols
 [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 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] AUTHENTICATED_USER (or something) making me crazy

2000-10-07 Thread Phil Harris

Dennis,

try:

dtml-if "AUTHENTICATED_USER.getUserName() == 'Anonymous User'"
Guest
dtml-else
  dtml-var AUTHENTICATED_USER
/dtml-if

Zope is 'celver' enough to realise that you must mean the username when you
do:

  dtml-var AUTHENTICATED_USER

but 'stupid' enough not to realise when you do:

dtml-if "AUTHENTICATED_USER=='Anonymous User'"

Basic rule of thumb is that anythin in quotes is Python, and since AU is an
object, it must be treated as such.

btw, if you haven't yet got the Zope Quick Reference, get it now!

you still here, what you waiting for! - go get it now!  8¬)

http://zdp.zope.org

hth

Phil


- Original Message -
From: "Dennis Nichols" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 07, 2000 11:40 PM
Subject: [Zope] AUTHENTICATED_USER (or something) making me crazy


 If I inspect REQUEST by inserting a dtml-var REQUEST in my dtml I can
see
 that AUTHENTICATED_USER is set to Anonymous User. Yet when I insert the
 following code, it never displays Guest. It takes the else branch and
then,
 perversely, displays Anonymous User. Please point out my stupid mistake.

 dtml-if "AUTHENTICATED_USER=='Anonymous User'"
   Guest
 dtml-else
   dtml-var AUTHENTICATED_USER
 /dtml-if

 Thanks. Maybe I shouldn't work on Saturdays. Zope 2.2.2 roughly, Python
 1.5.2, RH 6.2

 --
 Dennis Nichols
 [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 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] AUTHENTICATED_USER (or something) making me crazy

2000-10-07 Thread knight

Dennis,

You might benefit from reading some of the general HOWTO's at
http://www.zope.org. Consider searching for "AUTHENTICATED_USER" or "user
manager".

A quick answer to your problem though:

AUTHENTICATED_USER is actually a class object (meaning it contains
variables of it's own, as well as functions). To _properly_ access the
data in the AUTHENTICATED_USER, you need to call upon the methods
(functions) that perform the task you want.

In this case, you want to compare the current user to some other value. In
that case, you want to call the getUserName method of AUTHENTICATED_USER.

Your code modified to work would be:

  dtml-if "AUTHENTICATED_USER.getUserName()=='Anonymous User'"
Guest
  dtml-else
dtml-var "AUTHENTICATED_USER.getUserName()"
  /dtml-if

Regards,

Knight
[EMAIL PROTECTED]

On Sat, 7 Oct 2000, Dennis Nichols wrote:

 If I inspect REQUEST by inserting a dtml-var REQUEST in my dtml I can see 
 that AUTHENTICATED_USER is set to Anonymous User. Yet when I insert the 
 following code, it never displays Guest. It takes the else branch and then, 
 perversely, displays Anonymous User. Please point out my stupid mistake.
 
 dtml-if "AUTHENTICATED_USER=='Anonymous User'"
   Guest
 dtml-else
   dtml-var AUTHENTICATED_USER
 /dtml-if
 
 Thanks. Maybe I shouldn't work on Saturdays. Zope 2.2.2 roughly, Python 
 1.5.2, RH 6.2
 
 --
 Dennis Nichols
 [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 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] Web statistics

2000-10-07 Thread

I'll tell you what we did -we used webalizer itself, and use
LocalFS to get the results on the web.
Zope's logs are in a pretty standard format, so you shouldn't
have any problem.

Dimitris




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