[Zope] How about create another method other than index_html to get content in OFS::File?

2000-11-07 Thread iap_y2fun.com

Dear all,
My problem is that : I have a ZClass based on OFS::File.
I need to override the default index_html for my own purpose.
After I created my own index_html, I found myself can't access the content
of that object.
Since:
1. I have no way to access the original method index_html of the base class
2. In OFS::File, There is no other method than index_html to access the
content of this object.
That's why I modify Image.py and add one line:
getContent=index_html
It's work for me.
I don't think it's a good idea, since it's quick and dirty.
Is there any better way to do this?

Thanks

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 )




[Zope] asked a million times again...

2000-11-07 Thread Chris Trowbridge



Okay, I got the  to work 
right assuming that that files are arranged properly according to aquistion, but 
then when I try to get the file from another folder like
 
         
 
It displays the code of that page rather thatn 
recognizing that it is content. What should I do?
 
 
Thanks;
Chris


Re: [Zope] re: uploading to Zope with Mac Browser

2000-11-07 Thread Richard Lanham

Jeffrey,
Thank you soo much. And, yesyes, I was wrong about Mac netscape, that seems
to upload fine, I was just not used to how stubbornly mac netscape will
cache a page. It's an old mahine too and does wierd things, not a good lab
box.

oh, sorry to all for accidentally sending that zip file to the list instead
of to myself from work.


___
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] Dump .zexp export to readable source?

2000-11-07 Thread Alex Khan

As a newbie it sure would be nice to dump out all the code from a zexp to
study the source.
I can probably learn more from reading other people's code than by reading
the fragmented
documentation.I can do this easily with products but not zexp's. Thanks
in advance...
 
Alex Khan 
[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] OO and ZClasses ?

2000-11-07 Thread Douglas Daniel Del Frari

My main doubt using the Zope, is as to implement the OO concepts using
the Zclasses. In the Z Classes, the attributes will be created in the "
Property Sheets "? The  operations will be created in the border "
Methods "? The aggregation concept will be used using " Subobjects "?

Question 2 is my main doubt.

I am thankful all


--
-
Douglas Daniel Del Frari
-
Brazil, RS
-
mailto:[EMAIL PROTECTED]
http://labinf.detec.unijui.tche.br/~gaucho
-



___
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] acessing parameters in a "helper class"

2000-11-07 Thread Max M

I have the below class "mxm_guestbook_base" that is subclassed by a zClass.
So far so good.

But when in a "index_html" dtml-method I try to acces the value "author" of
the "aComment" class returned in the "getAllComments" method like so:






I get the following traceback:

---

Traceback (innermost last):
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 187, in publish
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 171, in publish
  File C:\mxmZope\lib\python\ZPublisher\mapply.py, line 160, in mapply
(Object: index_html)
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 112, in call_object
(Object: index_html)
  File C:\mxmZope\lib\python\OFS\DTMLMethod.py, line 172, in __call__
(Object: index_html)
  File C:\mxmZope\lib\python\DocumentTemplate\DT_String.py, line 528, in
__call__
(Object: index_html)
  File C:\mxmZope\lib\python\DocumentTemplate\DT_In.py, line 691, in
renderwob
(Object: comments)
  File C:\mxmZope\lib\python\OFS\DTMLMethod.py, line 194, in validate
(Object: index_html)
  File C:\mxmZope\lib\python\AccessControl\SecurityManager.py, line 139, in
validate
  File C:\mxmZope\lib\python\AccessControl\ZopeSecurityPolicy.py, line 159,
in validate
Unauthorized: author

---

It seems that I have a problem accessing values in the objects inserted in
self.comments list.

If I just self.append('some comment') directly as a string I have no
problems acessing the comments as "sequence-item". It is only when inserting
an object into the list I cannot access it.

Anybody has any ideas?

---

index_html (dtml-method):

---


[Ny kommentar]





[Ny kommentar]


---

class aComment:
' '
def __init__(self, comment, author):
self.comment = comment
self.author  = author

class mxm_guestbook_base:

"""
A base class for guestbook products
"""

def __init__(self):
self.comments = []

def addComment(self, comment='', author='' , RESPONSE=None):
"Adds a comment"
self.comments.append(aComment(comment, author))
self._p_changed = 1 # Trigger persistence
RESPONSE.redirect('index_html')

def deleteAllComments(self, RESPONSE=None):
"Deletes all comments"
self.comments = []
RESPONSE.redirect('index_html')

def deleteComment(self, id, RESPONSE=None):
"Deletes a single comment"
del(self.comments[id])
self._p_changed = 1 # Trigger persistence
RESPONSE.redirect('index_html')

def getAllComments(self):
"returns a list of all comments"
return self.comments
---

Regards

Max M

Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein


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

2000-11-07 Thread Andy McKay

Im trying to finish a Product that does a very simplified version of what
you want, just sucks all txt html stuff from a file. This can be most easily
accomplished using Python reading straight off the file system or xml-rpc or
some other system. If you are comfortable with Python its not too bad

--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "James Sintz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 07, 2000 1:26 PM
Subject: [Zope] importing data


> I have created a simple zclass product for a web based newsletter. Each
> day's newsletter is input into a form and added into the ZODB as instances
> of this newsletter zclass. My question is... how do I import 2 years worth
> of newsletters from tab delimited files exported from another database?
>
> I searched the archives and how-to section and could not find the answer.
Is
> this possible to do?
>
> Thanks!!
>
> Jamey
>
>
>
> ___
> 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: uploading to Zope with Mac Browser

2000-11-07 Thread Jeffrey P Shell

> Zope list: 
> 
> This zope method for uploading images to server:
> 
>  expr="manage_addImage( id=title, file=file, title=title)">
> 
> ...works great from a PC. But from a Mac (netscape And IE) it does not work.
> 

Netscape doesn't work?  That's odd.  IE had some problems before 5.0, some
of which could be fixed in the Internet control panel (in recent Mac OS
versions) or in Internet Config (I'm not sure how deeply Netscape uses
these).

Since the Mac OS has the benefit\curse of the forked file system, almost any
file on the system has extra data about it stuffed in the Resource Fork (ie
- information about which app to designate as 'creator', allowing you to
have JPEGs that open in different applications for example).  Most of the
universe operates on a single forked system, which contains just the data.
So there are sometimes problems sharing Mac files with the rest of the
world.  Usually it works fine as only the Data fork is used, but some
programs tend to botch the handling of this.  IE was one of them.

The settings to try to fix this are usually found in the preferences that
handle File Mappings (or File Helpers) (which lets the OS know how to deal
with incoming data).  It's a preference panel in both browsers, and can be
found on the Advanced tab of the Internet control panel.  Find the mapping
for .gif and other extensions or mime types you're interested in and look at
the settings for handling it.  There should be an option for how to treat
the data, with at least the two options of "Text" and "Binary".  There
should also be an option to specify whether it's Macintosh data.  **Turn
this option off**.  Make sure that the "Map Outgoing" option is checked if
it's available.  If the browser is working properly, it should only send the
data fork at that point.

This is broken in MacIE 4.x for images and text, but works for other file
types (like mp3).  I've had no problems with IE 5 that weren't fixable by
checking on my settings.  For file uploads, Netscape has never been a
problem for me since the file upload option showed up (1.x?).  But again, I
practically never use Navigator anymore.  This was the critical issue
keeping me away from MacIE, and MS finally fixed it in 5.

Jeffrey P Shell, [EMAIL PROTECTED]
http://www.digicool.com/ | http://www.zope.org



___
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] catalog DTML Document

2000-11-07 Thread Dieter Maurer

Wolfgang Strobl writes:
 > I asked about how to perform this function (to spell it out again: 
 > _adding_ a _DTML Document_) programmatically, i.e. via DTML, 
 > of from Python code.
ZCatalog.manage_catalogObjects(self, REQUEST, RESPONSE, URL1, urls=None)
   """ index all Zope objects that 'urls' point to """

You can use "ZopeFind" (--> ZQR) to "find" the objects
and the "absolute_url" method to obtain the URL.


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] XMLRPC accessing Zope DTML/SQL methods

2000-11-07 Thread Dieter Maurer

Mayers, Philip J writes:
 > I have an SQL query method backed by a persistent DB connection. I want to
 > call that method over XMLRPC remotely. How do I do that? Namely, how do I
 > pass named arguments to the SQL method?
I have looked at XMLRPC some time ago, but I forgot most details:

  If XMLRPC supports keyword (i.e. named) parameters,
  then Zope will handle the parameter passing transparently
  for you. You must use the same keyword parameters your
  have defined in the ZSQL method.

  If XMLRPC supports only positional (i.e. unamend) parameters
  then you must use as a wrapper a method type
  that supports positional parameters (Python method/External method).

 > Also, I did some simple External Method examples, and acquisition doesn't
 > seem to work as advertised: This:
 > 
 > def testf(self, REQUEST):
 > return self.index_html()
 > 
 > Gives an error "standard_html_header not found". What's going on?
When you call DTML objects yourself, you must pass the context
explicitely:

   return self.index_html(self,REQUEST)



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-07 Thread Dieter Maurer

Pete Prodoehl writes:
 > I was sort of hoping it would be easier. It would be ideal to have this:
 > 
 >   
 > 
 > boiled down to one simple tag that works when I store images in a subfolder
 > *and* use file extensions.
 > 
 > But from what I've read so far, it can't be done...
I had this opinion till some days ago.

Then Chris Withers wrote: use



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


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] Cloning a ZClass-Instance

2000-11-07 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
 > Hallo,
 > 'news'is a zclass and when I'm using a hardcoded value for x it's working.
 > 
 > that's the cloning-method:
 > --
 > 
 > 
 > 
 > 
 >   
 > 
 > Copied!
 > 
 > Not needed to clone!!
 > 
 > 
 > 
 > --
 > And the traceback:
 > ---
 > The object one  does not support this operation 
Whereever you use a name in DTML, the referenced object
is called, if it is callable.

In your case, you use the name "sequence-item" in the "dtml-let".
Apparently, your "news" instances are callable.
If I am right, then "x" is a string (which of cause does not
support cloning).

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] PythonMethod and accessing objects in the ZODB

2000-11-07 Thread Dieter Maurer

Hannes Grund writes:
 > I'm using the PythonMethod product (latest Version) and Zope2.2.2.
 > The method lives inside a ZClass, which has an common instance 
 > propertysheet. Also the method gets an 'self' as argument.
 >   
 > Question 1:
 > How do i access the attributes stored within this propertysheet 
 > within the method,
 > while self.title and self.id gives the desired results. 
 > self.propertysheet.propertyname (among other experiments) 
 > raises an error.
There are API's for "PropertySheetManager" and "PropertySheets".
Use them for access.

 > Question 2:
 > How do I access objects stored elsewhere in the ZODB,
 > for example
 > self.REQUESTpath_to_object.object 
That looks a bit strange.

You can either access objects from self via acquisition:

(e.g.) self.o.child 

or use the method "restricted_traverse" (--> API documentation).


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] Checking for ID's before creating ZClass

2000-11-07 Thread Dieter Maurer

Ivan Cornell writes:
 > 
 > How do I check for all existing id's in a folder? 
The method "objectIds" of a folder returns the list of ids in
that folder.


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 )




[Zope] importing data

2000-11-07 Thread James Sintz

I have created a simple zclass product for a web based newsletter. Each
day's newsletter is input into a form and added into the ZODB as instances
of this newsletter zclass. My question is... how do I import 2 years worth
of newsletters from tab delimited files exported from another database?

I searched the archives and how-to section and could not find the answer. Is
this possible to do?

Thanks!!

Jamey



___
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] PythonMethod and accessing objects in the ZODB

2000-11-07 Thread Andy McKay

> I'm using the PythonMethod product (latest Version) and Zope2.2.2.
> The method lives inside a ZClass, which has an common instance
> propertysheet. Also the method gets an 'self' as argument.
>
> Question 1:
> How do i access the attributes stored within this propertysheet
> within the method,
> while self.title and self.id gives the desired results.
> self.propertysheet.propertyname (among other experiments)
> raises an error.

self.propertyname should work, if not
self.propertysheets.propertysheetname.propertyname might, I havent tried
this particular thing myself.

> Question 2:
> How do I access objects stored elsewhere in the ZODB,
> for example
> self.REQUESTpath_to_object.object

try:

obj = REQUEST.resolve_url(absolute_url of some object)

> will raise an error..
>
> Thanks in advance.
>
> Hannes.
>
> ___
> 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] [Fwd: [Zope-dev] Vote on the new name for Python Methods!]

2000-11-07 Thread Michel Pelletier


Please vote folks!

-Michel

Shane Hathaway wrote:
> 
> Being Election Day in the United States, now is a good time to vote on
> the new name for Python Methods.
> 
> Python Methods are a relatively new concept for Zope. They give you the
> features of DTML, such as through-the-web editing and security, while
> providing a familiar, refined syntax.
> 
> But before we can fold them into the Zope core, you need to help us
> choose the right name for them. Some have voiced the opinion that the
> name "Python Method" is confusing because it can just as easily refer to
> methods in standard Python modules.
> 
> There are some interesting alternatives, so please cast your vote!
> 
> http://www.zope.org/Members/hathawsh/poll
> 
> ___
> 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 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] Checking for ID's before creating ZClass

2000-11-07 Thread Andy McKay

Perhaps it might be easier just to generate one you know will be unique, eg
date-time or use a counter. Anyway  should give you a
list of ids of the current folder where the object is being created.

--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Ivan Cornell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 07, 2000 10:45 AM
Subject: [Zope] Checking for ID's before creating ZClass


> Hello from rainy England,
>
> In my constructor for a ZClass I want to auto generate an ID consisting
> of a name followed by a incrementing sequence (port0, port1, port2...).
> How do I check for all existing id's in a folder? I tried doing it in a
> PythonMethod (or whatever they are called now!), calling hasattr() but
> failed. Another possibilty would be to loop on a
> tryraise until successful, but that doesn't seem
> very zopish. In the source code for createInObjectManager I can see it
> getting the folder, but can't figure how to acheive that directly,
>
> Ivan
>
>
> ___
> 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: XMLRPC accessing Zope DTML/SQL methods

2000-11-07 Thread Red Pineseed

Since XML-RPC is already built into Zope, you do not need to
work about that. You need however to write a java client to
access your ZOPE method. There is information and a JAVA
client on the xml-rpc site http://www.xmlrpc.com/. You can
find enough info to start with.


Philip







> Message: 3
> From: "Mayers, Philip J" <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: [Zope] XMLRPC accessing Zope DTML/SQL methods
> Date: Tue, 7 Nov 2000 19:49:54 -
> charset="iso-8859-1"
> 
> I'm planning on using Zope as some middleware to an SQL database backend.
> Zope will implement the per-row ACL checking and such for the database
> application, and there are two clients - a simple web-based Zope frontend,
> and a larger standalone Java application. I'd like the Java app to
> communicate with Zope using XMLRPC, so that I can re-use the middleware
> portion, and take advantage of SSL'd HTTP, along with all the other bonuses
> such as not trusting the client :o)
> 
> But: I'm having problems that indicate I don't understand how External
> Methods or the XMLRPC call support works.
> 
> I have an SQL query method backed by a persistent DB connection. I want to
> call that method over XMLRPC remotely. How do I do that? Namely, how do I
> pass named arguments to the SQL method?
> 
> Also, I did some simple External Method examples, and acquisition doesn't
> seem to work as advertised: This:
> 
> def testf(self, REQUEST):
> return self.index_html()
> 
> Gives an error "standard_html_header not found". What's going on?
> 
> Regards,
> Phil
> 
> +--+
> | Phil Mayers, Network Support |
> | Centre for Computing Services|
> | Imperial College |
> +--+

___
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] XMLRPC accessing Zope DTML/SQL methods

2000-11-07 Thread Mayers, Philip J

I'm planning on using Zope as some middleware to an SQL database backend.
Zope will implement the per-row ACL checking and such for the database
application, and there are two clients - a simple web-based Zope frontend,
and a larger standalone Java application. I'd like the Java app to
communicate with Zope using XMLRPC, so that I can re-use the middleware
portion, and take advantage of SSL'd HTTP, along with all the other bonuses
such as not trusting the client :o)

But: I'm having problems that indicate I don't understand how External
Methods or the XMLRPC call support works.

I have an SQL query method backed by a persistent DB connection. I want to
call that method over XMLRPC remotely. How do I do that? Namely, how do I
pass named arguments to the SQL method?

Also, I did some simple External Method examples, and acquisition doesn't
seem to work as advertised: This:

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

Gives an error "standard_html_header not found". What's going on?

Regards,
Phil

+--+
| Phil Mayers, Network Support |
| Centre for Computing Services|
| Imperial College |
+--+  

___
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] SiteAccess2: How do I suppress all when managing?

2000-11-07 Thread Danny William Adair

How can I suppress the URL generation in the management screens? I've seen
the "Z" folder example but it didn't work for me. Everything is fine except
the management interface.

tia,

CU+Prost,


 .oO( "Du könntest mal einen bauen" )
Danny


___
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] Persistence triggering

2000-11-07 Thread Max M

From: Chris McDonough [mailto:[EMAIL PROTECTED]]

>You can also do:

>self.list.append(item)
>self._p_changed = 1

>This explicitly tells the ZODB to include the object represented by self in
>the current transaction.

Yes but I have avoided using it as I wanted to make a class that is "Pure"
Python so I can edit and debug it without zope, and then write a "small"
wrapper class to make it a product.

Somehow I had gotten it into my head that I could not do that with,
self._p_changed = 1 because it isn't defined in my class but inherited.
Funny how you can get your head the wrong way around things. Naturally it
will have no effect on my own class if I set that value. So I guess I will
use that.

Thanks for the help.

Regards Max M



___
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] Persistence triggering

2000-11-07 Thread Chris McDonough

> But can I also do?
>
> self.list = self.list + [item]

Yes... this works because you're treating it immutably.  Although this is
likely much slower than an .append because the interpreter needs to make a
copy of self.list before tacking on your item.

You can also do:

self.list.append(item)
self._p_changed = 1

This explicitly tells the ZODB to include the object represented by self in
the current transaction.


___
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] Your thoughts about Zope-based database apps

2000-11-07 Thread Eric Walstad

Hi Alonso,

FYI, some of the list members have great difficulty in reading HTML
formatted messages.  It's best if you set your format to "Plain Text" before
submitting to the list.

I haven't yet implemented what you are considering, but I am interested in
doing so soon.  So, I am very interested in what you discover.  If you don't
mind, if/when you receive any emails that don't get CC'd to the Zope mailing
list, please forward them on to me, too.

I am an Access programmer and have a bit of experience with MySQL.  I've
given a lot of thought about how one would handle an Access-like interface
with Zope and MySQL over the web.  I'm anticipating a lot more development
time building the interface, but saving a bunch of time by not having to
keep multiple copies of the same DB up to date.  If you feel like
brainstorming on the "whats" and "hows" of such an application, I'ld love to
join in.

Thanks,
Eric.

2. In particular, what would be the best way to implement the inserting and
updating of records along with input data validation? (Retrieving data from
a database to show on a web page using Zope is straightforward as you know.)

I have a set of java script functions that I use for form field validation.
I like this approach because it puts the burden on the client.  However,
there are Zope products available that handle it on the server side.  Search
Zope.org for "Smarter Forms"


3. In several cases I'd like to implement a main form/subform, where the
subform allows the user to enter several items related to only one record in
the main form. Since every item might have many fields (say 20) I'd like to
present just the most important fields on a table, and allow the user to
view/enter/update all the fields for each item in a different web page.
Those of you familiar with Microsoft Access know that in Access it is
straightforward to implement this main form/subform interface. I wonder what
would be the best way of implementing this using Zope?

Using Zope to mimic a form / subform combination means that Zope will have
to generate a the input form and subform elements together before they get
sent to the user.  The user will then update the data sent by Zope.  When
the form is submitted, Zope will have to update the main form data, then
iterate thru the subform elements, modifying the subform data with each
iteration.  If records are to be added, it will require a client server
transaction for each record added (unless something is done with javascript,
where the form is generated dynamically.  Then, the user could add many
records and when the dynamically built form is submitted, Zope will have to
figure out how many records the user added).


4. Do you know of any existing Zope-based app similar to this?. Obviously,
the back-end doesn't have to be MySQL.

I haven't seen any yet, but I'm sure they're out there!


___
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] Checking for ID's before creating ZClass

2000-11-07 Thread Ivan Cornell

Hello from rainy England,

In my constructor for a ZClass I want to auto generate an ID consisting
of a name followed by a incrementing sequence (port0, port1, port2...).
How do I check for all existing id's in a folder? I tried doing it in a
PythonMethod (or whatever they are called now!), calling hasattr() but
failed. Another possibilty would be to loop on a
tryraise until successful, but that doesn't seem
very zopish. In the source code for createInObjectManager I can see it
getting the folder, but can't figure how to acheive that directly,

Ivan


___
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] [Ann] PathHandler 0.9.0 Released!

2000-11-07 Thread Chris Withers

The Path Handler product lets you handle URLs which don't correspond to
objects.

For example, if 'ph' is a Path Handler, then, in the following URL:

http://a.server/ph/1/2/3/4

1, 2, 3 and 4 don't have to be Zope objects, and the '/1/2/3/4' part of
the URL will be handled by the method
specified in the Path Handler.

The Product download and more information can be found at:

http://www.zope.org/Members/NIP/PathHandler 

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] PythonMethod and accessing objects in the ZODB

2000-11-07 Thread Hannes Grund

I'm using the PythonMethod product (latest Version) and Zope2.2.2.
The method lives inside a ZClass, which has an common instance 
propertysheet. Also the method gets an 'self' as argument.
  
Question 1:
How do i access the attributes stored within this propertysheet 
within the method,
while self.title and self.id gives the desired results. 
self.propertysheet.propertyname (among other experiments) 
raises an error.

Question 2:
How do I access objects stored elsewhere in the ZODB,
for example
self.REQUESTpath_to_object.object 

will raise an error..

Thanks in advance.

Hannes.

___
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] CGI

2000-11-07 Thread Nicholas Lo

Thanks, Andy.
Well, they are all written in C. Mostly by my collegues :p That's why I dont
want to touch them in the mean time.

--Nick

- Original Message -
From: "Andy McKay" <[EMAIL PROTECTED]>
To: "Nicholas Lo" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, November 08, 2000 1:04 AM
Subject: Re: [Zope] CGI


> Are these CGI programs written in perl? If so there is perl for Zope
> available...
>
> --
>   Andy McKay, Developer.
>   ActiveState.
>
> - Original Message -
> From: "Nicholas Lo" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 07, 2000 8:43 AM
> Subject: [Zope] CGI
>
>
> Hi,
>
> My problem here seems obvious, but I really dont know how to solve it. I
> want to use some of my old CGI programs and I dont have much time to
convert
> them into Zope. Does anyone know how to pass a request to a CGI program
and
> get the results back in Zope? I know client.py may be useful, but it
further
> worsen the fork tax CGI would pay.
>
> Thanks
>
> -- Nick
>
>


___
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't access management page.

2000-11-07 Thread Aleksander Salwa

On Tue, 7 Nov 2000, Joel Janosky wrote:

> Starting today, when I browse to the base /manage page, I get the normal
> tree display in the left hand pane. The right hand pane, however, displays
> the base page in its presentation form rather than showing the list of
> objects in the base folder.
> 
> Any ideas on what may have been changed to cause this behavior ?? 
> 
> Any ideas on how to get it back to normal??

Try to switch your browser to 'direct connection' instead of using Proxy
server.

[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




___
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] CGI

2000-11-07 Thread Andy McKay

Are these CGI programs written in perl? If so there is perl for Zope
available...

--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Nicholas Lo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 07, 2000 8:43 AM
Subject: [Zope] CGI


Hi,

My problem here seems obvious, but I really dont know how to solve it. I
want to use some of my old CGI programs and I dont have much time to convert
them into Zope. Does anyone know how to pass a request to a CGI program and
get the results back in Zope? I know client.py may be useful, but it further
worsen the fork tax CGI would pay.

Thanks

-- Nick



___
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] Persistence triggering

2000-11-07 Thread Max M

When appending to a list in Zope In a persistent class I cannot just do:

self.list.append(item)

As it will not trigger the persistence mechanism.

I can treat it like an imutable, but that is rather tedious:

_list = self.list
_list.append(item)
self.list = _list

But can I also do?

self.list = self.list + [item]

Regards
Max M


Max M. W. Rasmussen,Denmark.   New Media Director
private: [EMAIL PROTECTED] work: [EMAIL PROTECTED]
-
Specialization is for insects.  -  Robert A. Heinlein

___
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] variable length forms...

2000-11-07 Thread Andy McKay



Will give you the item value. If you want to evaluate that value do:



or a little cleaner wrap it in a let so that





--
  Andy McKay, Developer.
  ActiveState.
- Original Message -
From: "zope" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 07, 2000 1:55 AM
Subject: [Zope] variable length forms...


> Hi.
>
> I have tried to implement a variable length form.
>
> Yes, I have read
> http://www.zope.org/Members/jpenny/variable_length_forms/index_html.!
>
> I a form, I'm using following form fields:
>
> 
> 
> 
> 
> 
> 
> 
> 
>
> where form_numpages is a variable that i got from a previous form.
> This form works fine and generates me form_numpages lines with always one
> textfield and a group of 2 radiobuttons named per line.
>
> form_time_out  radiob1   radiob1
> form_time_out  radiob2   radiob2
> form_time_out  radiob3   radiob3
> ...
>
> The contents of this form is submitted and I want to interpret the data
> with following method:
>
> 1: 
> 2: :
> 3: 
> 4: 
>
> This returns the following Zope error:
>
> Error Type: TypeError
> Error Value: illegal argument type for built-in operation
>
> If I'm replacing the third line with ,
the
> sequence-number is printed out. So I'm sure that it exits.
>
> How can I get the contents of radiob1, radiob2, radiob3, ...
>
> Thanks a lot for your help!
>
> Marc Ludwig
>
>
> ___
> 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] Can't access management page.

2000-11-07 Thread Andy McKay

Have you closed your browser and logged in again? This is normally
indicative of a login failure.

--
  Andy McKay, Developer.
  ActiveState.

- Original Message -
From: "Joel Janosky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 07, 2000 7:26 AM
Subject: [Zope] Can't access management page.


> I have a small internal site I have been running for about a year.
>
> Starting today, when I browse to the base /manage page, I get the normal
> tree display in the left hand pane. The right hand pane, however, displays
> the base page in its presentation form rather than showing the list of
> objects in the base folder.
>
> Any ideas on what may have been changed to cause this behavior ??
>
> Any ideas on how to get it back to normal??
>
> Thanks for the help.
>
> Joel
>
> [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] Stupid Question but...

2000-11-07 Thread Andy McKay

> Hi! I'm a new user and I sort of successfully installed the program on
> my stand-alone computer.

Installed what program?

> But now I'm wondering how do I install the
> program on a webserver.  Actually, I would like to ask for example, I
> would like to use the KnowledgeKit developed by Bill on my webserver, do
> I need to install the Zope main program? If yes, how do I go about it?

If KnowledgeKit is a Zope product so yes you will need Zope. Go to Zope.org
and click on download. There are installation instructions for your platform

> Thank you.
>
> Julian
>
>
> ___
> 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] CGI

2000-11-07 Thread Nicholas Lo



Hi,
 
My problem here seems obvious, but I really dont 
know how to solve it. I want to use some of my old CGI programs and I dont have 
much time to convert them into Zope. Does anyone know how to pass a request to a 
CGI program and get the results back in Zope? I know client.py may be 
useful, but it further worsen the fork tax CGI would pay.
 
Thanks
 
-- Nick


Re: [Zope] Your thoughts about Zope-based database apps

2000-11-07 Thread J. Atwood

> From: "Alonso Rhenals" <[EMAIL PROTECTED]>
> Subject: [Zope] Your thoughts about Zope-based database apps
> 
> 1. Is Zope a good tool to quicky build an efficient & effective user interface
> for a database application?

Yes. Once you get the hang of it it is all quite easy. I have at least one
(building another) site that is about 90% driven by the data from a
PostgreSQL database.

> 2. In particular, what would be the best way to implement the inserting and
> updating of records along with input data validation? (Retrieving data from a
> database to show on a web page using Zope is straightforward as you know.)

ZSQL Methods.

> 3. In several cases I'd like to implement a main form/subform, where the
> subform allows the user to enter several items related to only one record in
> the main form. Since every item might have many fields (say 20) I'd like to
> present just the most important fields on a table, and allow the user to
> view/enter/update all the fields for each item in a different web page. Those
> of you familiar with Microsoft Access know that in Access it is
> straightforward to implement this main form/subform interface. I wonder what
> would be the best way of implementing this using Zope?

You would have to build it. Not that it would be that tough. You could also
use a Zope Wizard if you want to do a couple of forms.

> 4. Do you know of any existing Zope-based app similar to this?. Obviously, the
> back-end doesn't have to be MySQL.

http://fundraising.gotschool.com  - Although you can't see the management
interface which has lots of ways of extracting and updating data through
forms and ZSQL Methods. All PostgreSQL 6.5.3.

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 )




[Zope] Stupid Question but...

2000-11-07 Thread Julian

Hi! I'm a new user and I sort of successfully installed the program on
my stand-alone computer. But now I'm wondering how do I install the
program on a webserver. Actually, I would like to ask for example, I
would like to use the KnowledgeKit developed by Bill on my webserver, do
I need to install the Zope main program? If yes, how do I go about it?

Thank you.

Julian


___
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] Your thoughts about Zope-based database apps

2000-11-07 Thread Alonso Rhenals



I'm considering implementing a web-based database application 
with MySQL as a back-end and a Zope-based front-end. I wonder if you could 
provide your thoughts on the following questions:
 
1. Is Zope a good tool to quicky build an efficient & 
effective user interface for a database application? 
 
2. In particular, what would be the best way to implement the 
inserting and updating of records along with input data validation? (Retrieving 
data from a database to show on a web page using Zope is straightforward as you 
know.)
 
3. In several cases I'd like to implement a main form/subform, 
where the subform allows the user to enter several items related to only one 
record in the main form. Since every item might have many fields (say 20) I'd 
like to present just the most important fields on a table, and allow the user to 
view/enter/update all the fields for each item in a different web page. Those of 
you familiar with Microsoft Access know that in Access it is straightforward to 
implement this main form/subform interface. I wonder what would be the best way 
of implementing this using Zope? 
 
4. Do you know of any existing Zope-based app similar to 
this?. Obviously, the back-end doesn't have to be MySQL.
 
5. Finally, if somebody is interested in further discussing 
this type of applications, I'll be glad to participate. Just e-mail me to [EMAIL PROTECTED]
 
Thanks in advance for your inputs.
Alonso Rhenals
Miami, FL, USA
Please reply to: [EMAIL PROTECTED]


[Zope] Can't access management page.

2000-11-07 Thread Joel Janosky

I have a small internal site I have been running for about a year.

Starting today, when I browse to the base /manage page, I get the normal
tree display in the left hand pane. The right hand pane, however, displays
the base page in its presentation form rather than showing the list of
objects in the base folder.

Any ideas on what may have been changed to cause this behavior ?? 

Any ideas on how to get it back to normal??

Thanks for the help.

Joel

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

2000-11-07 Thread Phil Harris

What's wrong with  ?


- Original Message -
From: "Pete Prodoehl" <[EMAIL PROTECTED]>
To: "'zope-list'" <[EMAIL PROTECTED]>
Sent: Tuesday, November 07, 2000 2:27 PM
Subject: RE: [Zope] images in directories


>
> I was sort of hoping it would be easier. It would be ideal to have this:
>
>   
>
> boiled down to one simple tag that works when I store images in a
subfolder
> *and* use file extensions.
>
> But from what I've read so far, it can't be done...
>
> Someone suggested the following:
>
>
>
> but that didn't work for some reason, and still seems a little complex for
> just inserting an image.
>
>
> Pete
>
>
>
> > --
> > Subject: Re: [Zope] images in directories
> >
> > hi,
> >
> > Sure they are.  If you ftp a jpg to the server it comes up with an id of
> > bla.jpg, you can then refrence it in html just like you would on an
Apache
> > server or whaterver 
> >
> >
>
> ___
> 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] Cookies & Expiration

2000-11-07 Thread Eric Walstad

Oops, forgot to send this one to the list...

-Original Message-
From: Eric Walstad [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 03, 2000 3:40 PM
To: Steve Drees
Subject: RE: [Zope] Cookies & Expiration



Hi Steve,
Your solution is very cool!  I'm going to use it in the following
form...
(maybe a bit more flexible?, change the default days to suit your needs)

ID: expireInNDays
Parameter List: self, days=1.0
_BODY__
t = self.ZopeTime() + days # user defined duration
t = t.toZone('GMT')

return t.strftime("%A, %d-%b-%Y %H:%M:%S GMT")
___
 On the page you want to set the cookie put:
 
 or, to use the default of 1 day:
 
Thanks  -Eric.




// -Original Message-
// From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Steve
// Drees
// Sent: Friday, November 03, 2000 2:02 PM
// To: Kit O'Connell; [EMAIL PROTECTED]
// Subject: RE: [Zope] Cookies & Expiration
//
//
// > However, I'd like to have this cookie set to expire one week
// from the date
// > of the current visit. i.e., if its 12:30 on 11/3 when a surfer
// visits my
// > site, I want Zope to set their lastVisited cookie to expire on 12:30 on
// > 11/10.
//
// Have a pythonmethod
//
// ID expireIn1Week
// Parameter List self
// _BODY__
// t = self.ZopeTime() + 7.0 # 1 week in the future
// t = t.toZone('GMT')
//
// return t.strftime("%A, %d-%b-%Y %H:%M:%S GMT")
// ___
//
//
// On the page you want to set the cookie put
// 
//
//
//
//
// ___
// 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] uploading to Zope with Mac Browser

2000-11-07 Thread rlanham

Zope list:

This zope method for uploading images to server:



...works great from a PC. But from a Mac (netscape And IE) it does not work.

Sometime a file is uploaded, but it is garbage. Apparently the Mac browsers have a 
totally different way of packaging data from an  element.

Does anyone on this list know how to deal with this? Is there a Zope product?

Thanks in advance for any help with this fundamental problem using Zope.

Richard



___
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-07 Thread Pete Prodoehl


I was sort of hoping it would be easier. It would be ideal to have this:

  

boiled down to one simple tag that works when I store images in a subfolder
*and* use file extensions.

But from what I've read so far, it can't be done...

Someone suggested the following:

   

but that didn't work for some reason, and still seems a little complex for
just inserting an image.


Pete



> --
> Subject:  Re: [Zope] images in directories
> 
> hi,
> 
> Sure they are.  If you ftp a jpg to the server it comes up with an id of
> bla.jpg, you can then refrence it in html just like you would on an Apache
> server or whaterver 
> 
> 

___
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] catalog DTML Document

2000-11-07 Thread Wolfgang Strobl

On 7 Nov 2000, 10:37  Chris Withers wrote:

> Wolfgang Strobl wrote:
> > There is a How-To "Adding ZClass Instances Programmatically",
> > and a lot of gobbledigoop about when, how and why. But I haven't
> > found anything about how to "index" or "reindex" a plain and simple
> > DTML Document.
> 
> In Python:
> 
> your_catalog.catalog_object(your_dtml_document,your_dtml_document.abso
> lute_url())

Thanks, that's just what I was looking for.

> 
> This sort of thing shouldn't be done in DTML! :P

Of course not! I prefer Python to DTML (and dislike ZClasses for that 
reason) for more than the most simple programming tasks, anyway.

But it comes handy for trying something out.

Btw, shouldn't that be

In DTML:


?


--
  o  ( [EMAIL PROTECTED] (+49 2241) 14-2394
 /\*   GMD mbH   #include 
   _`\ `_<===  Schloss Birlinghoven, 
__(_)/_(_)___.-._  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 )




[Zope] User Source choices

2000-11-07 Thread seb bacon

This is a bit off-topic, but I wondered if anyone has any opinions on
the matter.

I'm going to use LoginManager for my user folder stuff, and I'm
wondering which type of DB to use to store user information.

Has anyone any advice about this?  Here's some of the free choices with
what I know about them:

MySQL is my first choice because I know it well
postgres has transactions, stored procedures, but can scale badly
SyBase I know nothing about
LDAP (e.g. OpenLDAP) is optimised for this kind of thing, but I'm not sure I've quite
grokked it yet

Should my choice be dependent on the quality of the adapters available,
or are all the adapters much the same?

any comments appreciated,

seb

___
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] variable length forms...

2000-11-07 Thread Rik Hoekstra



zope wrote:
> 
> Hi.
> 
> I have tried to implement a variable length form.
> 
> Yes, I have read
> http://www.zope.org/Members/jpenny/variable_length_forms/index_html.!
> 
> I a form, I'm using following form fields:
> 
> 
> 
> 
> maxlength="4">
> 
> 
> 
> 
> 
> where form_numpages is a variable that i got from a previous form.
> This form works fine and generates me form_numpages lines with always one
> textfield and a group of 2 radiobuttons named per line.
> 
> form_time_out  radiob1   radiob1
> form_time_out  radiob2   radiob2
> form_time_out  radiob3   radiob3
> ...
> 
> The contents of this form is submitted and I want to interpret the data
> with following method:
> 
> 1: 
> 2:  :
> 3:  
> 4: 
> 
> This returns the following Zope error:
> 
> Error Type: TypeError
> Error Value: illegal argument type for built-in operation
> 
> If I'm replacing the third line with , the
> sequence-number is printed out. So I'm sure that it exits.

hm, sequence_number is an integer. You can't add that to a string, hence
the error.

try something like (untested):

3:  

or

3:  

sorry for the ugly code ;-)

hth
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] catalog DTML Document

2000-11-07 Thread Chris Withers

Wolfgang Strobl wrote:
> There is a How-To "Adding ZClass Instances Programmatically",
> and a lot of gobbledigoop about when, how and why. But I haven't
> found anything about how to "index" or "reindex" a plain and
> simple DTML Document.

In Python:

your_catalog.catalog_object(your_dtml_document,your_dtml_document.absolute_url())

This sort of thing shouldn't be done in DTML! :P

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] Folderish object -API

2000-11-07 Thread Chris Withers

Petr Knapek wrote:
> def manage_addISNGFolder(self, cz_id, title='', key_words=[], header='', footer='',
>  createPublic=0,
>  createUserF=0,
>  REQUEST=None):
> """Add a new 'ISNG Folder' object with id *id*."""

...

> ob=ISNGFolder()

...

> ob.manage_role('Content', ['Access contents information', 'View'])


Your problem is here and I'm betting it's 'cos #ob' isn't an acquisition
wrapper...

Try replacing the above line with:
 ob.__of__(self).manage_role('Content', ['Access contents
information', 'View'])

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] Cloning a ZClass-Instance

2000-11-07 Thread brocken22

Hallo,
'news'is a zclass and when I'm using a hardcoded value for x it's working.

that's the cloning-method:
--




  

Copied!

Not needed to clone!!



--
And the traceback:
---
The object one  does not support this operation 
---
Thanks for your help!

-- 
Sent through GMX FreeMail - http://www.gmx.net


___
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] variable length forms...

2000-11-07 Thread zope

Hi.

I have tried to implement a variable length form.

Yes, I have read 
http://www.zope.org/Members/jpenny/variable_length_forms/index_html.!

I a form, I'm using following form fields:










where form_numpages is a variable that i got from a previous form.
This form works fine and generates me form_numpages lines with always one 
textfield and a group of 2 radiobuttons named per line.

form_time_out  radiob1   radiob1
form_time_out  radiob2   radiob2
form_time_out  radiob3   radiob3
...

The contents of this form is submitted and I want to interpret the data 
with following method:

1: 
2:  :
3:  
4: 

This returns the following Zope error:

Error Type: TypeError
Error Value: illegal argument type for built-in operation

If I'm replacing the third line with , the 
sequence-number is printed out. So I'm sure that it exits.

How can I get the contents of radiob1, radiob2, radiob3, ...

Thanks a lot for your help!

Marc Ludwig


___
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] ISPs that host zope

2000-11-07 Thread Jens Grewen

Hi Keith,

check out http://www.zope.org/Resources/ZSP

Jens Grewen

- Original Message -
From: "Keith Alperin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 07, 2000 2:43 AM
Subject: [Zope] ISPs that host zope


> Greetings.  I am a complete zope newbie but am enthralled by the
technology.
> I am about to begin working on a personal web project and would like to
> build it in/with zope.  Can anyone recommend a good ISP that will:
> -host and support zope
> -give me access to an RDBMS (MySQL or any other system would more than
> suffice)
> -give me a reasonable amount of space (>50MB)
> -not break my budget (<$30.00 per month.)
>
> Does such an animal exist?  Please let me know what your experiences are
> with zope-friendly ISPs regardless of whether they meet my aforementioned
> criteria.
>
> Thank you so much.
>
> Keith R. Alperin
> Sr. Web Developer
> Ignite Sports Media
> [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 )




[Zope] SAP DB with Zope?

2000-11-07 Thread Jonathan (ListServ Account)

Hi all,

Will be testing it myself shortly, but has anyone already hooked up Zope to 
SAP DB? It has been open sourced recently, and there are Python interfaces 
available (as well as Perl, JDBC, PHP, ODBC and C/C++). For those who are 
not familiar with it: it's a high end database used for example with SAP 
R/3 and has its roots in ADABAS D.

Check it out:
http://www.sap-ag.de/solutions/technology/sapdb/index.htm

Cya,
Jonathan


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