[Zope-dev] RE: RFC : ZPatterns Customer Relationship Management Framework

2000-11-11 Thread Roch'e Compaan

Thanks for your comments on our model Philip, it is really appreciated and
very enlightening.

From your comments some other questions came to mind (I posted this on the
Wiki as well):

It seems that we did not give enough consideration for the pattern, Roles
Before Objects but we can retrofit this pattern to our existing design
without to much trouble. The area where I need more guidance is on the
ability of a specialist to add attributes on top of objects.

Thinking out load:

Objects might have different attributes depending on the roles they play in
various application frameworks. Specialists make it possible to add these
attributes through AttributeProviders.

One might create a Person ZClass with properties Name, Surname, Age. When
the Person plays the role of Customer we will create a Customers specialist
for that role providing us with services relevant to dealing with Customers.
Let's say for now that the properties defined on our ZClass propertysheet
for Person suffices for the Customer role.

Our Person object also plays the role of Requester in our Requesters
specialist. For this role we need an extra attribute, Priority. The
Requesters specialist will ask the Customers specialist for properties Name,
Surname and Age but will store the attribute Priority in it's own rack.

For storage in the ZODB this will imply that the extra attributes will be
stored persisently in the slots of the Requester. For non-ZODB storage like
a SQL RDB one will have to add a table to the RDB.

Roché


___
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: Discussion Story Building Mediums

2000-11-11 Thread Michael Bernstein

Chris Withers wrote:
 
 Michael Bernstein wrote:
 
  After some more thought, I realized that this really needs
  to be a three-way gateway betrween a mailing list, a 'blog,
  and a newsgroup.
 
 I'm all up for doing the mailing list/weblog type bits but I have no
 idea how news _works_ and how it could be integrated into the Zope
 environment...

Not really, but two-way gateways between mailing lists and
News servers are pretty well understood, so it should be
possible to let the mailing list sit between the two, and
act as a compatibility layer.

What do you think?

Michael.

___
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] PythonMethods: Can't Slice context.REQUEST.PARENTS

2000-11-11 Thread The Doctor What

Okay, I figured that bit of braindeadness out (I just use a range
that goes backwards, no .reverse() so everything is left as is.

Now here is my next problem.

Using context.REQUEST.PARENTS doesn't give me the DTML Document that
called me (so to speak).

I have:
/test/new/foo_html

My PARENTS shows Zope, Test, and New, but doesn't show foo_html.

Is this because my PythonMethod is Internal vs. External?  I didn't
see any descriptions of what the differences are.

The DTML Method version of my code can see the id/title of the
foo_html via 'id', 'title' and 'title_or_id', but under python I
just get:
self.title_or_id() -- Zope, the folder that my method lives at
m_self.title_or_id() -- Breadcrumbs (my method)
context.title_or_id() -- New, the folder foo_html lives at

And I have no idea what _ is for

Any help is appreciated.

Ciao!

-- 
"Well Pumpkins, It looks like it comes down to that age old decision: Style or 
Substance.  Hmm."
--Vida and the "Girls" ( To Wong Foo, Thanks for everything, Julie 
Newmar )

The Doctor What: "What, Doctor What" http://docwhat.gerf.org/
[EMAIL PROTECTED]   KF6VNC

___
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] XMLDcoument setAttribute error

2000-11-11 Thread Matt

I have an external method like the following

def make_an_element(self,REQUEST):
new_elem = self.createElement(REQUEST.new_elem_name)
new_elem.setAttribute('hello','there')
self.appendChild(new_elem)

I call this on an XMLdocument root node and get the following error at
the setAttribute stage :

   Error Type: AttributeError
   Error Value: aq_base



   Troubleshooting Suggestions

The URL may be incorrect.
The parameters passed to this resource may be
incorrect.
A resource that this resource relies on may be
encountering an error.

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

   If the error persists please contact the site
maintainer. Thank you for your patience.




Traceback (innermost last):
  File /usr/local/zope/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 222, in publish_module
  File /usr/local/zope/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 187, in publish
  File /usr/local/zope/Zope-2.2.2-src/lib/python/Zope/__init__.py, line
221, in zpublisher_exception_hook
(Object: Manageable)
  File /usr/local/zope/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 171, in publish
  File /usr/local/zope/Zope-2.2.2-src/lib/python/ZPublisher/mapply.py,
line 160, in mapply
(Object: acceptLiveFileInfo2)
  File /usr/local/zope/Zope-2.2.2-src/lib/python/ZPublisher/Publish.py,
line 112, in call_object
(Object: acceptLiveFileInfo2)
  File
/usr/local/zope/Zope-2.2.2-src/lib/python/Products/ExternalMethod/ExternalMethod.py,
line 263, in __call__
(Object: acceptLiveFileInfo2)
(Info: ((Document instance at 8624868, h3form/h3tabletr
valign="top" align="left"thfdate/thtd001108/td/trtr
valign="top"  ...
align="left"thfname/thtdp001108_/td/trtr
  File /usr/local/zope/Zope-2.2.2-src/Extensions/vs_live_file.py, line
32, in acceptLiveFileInfo2
(Object: Manageable)
  File
/usr/local/zope/Zope-2.2.2-src/lib/python/Products/XMLDocument/Node.py,
line 753, in setAttribute
(Object: Manageable)
  File /usr/local/zope/Zope-2.2.2-src/lib/python/OFS/PropertyManager.py,
line 243, in _setProperty
(Object: Manageable)
  File /usr/local/zope/Zope-2.2.2-src/lib/python/OFS/PropertyManager.py,
line 198, in valid_property_id
(Object: Manageable)
AttributeError: (see above)

any ideas ?

regards
Matt Bion


___
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] calendar help (newbie)

2000-11-11 Thread Dieter Maurer

James Sintz writes:
  Yes and I have read it (several times). What I am stuck on now is only
  showing newsletters prior to or equal to today's date.
When I remember right, the "calender" tag defines a variable
that contains the date the current cell belongs to.
The function "ZopeTime" gives you the current date.
You can compare the two.


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] images in directories

2000-11-11 Thread Danny William Adair

I have a similar situation where I find myself way down in the tree
structure and have to go up to a certain point and down again. Leaving "bad
structuring" aside (actually its well structured in many other respects),
all I could think of to get a hold of these objects was a whole bunch of
nested "with" statements. They suck.

Now what's with your PathHandler product? How would an appropriate method
look like? I was thinking of a "walk2object" method rather than
"showImage"... see I don't want to start at "/", I want to start whereever I
like at that moment and still take the "/"-separated path info to "walk" to
my object.

I think this has more to do with elegance than with lazyness. (tho these two
know each other very well ;-) )

tia,
Danny


Dieter Maurer wrote:

 Then Chris Withers wrote: use

 dtml-with imagesdtml-var image.gif/dtml-with

 I did not believe him and tried it out...
 ... it works in Zope 2.2.2.

...worked for me all the way back to 2.1.4 ;-)

Anyway, if you're _really_ lazy, write an external method something
alogn the lines of:

def showImage(self,path):
return self.restrictedTraverse(path)(self,self.REQUEST)


...then, in your dtml, you can do:

dtml-var "showImage('/images/image.gif')"

This is all totally untested of course ;-)

I've often wondered why this isn't built into DTML so that you could do:

dtml-var /folder/myobject

obviously, you wouldn't be able to do this with stuf inside " " ;-)

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] bad expression evaluation

2000-11-11 Thread Dieter Maurer

seb bacon writes:
  I'm trying to compare two page titles, using this code:
  
  dtml-call "REQUEST.set('my_title',get_page_title)"
  dtml-in "PARENTS[1].objectValues(['Folder'])"
dtml-my_title; : dtml-get_page_title
dtml-if "my_title!=get_page_title"
dtml-var title_or_id
/dtml-if
  /dtml-in
  
  Now I can see on the page that my_title and get_page_title are the same.  I have 
 also tried comparing _.str(my_title) and _.str(get_page_title) just to make sure I 
 was comparing strings.  But the if clause always evaluates true.  Any ideas?
Maybe, "get_page_title" is callable. In this case, e.g.,
"dtml-get_page_title;" is very different from "get_page_title".

Try to replace "get_page_title" by "_['get_page_title']" at
both places in your code.

___
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 Zope use a Different Python?

2000-11-11 Thread Petr van Blokland

We made a link in zope/lib to the real python,
replacing the python folder there. That works.

Gary Perez wrote:

 Hi.

 We've got Zope 2.2.2 installed on a Linux box. We want to be able to use
 the full-up python that's on the box instead of the python interpreter
 that comes with Zope for playing with External Methods.

 Is there any way to circumvent Zope's python in this way?

 If not, what's the easiest way to extend Zope to be able to use our
 non-Zope python?

 Alternatively, we're plagued by import and attribute errors when
 accessing the External Methods. Will simply moving (or linking?) all the
 pieces (whatever.py, __init__.py, etc.) into a subdirectory of "Shared"
 fix the problem?

 Thanks in advance for your help.
 -GMP

 ___
 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] why DTML confusing

2000-11-11 Thread Rik Hoekstra


- Original Message -
From: Simon Michael [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, November 11, 2000 12:59 AM
Subject: Re: [Zope] why DTML confusing


 Charlie Wilkinson [EMAIL PROTECTED] writes:
  ...or "the python world with some Zope limitations placed on it."
 ...
  There's a third world of course, HTML.  Most of us probably have that

 True, true. Actually this sounds like a good structure for a overview
 doc:

 "Welcome to Zope.. in which we shall encounter

 1. the plain of Text
 2. the fields of HTML
 3. the DTML domain
 4. the ZClass lands
 5. the Scripting realms; in which dwell Expressions, Methods and
 Python/Perl/XSLT"
 6. the unbound Scripting realms; here be External Methods
 7. the halls of the Serpent; where dwell it's Products

 Descend now into.. DC's Seven Circles Of Hell."
 (affectionately misnamed :-)

Hm, nice overview. What would be missing is a general Web/HTTP section.
That's another part we always take for granted, but it is not. At least,
that's my experience from two recent introductions of Zope. So, to continue
in your vein: before we land in Zope land we should go through

1. The World of the Web and why it needs a Server of Applications
2. Where we draw up Requests and Encode them
3. Learn about the Protocols that are Spoken
4. Understand the mysteries of Common Gateways
5. Pass the Secret Ways of Authorisation and Authentication

Rik


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




Re: [Zope] Can Zope use a Different Python?

2000-11-11 Thread Ender


Hi

i'm not sure exactly whats being asked here. zope on linux doesn't
include its own python interpreter. you can choose which one executes
zope and its external methods by specifing the interpreter binary in the
start.py. its quite possible that your installing third party modules
into the distros python in /usr/bin/python, in which case if zope's
using /usr/local/bin/python you won't see them and you'll get import
errors. if this is the case copying the third party modules into
/usr/lib/python1.5/site-packages will solve the import errors, or moving
the modules into the zope_dir/lib/python/ (or perhaps a subdirectory
with an init) might do the trick. if you specifically want to run
something through a custom python interp from zope you might need to use
os.popen2 (or variant) in an external method, or setup sometype of
interprocess communication via xml-rpc or an rdbms or shared file, etc.

hope that helps

kapil


Gary Perez wrote:
 
 Hi.
 
 We've got Zope 2.2.2 installed on a Linux box. We want to be able to use
 the full-up python that's on the box instead of the python interpreter
 that comes with Zope for playing with External Methods.
 
 Is there any way to circumvent Zope's python in this way?
 
 If not, what's the easiest way to extend Zope to be able to use our
 non-Zope python?
 
 Alternatively, we're plagued by import and attribute errors when
 accessing the External Methods. Will simply moving (or linking?) all the
 pieces (whatever.py, __init__.py, etc.) into a subdirectory of "Shared"
 fix the problem?
 
 Thanks in advance for your help.
 -GMP
 
 ___
 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] Zope declining?

2000-11-11 Thread Hung Jung Lu

Hi,

From the mailing list volume in the last 3 months, it is not hard to see 
that there is a steady decline. This compared to the trend of last two years 
(doubling volume every year), should probably raise a red flag.

I know what many would say: there are now more experts than newbies as 
compared to before. There are not as many problems as before, etc. But that 
is that really all? I don't think so.

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 )




Re: [Zope] Bulk Mailing How-To!

2000-11-11 Thread Ender

Wow, this is really cool. nice job.

btw. if anyone's interested i wrote a patch to change the mailhost
behavior to use a persistent connection to the mta. email me if
interested (yes, i submitted a feature/wpatch to the collector).

also its good to note that the mailhost doesn't currently participate in
transactions.

regarding injecting to the mta, this is def. the best way to send bulk
mail, but you might want to do an fsync to make sure it gets written to
disk vs. lingering in a kernel cache. 

kapil


"Stefan H. Holek" wrote:
 
 For those who care: I have created a bulk mailing How-To at
 
 http://www.zope.org/Members/shh/BulkMailHack/
 
 Cheers,
 Stefan
 
 --
 Things work better when plugged in
 
 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )

___
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] Please Tell Me...

2000-11-11 Thread Ben Ocean

Hi;
I'm new. I can see Zope will help me on larger projects, but what if I want 
to allow the owner of a small Web site (under 200 pages) that I develop the 
ability to edit text and photos? Is this the right application, or is Zope 
overkill? If so, any recommendations on a content manager?
TIA,
BenO


___
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 declining?

2000-11-11 Thread Andrew Kenneth Milton

+---[ Hung Jung Lu ]--
| Hi,

[Snip]

| I know what many would say: there are now more experts than newbies as 
| compared to before. There are not as many problems as before, etc. But that 
| is that really all? I don't think so.

I think they're all coming to the IRC channel for help, its more immediate,
traffic in there has picked up quite a bit.

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

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




Re: [Zope] Re: DateTime

2000-11-11 Thread Ender

Jerome Alet wrote:
 
 On Fri, 10 Nov 2000, Chris Withers wrote:
 
  mxDateTime is _not_ the DateTime in Zope. If only it was
 
 It's voting season, so I vote +10 for this one.
 
 bye,

I'll second that 

+10

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] LDAP variable problem 'title'

2000-11-11 Thread Michael Blewett

Hi Zopistas,

Firstly, a big thank you to all thos epeople who helped me with KeyError 
problem when accessing LDAP entries.
Just so the solution makes it onto the mailing list archive (for the next 
bunny who has the same problem) the solution was to add the following to 
each of your variables

missing=nbsp;

...so that when Zope came across entries without that attribute it didn't barf.

I now have one last problem. I can now access all entries from the LDAP 
directory using the notation dtml-var sn missing = nbsp;- all except one 
- the "title" attibute .

I am guessing that it is because Zope uses "title" to reference the title 
of the object in the zope database, and therefore won't let you get at the 
ldap variable using the normal:
dtml-var title notation.

Is there any way I can pinpoint the LDAP variable instead of the object 
title in zope? I have no control over the ldap server and attributes name, 
so I can't change it at that end.

When I test the LDAP filter method I can see the variable (it lists all of 
the attributes of the LDAP record), but I can't reference it in DTML.
My filter method is called 'Academics' and just extracts a list of 
academics in the biology department here at Monash University. I'm sure 
there must be a way using python notation, but not being a python expert 
(yet!), I could do with a few clues...


Any ideas?

Thanks again...

  - Michael
~~~
Michael Blewett
Computer Support Mgr - Biological Sciences
Monash University (Clayton Campus)
Victoria Australia 3168

"I'm out of my mind at the moment, but feel free to leave a message..."




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