[Zope] kupu and zope2 again

2006-05-18 Thread Thomas Adams



 Original-Nachricht 
From:   - Sun May 14 18:05:10 2006
X-Account-Key:  account2
X-UIDL: 0MKt1w-1FfJ541nXg-0002PK
X-Mozilla-Status:   0001
X-Mozilla-Status2:  1000
Return-Path:<[EMAIL PROTECTED]>
Delivery-Date:  Sun, 14 May 2006 18:04:30 +0200
Received-SPF: 	none (mxeu8: 63.240.213.173 is neither permitted nor 
denied by domain of zope.org) client-ip=63.240.213.173; 
[EMAIL PROTECTED]; helo=mail.zope.org;
Received: 	from [63.240.213.173] (helo=mail.zope.org) by 
mx.kundenserver.de (node=mxeu8) with ESMTP (Nemesis), id 
0MKt1w-1FfJ5401yU-0002PK ; Sun, 14 May 2006 18:04:30 +0200
Received: 	from cvs.zope.org (localhost.localdomain [127.0.0.1]) by 
mail.zope.org (Postfix) with ESMTP id 51F6E2032B4; Sun, 14 May 2006 
12:04:17 -0400 (EDT)

X-Original-To:  zope@zope.org
Delivered-To:   zope@zope.org
Received: 	from moutvdomng.kundenserver.de (moutvdom.kundenserver.de 
[212.227.126.249]) by mail.zope.org (Postfix) with ESMTP id 900CB20316E 
for ; Sun, 14 May 2006 12:04:15 -0400 (EDT)
Received: 	from [212.227.126.221] (helo=mrvdomng.kundenserver.de) by 
moutvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 1FfJ4o-K3-00 
for zope@zope.org; Sun, 14 May 2006 18:04:14 +0200
Received: 	from [85.181.125.181] (helo=[85.181.125.181]) by 
mrvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 1FfJ4o-0006X4-00 
for zope@zope.org; Sun, 14 May 2006 18:04:14 +0200

Message-ID: <[EMAIL PROTECTED]>
Date:   Sun, 14 May 2006 18:04:24 +0200
From:   Thomas Adams <[EMAIL PROTECTED]>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language:  de-DE, de, en-us, en
To: zope@zope.org 
Subject:[Zope] Kupu and Zope2
X-BeenThere:zope@zope.org
X-Mailman-Version:  2.1.5
Precedence: list
List-Id:Users of the Z Object Publishing Environment 
List-Unsubscribe: 	<http://mail.zope.org/mailman/listinfo/zope>, 
<mailto:[EMAIL PROTECTED]>

List-Archive:   <http://mail.zope.org/pipermail/zope>
List-Post:  <mailto:zope@zope.org>
List-Help:  <mailto:[EMAIL PROTECTED]>
List-Subscribe: 	<http://mail.zope.org/mailman/listinfo/zope>, 
<mailto:[EMAIL PROTECTED]>

Sender: [EMAIL PROTECTED]
Errors-To:  [EMAIL PROTECTED]
Envelope-To:[EMAIL PROTECTED]
X-Antivirus:AVG for E-mail 7.1.392 [268.5.6/338]
Mime-Version:   1.0
Content-Type: 	multipart/mixed; 
boundary=050600020906050807090302




Hello,

I want to use kupu 1.3,.5 with Zope 2.7.3 (Python 2.3.4), but I'm stuck
in the given example. It seems not work:

Following the steps in the example.pt and then
calling http://localhost:8080/testsite/test_html/edit_kupu
(test_html is of type ZPT and pure html)
shows only the html, nothing else.

I then tried to fill the slot in the fulleditor macro


   scrolling="auto" src="fulldoc" tal:attributes="src document_url">

   


but that doesn't work as well.

Does anybody has a working example
how to use kupu.

Thanks in advance

Regards
Thomas Adams




Sorry,

perhaps I'm flase here
Does anybody knows something?

Help would be appreciated.




Thanks in advance
Thomas








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

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.6/338 - Release Date: 12.05.2006

begin:vcard
fn:Thomas Adams
n:Adams;Thomas
adr;quoted-printable:;;Richard-Strauss-Str. 27;M=C3=BCnchen;Bayern;81677;Deutschland
email;internet:[EMAIL PROTECTED]
tel;work:089 55 186 500
tel;home:089 470 270 19
tel;cell:0178 544 83 05
note;quoted-printable:Handy Interone:=0D=0A=
	=0D=0A=
	0163 432 9608
version:2.1
end:vcard

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


[Zope] Kupu and Zope2

2006-05-14 Thread Thomas Adams

Hello,

I want to use kupu 1.3,.5 with Zope 2.7.3 (Python 2.3.4), but I'm stuck
in the given example. It seems not work:

Following the steps in the example.pt and then
calling http://localhost:8080/testsite/test_html/edit_kupu
(test_html is of type ZPT and pure html)
shows only the html, nothing else.

I then tried to fill the slot in the fulleditor macro


   scrolling="auto" src="fulldoc" tal:attributes="src document_url">

   


but that doesn't work as well.

Does anybody has a working example
how to use kupu.

Thanks in advance

Regards
Thomas Adams


begin:vcard
fn:Thomas Adams
n:Adams;Thomas
adr;quoted-printable:;;Richard-Strauss-Str. 27;M=C3=BCnchen;Bayern;81677;Deutschland
email;internet:[EMAIL PROTECTED]
tel;work:089 55 186 500
tel;home:089 470 270 19
tel;cell:0178 544 83 05
note;quoted-printable:Handy Interone:=0D=0A=
	=0D=0A=
	0163 432 9608
version:2.1
end:vcard

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


[Zope] Rndering Products

2006-04-23 Thread Thomas Adams

Hello,

on an own product  I've coded this:


index_html = Globals.DTMLFile('dtml/viewLinkListItem', globals())

__str__ = index_html 



If I start now Zope again a message

PROBLEM(100) Init Ambiguous name for method of 
Products.KBProducts.kbarticle_impl.LinkListItem: "__str__" != "index_html"


appears.

Anything behave as it should, so the string representation of this 
product works

if i For instance call it up within a dtml-loop:


   


In this loop the LinkListItem Product is rendered as defined in index_html

Does anxboy has any ideas about the Zope message ??

Thanks in advance

Thomas Adams





begin:vcard
fn:Thomas Adams
n:Adams;Thomas
adr;quoted-printable:;;Richard-Strauss-Str. 27;M=C3=BCnchen;Bayern;81677;Deutschland
email;internet:[EMAIL PROTECTED]
tel;work:089 55 186 500
tel;home:089 470 270 19
tel;cell:0178 544 83 05
note;quoted-printable:Handy Interone:=0D=0A=
	=0D=0A=
	0163 432 9608
version:2.1
end:vcard

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


[Zope] Rendering Product by index_html

2006-04-22 Thread Thomas Adams

Hello,

on an own product (derived from ObjectManager) I try to code a render 
method, therefore I've coded this first


def index_html(self):
   return Globals.DTMLFile('dtml/viewKBArticle',globals())

the result of calling an URLl like this .../MyArticle/index_html
was that the above mentioned DTML-File was completely rendered
as html quoted text like this :

lt;?xml version="1.0" encoding="iso-8859-1"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">; 
<html xmlns="http://www.w3.org/1999/xhtml">;

... etc.

Then I made a search in the mailing list and try this:

myIndex = Globals.DTMLFile('dtml/viewKBArticle',globals())

def index_html(self):
   return self.myIndex(self, self.REQUEST)

this results in :
*Error Type: TypeError*
*Error Value: unsubscriptable object
*

Traceback (innermost last):
 Module ZPublisher.Publish, line 101, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 39, in call_object
 Module Products.KBProducts.kbarticle_impl, line 440, in index_html
 Module Shared.DC.Scripts.Bindings, line 306, in __call__
 Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
 Module App.special_dtml, line 175, in _exec
 Module DocumentTemplate.DT_In, line 685, in renderwob
 Module OFS.ObjectManager, line 656, in __getitem__
 Module OFS.ObjectManager, line 241, in _getOb
TypeError: unsubscriptable object


At last I try this:

index_html = None
__call__ = Globals.DTMLFile('dtml/viewKBArticle',globals())

This results also in a TypeError (traceback see above)

Has anyboby any ideas??

Current Zope is 2.7.3, Python 2.3.4 on Windows XP SP2

Thanks in advance

Thomas Adams










begin:vcard
fn:Thomas Adams
n:Adams;Thomas
adr;quoted-printable:;;Richard-Strauss-Str. 27;M=C3=BCnchen;Bayern;81677;Deutschland
email;internet:[EMAIL PROTECTED]
tel;work:089 55 186 500
tel;home:089 470 270 19
tel;cell:0178 544 83 05
note;quoted-printable:Handy Interone:=0D=0A=
	=0D=0A=
	0163 432 9608
version:2.1
end:vcard

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


Re: [Zope] MVC Approach

2005-08-03 Thread Thomas Adams

Asad Habib schrieb:


Hi Thomas. If you plan to implement MVC, my advice would be to stick to
Java technology - it's by far the best for implementing MVC - I mean
literally the best! You may want to look at JSF or the Spring frameworkas
alternatives to Struts.

- Asad


On Wed, 3 Aug 2005, Thomas Adams wrote:

 


Hi all,

I'm a newbie to Zope, using version 2.7.3 (okay it is not the newest one)
and I want to know if there is something
like a MVC approach available for Zope, i.e. Model-View-Controller
approach, as it is for instance in Java with  the Struts framework from
Apache.

To be more specific:

- The Model consists of several python classes implementing business logic
(the pendant to Enterprise Java Beans or simple Java Beans)

- The Views producing  the visual appearance of the business objects
 (in java or more specific in Struts these are the custom tag libraries)

- The Controller, as a kind of glue between the two above, is
controlling the work/process-flow
 (in java with servlets and in struts with actions classes (as a minimum) )

To transfer this appraoch to Zope, I'm not sure:

Views:
DTML-Document and/or DTML-Methods?

Controller:
PythonScripts?

Models:
I'm absolutely not sure, Pluggable brains? (the Zope book has a example
but only as a handling of resultsets)

So if has anybody a hint if there are some resources
in the web, please post it.

P.S: I don't know Zope 3 (Is that apossible answer of my questions?)

Thasnks in advance
Regards
Thomas Adams








   




 


Hi Asad ,

I was afraid of that ;-(. But let me spin around yet:

- Views:
   --- Editing/Creating business objects:
   ZPT's/DTML's with appropriate properties managing view 
concerns, genaralized  for a  category
  of possible (already standardised) business/zope objects 
(gaining from aquisition rules)

   --- Displaying Results: Pluggable Brains as subclass of above ones

- Model : 
   Perhaps Zope Products ???, handling business logic , I'm not sure if 
that would work, perhaps a so

   called workaround with.interfacing and so on.

- Controllers:
  really PhytonSricpts, I think so, or alternatively dtml-methods


So, why I'm asking:

I want to implement a standardized web application (at this time it's 
only a stupid
choose and buy like any other so called e-commerce/shopping cart system 
, but my
intention is to make it almost configurable in all three aspects (i know 
... but William S. wrote

#
#And enterprises of great pith and moment
#With this regard their currents turn awry,
#And lose the name of action. - Soft you now!
#The fair Ophelia! Nymph, in thy orisons
#Be all my sins remember'd.
  ;-))

Is that totally wrong?
or is that a so called acceptable (but not ideal) approach?

Thanks in Advance
Thomas  Adams



begin:vcard
fn:Thomas Adams
n:Adams;Thomas
adr;quoted-printable:;;Schwanthalerstr. 184;M=C3=BCnchen;Bayern;80339;Deutschland
email;internet:[EMAIL PROTECTED]
tel;work:089 55 186 500
tel;home:089 54 03 28 96
version:2.1
end:vcard

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


[Zope] MVC Approach

2005-08-03 Thread Thomas Adams

Hi all,

I'm a newbie to Zope, using version 2.7.3 (okay it is not the newest one)
and I want to know if there is something
like a MVC approach available for Zope, i.e. Model-View-Controller
approach, as it is for instance in Java with  the Struts framework from 
Apache.


To be more specific:

- The Model consists of several python classes implementing business logic
(the pendant to Enterprise Java Beans or simple Java Beans)

- The Views producing  the visual appearance of the business objects
 (in java or more specific in Struts these are the custom tag libraries)

- The Controller, as a kind of glue between the two above, is 
controlling the work/process-flow

 (in java with servlets and in struts with actions classes (as a minimum) )

To transfer this appraoch to Zope, I'm not sure:

Views:
DTML-Document and/or DTML-Methods?

Controller:
PythonScripts?

Models:
I'm absolutely not sure, Pluggable brains? (the Zope book has a example 
but only as a handling of resultsets)


So if has anybody a hint if there are some resources
in the web, please post it.

P.S: I don't know Zope 3 (Is that apossible answer of my questions?)

Thasnks in advance
Regards
Thomas Adams







begin:vcard
fn:Thomas Adams
n:Adams;Thomas
adr;quoted-printable:;;Schwanthalerstr. 184;M=C3=BCnchen;Bayern;80339;Deutschland
email;internet:[EMAIL PROTECTED]
tel;work:089 55 186 500
tel;home:089 54 03 28 96
version:2.1
end:vcard

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


Re: [Zope] Creating Photo object from an Image object

2005-07-17 Thread Thomas Adams

Peter Bengtsson schrieb:


#id1,title1  image id and  tile
def doAddPhoto(id1, title1):
   # some comments
   

   img = context.getObjectById(id1) # this returns the object part of
object item array from context.objectItems
   s="ph" +str(id1)
   context.manage_addPhoto(id=s, file=img.data,title=title1,
displays=None, precondition='', content_type='image/jpeg') (line 12)
   



It should be:
product_context = context.manage_addProduct['Photo']
product_context.manage_addPhoto(id=s, ..)

Not so obvious to know :(
You can get hints like this by viewing the source of any ZMI page that
has the Add object drop down.


 


Thanks, that works,

but in addition there is an photo.manage_upload(file=img.data) necessary 
too see the images.


Regards
Thomas Adams



begin:vcard
fn:Thomas Adams
n:Adams;Thomas
adr;quoted-printable:;;Schwanthalerstr. 184;M=C3=BCnchen;Bayern;80339;Deutschland
email;internet:[EMAIL PROTECTED]
tel;work:089 55 186 500
tel;home:089 54 03 28 96
version:2.1
end:vcard

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


[Zope] Creating Photo object from an Image object

2005-07-16 Thread Thomas Adams

Hi,

I have a problem with the "Photo" product. I want to create a Photo 
object from an existing Image object.
I have a form with id and title input tags which are initialized with 
appropriate values from a special folder where

the Image objects resides
.
Now I have written a PythonSript to handle the creation of a new Photo 
object

#id1,title1  image id and  tile
def doAddPhoto(id1, title1):
   # some comments
   
  
   img = context.getObjectById(id1) # this returns the object part of 
object item array from context.objectItems
   s="ph" +str(id1)   
   context.manage_addPhoto(id=s, file=img.data,title=title1, 
displays=None, precondition='', content_type='image/jpeg') (line 12)



If I submit the form, an error occurs:

Traceback (innermost last):
 Module ZPublisher.Publish, line 101, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 39, in call_object
 Module Shared.DC.Scripts.Bindings, line 306, in __call__
 Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
 Module Products.PythonScripts.PythonScript, line 323, in _exec
 Module None, line 12, in doAddPhoto
  - 
  - Line 12
AttributeError: manage_addPhoto


When I try it with context.manage_addImage everything works fine.

I can't figure out why the above Exception is thrown, the source code
of Photo's manage_addPhoto function looks as similar as the
manage_addImage function of the Image class (from which Photo is derived)
and i have no clue where the pitfall is.

Does anybody have an idea or a hint?

Help would be appreciate.

Thanks in advance

Thomas Adams




begin:vcard
fn:Thomas Adams
n:Adams;Thomas
adr;quoted-printable:;;Schwanthalerstr. 184;M=C3=BCnchen;Bayern;80339;Deutschland
email;internet:[EMAIL PROTECTED]
tel;work:089 55 186 500
tel;home:089 54 03 28 96
version:2.1
end:vcard

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


Re: [Zope] Newbie-question

2005-06-23 Thread Thomas Adams

Paul Winkler schrieb:


On Thu, Jun 23, 2005 at 08:55:05PM +0200, Thomas Adams wrote:
 


hi all,

I have specific folder name "art" in Zope in which i installed a user 
folder, and a user

with "manager role". now i want anaonymous user to access i.e view
the website ubeneath the folder "art". Therefore i granted "View 
Permission" to the "Anonymous Role"
at the folder level "art", but that doesn't work. Then i came to the 
conclusion to grant that

Permission at root level. But that doesn't work too. So my question is:
What i have to do if:

1. i want only a manager user acces to the ZMI beneath the folder "art"
   



It should be enough to give only to Manager the permission
"View management screens" on that folder.

 

2. grant anonymous user acces to view the "generated pages" beneath this 
folder
   



"View" and "Access Contents Information" usually do the trick.
If not, google for VerboseSecurity - a great add-on product
that will help debug security issues.

 



Unfortunately VerboseSecurity seems not to work on Zope 2.7.5-final.
I think there are some security issues by my ZCLasses used within the
above mentioned folder. Is there any hack to agin more information
for security issues or for installing VerboseSecurity on this new Zope 
version.


Thanks in advance
Thomas Adams



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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Newbie-question

2005-06-23 Thread Thomas Adams

hi all,

I have specific folder name "art" in Zope in which i installed a user 
folder, and a user

with "manager role". now i want anaonymous user to access i.e view
the website ubeneath the folder "art". Therefore i granted "View 
Permission" to the "Anonymous Role"
at the folder level "art", but that doesn't work. Then i came to the 
conclusion to grant that

Permission at root level. But that doesn't work too. So my question is:
What i have to do if:

1. i want only a manager user acces to the ZMI beneath the folder "art"
2. grant anonymous user acces to view the "generated pages" beneath this 
folder


Thanks  in advance
Thomas Adams



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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Multipart/alternative Emails

2005-04-20 Thread Thomas Adams
Hello,
I'm trying to perform a multipart/alternative email message
with combination of sendmail-, mime- and boundary-tag.
Here is the code:

To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Subject: password


plain text...


.. here the HTML-Code 



But the resulting email is still of type multipart/mixed, what is wrong 
here?
(I'm using Zope 2.7.3 with Python 2.3.4 on Win XP SP2)

Thanks in advance
Regards Thomas

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