[Zope] call htmlformuploadfile from dtml method

2006-03-08 Thread Olivier Wambacq
hello,

in plonelocalfolderNG you have the htmlformuploadfile method, that is called
in the form action.
but I needed to save everything in a db also, so I called a dtml method in
the form action. whitch first calls the db-store scripting, and then the
htmlformuploadfile.
everything is stored well in the db now,
but now I don't know how to call the htmlformuploadfile from this script.

I tried some things like:

or
http://../htmlformuploadfile>
also tried using 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] manage_pasteObjects question

2006-03-08 Thread David




Palermo, Tom wrote:

  
  
  
  Hi David,
   
  In my last post, I wrote that I tried
calling manage_pasteObjects a variety of ways:
  context.manage_pasteObjects(context.REQUEST)
  context.manage_pasteObjects(context.cb_dataItems()) 
   
  as well as the
original:
  context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST=req['__cp'])
   
  All 3 of these attemps results in the eInvalid
exception gettting raised by manage_pasteObjects( ). req['__cp'] is a
reference to the cookie that gets set when you place something on the
clipboard. I was trying to grab a specific piece of the REQUEST instead
of the whole thing. Does context.manage_pasteObjects(context.REQUEST)
need to be written as:
context.manage_pasteObjects(REQUEST=context.REQUEST)?
   
  It's kind of a moot point now anyway. I'm using some
SESSION variables now to store the ids of te objects I want to cut and
the path of their container so I can do the cut and paste from a single
script. Not sure if this is good or not but it's working for me now.
It's one of those times when I just need something to work.
   
  -Tom 
  
  
  
  
  
  
  

Hi Tom,

I'm glad you found 'another way' but in the interest of no one I wish
to add the following.

These methods:  manage_copyObjects, manage_cutObjects and
manage_pasteObjects should be reviewed in /OFS/CopySupport.py - because
the current docs do not describe them well.

For example, the copy method works differently depending on whether you
just pass the container's Ids or pass the Ids *and* the REQUEST.

No reason to beat a dead horse  but of the 3 tries you listed only the
first can (but conditionally) work:

context.manage_pasteObjects(context.REQUEST) 

But *only* if you first called manage_copyObjects (or manage_cutObject)
with the REQUEST as a parameter included  (only then does REQUEST
get the __cp object)

Your second try:

context.manage_pasteObjects(context.cb_dataItems())

Is wrong
because it is passing a list of items in the clip board instead of the
the encoded copy object (returned by manage_copyObjects) that
"manage_pasteObjects" expects

Your last
try is wrong because both parameters are incorrect.
:-)

All best,

David






___
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] Upgrading best practices

2006-03-08 Thread Brian Sullivan
On 3/8/06, Lennart Regebro <[EMAIL PROTECTED]> wrote:
> On 3/8/06, Brian Sullivan <[EMAIL PROTECTED]> wrote:
> > Is there somewhere a general guide to upgrading existing Zope systems
> > to newer versions? I realize that there are special cases but I am
> > looking for a general best practices guide.
>
> 1. Install the new version in a new directory together with all
> products you use.
> 2. Copy the old ZODB to the new instance.
> 3. Do whatever needed for your products to upgrade.
>

That is essentially what I have done -- I just hadn't seen any
strategy written down and thought maybe there might be more to it.
___
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] manage_pasteObjects question

2006-03-08 Thread Palermo, Tom



Hi David,
 
In my last post, I wrote that I tried calling 
manage_pasteObjects a variety of ways:
context.manage_pasteObjects(context.REQUEST)
context.manage_pasteObjects(context.cb_dataItems()) 

 
as well as the 
original:
context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST=req['__cp'])
 
All 3 of 
these attemps results in the eInvalid exception gettting raised by 
manage_pasteObjects( ). req['__cp'] is a reference to the cookie that gets set 
when you place something on the clipboard. I was trying to grab a specific piece 
of the REQUEST instead of the whole thing. Does 
context.manage_pasteObjects(context.REQUEST) need to be written as: 
context.manage_pasteObjects(REQUEST=context.REQUEST)?
 
It's kind 
of a moot point now anyway. I'm using some SESSION variables now to store the 
ids of te objects I want to cut and the path of their container so I can do the 
cut and paste from a single script. Not sure if this is good or not but it's 
working for me now. It's one of those times when I just need something to 
work.
 
-Tom 




From: David [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 08, 2006 6:12 PMTo: Palermo, 
TomCc: 'Dieter Maurer'; 'zope@zope.org'Subject: Re: [Zope] 
manage_pasteObjects question
Palermo, Tom wrote: 
I'm trying to do the cut in one script and the paste in another script. It's
my understanding that REQUEST is an optional parameter to
manage_cutObjects(). Passing REQUEST will set a cookie, __cp. __cp is the
clipboard data. Later when I try to do manage_pasteObjects() from another
script, I always get a "cookie data is truncated" message regardless of how
I try to pass in the clipboard data. I should be able to just do:
context.manage_pasteObjects(context.cb_dataItems()) 

That doesn't work. I still get the "cookie data is truncated" message. I get
the same message if I do:
context.manage_pasteObjects(context.REQUEST) 

I know that there are, in fact, objects on the clipboard because I can just
do:
print context.cb_dataItems()
return printed

I'm not sure what I'm doing wrong. It seems like you can have cut and paste
happen in separate scripts. Is that not true?

Thanks,
Tom

-Original Message-
From: Dieter Maurer [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 08, 2006 2:07 PM
To: Palermo, Tom
Cc: 'zope@zope.org'
Subject: Re: [Zope] manage_pasteObjects question

Palermo, Tom wrote at 2006-3-7 16:13 -0500:
  
  I am trying to do a manage_cutObjects in one script and then a 
manage_pasteObjects.

Usually, this looks like:

	 obj_info = XXX.manage_cutObjects(...)
	 YYY.manage_pasteObjects(obj_info)

  
  When I execute this line from my pasteObjects python
script:
context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST
=req[
'__cp'])

Do not know, why in hell you pass in a crippled request...

  You should be aware that "req['__cp']" is not a request object...

--
Dieter
__Tom,You didnt respond to Dieter's remarks  so 
its unclear where to go with this.You coded:
    
context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST=req['__cp'])What 
is the last parameter doing?  REQUEST=req['__cp'] ?  The 
manage_pastObjects expects a REQUEST object, e.g. 
REQUEST=context.REQUEST.Did you try this?   
David

___
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] manage_pasteObjects question

2006-03-08 Thread David




Palermo, Tom wrote:

  I'm trying to do the cut in one script and the paste in another script. It's
my understanding that REQUEST is an optional parameter to
manage_cutObjects(). Passing REQUEST will set a cookie, __cp. __cp is the
clipboard data. Later when I try to do manage_pasteObjects() from another
script, I always get a "cookie data is truncated" message regardless of how
I try to pass in the clipboard data. I should be able to just do:
context.manage_pasteObjects(context.cb_dataItems()) 

That doesn't work. I still get the "cookie data is truncated" message. I get
the same message if I do:
context.manage_pasteObjects(context.REQUEST) 

I know that there are, in fact, objects on the clipboard because I can just
do:
print context.cb_dataItems()
return printed

I'm not sure what I'm doing wrong. It seems like you can have cut and paste
happen in separate scripts. Is that not true?

Thanks,
Tom

-Original Message-
From: Dieter Maurer [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 08, 2006 2:07 PM
To: Palermo, Tom
Cc: 'zope@zope.org'
Subject: Re: [Zope] manage_pasteObjects question

Palermo, Tom wrote at 2006-3-7 16:13 -0500:
  
  
I am trying to do a manage_cutObjects in one script and then a 
manage_pasteObjects.

  
  
Usually, this looks like:

	 obj_info = XXX.manage_cutObjects(...)
	 YYY.manage_pasteObjects(obj_info)

  
  
When I execute this line from my pasteObjects python
script:
context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST
=req[
'__cp'])

  
  
Do not know, why in hell you pass in a crippled request...

  You should be aware that "req['__cp']" is not a request object...

--
Dieter
__

Tom,

You didnt respond to Dieter's remarks  so its unclear where to go
with this.

You coded:
   
context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST=req['__cp'])

What is the last parameter doing?  REQUEST=req['__cp'] ?  The
manage_pastObjects expects a REQUEST object, e.g.
REQUEST=context.REQUEST.

Did you try this?   

David










___
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] Upgrading best practices

2006-03-08 Thread Einar Næss Jensen
When I do this ( with my very simple zope systems), I always do a test-migration before THE migration.
Basically: If all looks well, we are Go for Migration.

In short, I do it like this (not using zeo):
check with google, bugcollectors mailinglists if your new zope version
may expose you to unwanted issues. For some reason, I forget this
important part, and get punished by it.
Install new zope-engine. generate new instance where the migrated system will live.
copy etc/  Imports/ Extensions/ Products/ to the new instance.
copy Data.fs
ensure the new instnace is running on different port-number than the old one (for the test-run).
remember that some products may have hard-coded paths. change them.
testrun of your new zope. Check features, check logs.

remember to change your apache config files also (or other webserver)

This is the short version of how I do things. 
 On 3/8/06, Brian Sullivan <[EMAIL PROTECTED]> wrote:
Is there somewhere a general guide to upgrading existing Zope systemsto newer versions? I realize that there are special cases but I amlooking for a general best practices guide.It seems that there is lots of information with each release on
installation from scratch but very little solid information that Icould find on upgrading.___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 )-- 
-- Einar Næss Jensenhttp://einar.nidelven-it.no/einarbloghttp://www.homemade.notlf: +47 90990249(\__/)(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
___
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] Upgrading best practices

2006-03-08 Thread Lennart Regebro
On 3/8/06, Brian Sullivan <[EMAIL PROTECTED]> wrote:
> Is there somewhere a general guide to upgrading existing Zope systems
> to newer versions? I realize that there are special cases but I am
> looking for a general best practices guide.

1. Install the new version in a new directory together with all
products you use.
2. Copy the old ZODB to the new instance.
3. Do whatever needed for your products to upgrade.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
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] manage_pasteObjects question

2006-03-08 Thread Palermo, Tom
I'm trying to do the cut in one script and the paste in another script. It's
my understanding that REQUEST is an optional parameter to
manage_cutObjects(). Passing REQUEST will set a cookie, __cp. __cp is the
clipboard data. Later when I try to do manage_pasteObjects() from another
script, I always get a "cookie data is truncated" message regardless of how
I try to pass in the clipboard data. I should be able to just do:
context.manage_pasteObjects(context.cb_dataItems()) 

That doesn't work. I still get the "cookie data is truncated" message. I get
the same message if I do:
context.manage_pasteObjects(context.REQUEST) 

I know that there are, in fact, objects on the clipboard because I can just
do:
print context.cb_dataItems()
return printed

I'm not sure what I'm doing wrong. It seems like you can have cut and paste
happen in separate scripts. Is that not true?

Thanks,
Tom

-Original Message-
From: Dieter Maurer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 08, 2006 2:07 PM
To: Palermo, Tom
Cc: 'zope@zope.org'
Subject: Re: [Zope] manage_pasteObjects question

Palermo, Tom wrote at 2006-3-7 16:13 -0500:
>I am trying to do a manage_cutObjects in one script and then a 
>manage_pasteObjects.

Usually, this looks like:

 obj_info = XXX.manage_cutObjects(...)
 YYY.manage_pasteObjects(obj_info)

>When I execute this line from my pasteObjects python
>script:
>context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST
>=req[
>'__cp'])

Do not know, why in hell you pass in a crippled request...

  You should be aware that "req['__cp']" is not a request object...

--
Dieter
___
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] Upgrading best practices

2006-03-08 Thread Brian Sullivan
Is there somewhere a general guide to upgrading existing Zope systems
to newer versions? I realize that there are special cases but I am
looking for a general best practices guide.

It seems that there is lots of information with each release on
installation from scratch but very little solid information that I
could find on upgrading.
___
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] manage_pasteObjects question

2006-03-08 Thread Dieter Maurer
Palermo, Tom wrote at 2006-3-7 16:13 -0500:
>I am trying to do a manage_cutObjects in one script and then a
>manage_pasteObjects.

Usually, this looks like:

 obj_info = XXX.manage_cutObjects(...)
 YYY.manage_pasteObjects(obj_info)

>When I execute this line from my pasteObjects python
>script:
>context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST=req[
>'__cp'])

Do not know, why in hell you pass in a crippled request...

  You should be aware that "req['__cp']" is not a request object...

-- 
Dieter
___
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] How to search doc about acl permissions Zope?

2006-03-08 Thread Dieter Maurer
José Carlos Senciales wrote at 2006-3-8 13:30 +0100:
> ...
>I´m trying to develop a product to control my own folders, users , roles and 
>then i need to known how to interact with acl permissions of zope.

Please read the Zope Book (2.7 edition, online)
and the Zope Developper Guide (online on "zope.org").

Come back when you then have more concrete questions.

-- 
Dieter
___
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] Help needed to simplify some code

2006-03-08 Thread Paul Winkler
On Wed, Mar 08, 2006 at 09:35:55AM +, Chris Withers wrote:
> John Poltorak wrote:
> >
> >Several months ago someone provided me with me with some sample code which 
> >did exactly what I wanted, but looking at it again it looks a little 
> >unwieldy and could do with tidying up. It consists of:-
(snip)

What Chris said, except:

> ...then you can do:
> 
> 
>   
> http://www.slinkp.com
___
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] Upgrading to Zope 2.9.1

2006-03-08 Thread Brian Sullivan
On 3/8/06, Patrick Decat <[EMAIL PROTECTED]> wrote:
> Hi,
>
> On 3/8/06, Brian Sullivan <[EMAIL PROTECTED]> wrote:
> > I am in the process of testing an upgrade from a Zope 2.8.4 system  to
> > a Zope 2.9.1 system.
> >
> > The process I used:
> >
> > 1) Install 2.9.1 on a Win2003 system (it happens to be the same one
> > that the 2.8.4 system is running but I changed the config so the ports
> > don't conflict). The installation is successful
> >
> > 2) Copy the Product directory from my functioning 2.8.4 system
> > instance to the 2.9.1 instance
> >
> > 3) copy the ZODB from the functioning 2.8.4 system to the 2.9.1 system
> >
> > All appears to go well -- the 2.9.1 system appears to be running
> > everything from the 2.8.4 system correctly. A deeper check though
> > shows that a few Python scripts in the ZODB (this in a system that has
> > 20 or 30 scripts) fail. Examining the scripts indicates an error at
> > line 3 -- but no such error can be found, however saving the script
> > with no changes eliminates the error and also causes the script to now
> > function.
> >
> > After finding and correcting these scripts everything seems to be working 
> > well.
> >
> > Any idea what happened during the upgrade to cause this strange
> > behaviour and how can I avoid it?
> >
> > I will have to go through a similar upgrade at a customer's site and
> > would like to avoid hand checking every script if I can avoid it.
>
> I had the same problem : Windows CR/LF line endings are not supported
> anymore for PythonScripts.
> According to Dieter Maurer, it has to do with Python 2.4 rather than Zope 2.9.
>


OK -- sounds like a plausible explanation.

Any idea how to predict when this is going to be a problem?
___
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] Upgrading to Zope 2.9.1

2006-03-08 Thread Patrick Decat
Hi,

On 3/8/06, Brian Sullivan <[EMAIL PROTECTED]> wrote:
> I am in the process of testing an upgrade from a Zope 2.8.4 system  to
> a Zope 2.9.1 system.
>
> The process I used:
>
> 1) Install 2.9.1 on a Win2003 system (it happens to be the same one
> that the 2.8.4 system is running but I changed the config so the ports
> don't conflict). The installation is successful
>
> 2) Copy the Product directory from my functioning 2.8.4 system
> instance to the 2.9.1 instance
>
> 3) copy the ZODB from the functioning 2.8.4 system to the 2.9.1 system
>
> All appears to go well -- the 2.9.1 system appears to be running
> everything from the 2.8.4 system correctly. A deeper check though
> shows that a few Python scripts in the ZODB (this in a system that has
> 20 or 30 scripts) fail. Examining the scripts indicates an error at
> line 3 -- but no such error can be found, however saving the script
> with no changes eliminates the error and also causes the script to now
> function.
>
> After finding and correcting these scripts everything seems to be working 
> well.
>
> Any idea what happened during the upgrade to cause this strange
> behaviour and how can I avoid it?
>
> I will have to go through a similar upgrade at a customer's site and
> would like to avoid hand checking every script if I can avoid it.

I had the same problem : Windows CR/LF line endings are not supported
anymore for PythonScripts.
According to Dieter Maurer, it has to do with Python 2.4 rather than Zope 2.9.

Regards,
Patrick.
___
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] Bad foundation mailing list pointer

2006-03-08 Thread Rob Page

Apologies!!

I sent the admin URL.  For your convenience the real
URL (while not hard to figure out :^) is below:

http://mail.zope.org/mailman/listinfo/foundation

--
Rob Page   V: 540 361 1710
Zope Corporation   F: 703 995 0412




___
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] Upgrading to Zope 2.9.1

2006-03-08 Thread Brian Sullivan
I am in the process of testing an upgrade from a Zope 2.8.4 system  to
a Zope 2.9.1 system.

The process I used:

1) Install 2.9.1 on a Win2003 system (it happens to be the same one
that the 2.8.4 system is running but I changed the config so the ports
don't conflict). The installation is successful

2) Copy the Product directory from my functioning 2.8.4 system
instance to the 2.9.1 instance

3) copy the ZODB from the functioning 2.8.4 system to the 2.9.1 system

All appears to go well -- the 2.9.1 system appears to be running
everything from the 2.8.4 system correctly. A deeper check though
shows that a few Python scripts in the ZODB (this in a system that has
20 or 30 scripts) fail. Examining the scripts indicates an error at
line 3 -- but no such error can be found, however saving the script
with no changes eliminates the error and also causes the script to now
function.

After finding and correcting these scripts everything seems to be working well.

Any idea what happened during the upgrade to cause this strange
behaviour and how can I avoid it?

I will have to go through a similar upgrade at a customer's site and
would like to avoid hand checking every script if I can avoid it.
___
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] Foundation list reminder

2006-03-08 Thread Rob Page

Hello everyone!

We intend to post news about the Zope Foundation and
some process mechanics in the very near future.  This
note is to remind people of the mailing list [1] for
foundation-related topics.

Thanks.

Regards,
Rob

[1] http://mail.zope.org/mailman/admin/foundation/

--
Rob Page   V: 540 361 1710
Zope Corporation   F: 703 995 0412




___
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] dtml result in href

2006-03-08 Thread Andrew Milton
+---[ Olivier Wambacq ]--
| another question.
| 
| when I create a link with a filename and url from a database.
| I do it like this:
| 
| url goes here">
| filename goes here
| 

This is DTML or a ZPT ?

for a ZPT its;

file

for DTML it would be;

"> etc

-- 
Andrew Milton
[EMAIL PROTECTED]
___
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] dtml result in href

2006-03-08 Thread Olivier Wambacq
another question.

when I create a link with a filename and url from a database.
I do it like this:

url goes here">
filename goes here


this results in a link named as the true filename for ex:
filename.txt

but the link sends me to mysite/url goes
here
instead of: mysite/subdir/filename.txt

is there another way or another syntax to put de dtml in the href?

thanks,
Olivier

___
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] DTML-In with filter

2006-03-08 Thread Andrew Milton
+---[ Martin Koekenberg ]--
| Hello,
|  
| Is it possible to use a DTML-In to display all DTML Documents in a folder 
exept
| the one's with a centain value in a property ?
|  
| Example.
|  
| DTML Document one with property a=bc
| DTML Document two with property a=de
| DTML Document three with property a=bc
|  
| Now I want to use DTML-IN to display all the dtml documents except the ones
| with property a=de.
| I also use the size and batchsize property to create links to the next 10
| documents. If I use an if statement the next 10 can be 9 ore less 9 items
| because there could be one ore more documents with a=de.
|  
| Who can help me ?

Pseudo-code (dtml-like)









Or you could write a python script that filtered out the ones you wanted and
call the python script to return the list of things to display, which is
probably a much better idea.

-- 
Andrew Milton
[EMAIL PROTECTED]
___
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] DTML-In with filter

2006-03-08 Thread Tino Wildenhain

Martin Koekenberg schrieb:

Hello,
 
Is it possible to use a DTML-In to display all DTML Documents in a 
folder exept the one's with a centain value in a property ?
 
Example.
 
DTML Document one with property a=bc

DTML Document two with property a=de
DTML Document three with property a=bc
 
Now I want to use DTML-IN to display all the dtml documents except the 
ones with property a=de.
I also use the size and batchsize property to create links to the next 
10 documents. If I use an if statement the next 10 can be 9 ore 
less 9 items because there could be one ore more documents with a=de.


Just drop this DTML... or at least get help from python:

return [doc for doc in context.objectValues('DTML Document')  if 
doc.getProperty('a')!='de']


(python script or the like would be your friend - also
it makes it possible to replace the quite costy objectValues()
call with ZCatalog query w/o changing your presentation code)

Regards
Tino
___
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] DTML-In with filter

2006-03-08 Thread Martin Koekenberg


Hello,

 

Is it possible to use a DTML-In to display all DTML Documents in a folder 
exept the one's with a centain value in a property ?

 

Example.

 

DTML Document one with property a=bc

DTML Document two with property a=de


DTML Document three with property a=bc

 

Now I want to use DTML-IN to display all the dtml documents except the ones 
with property a=de.
I 
also use the size and batchsize property to create links to the next 10 
documents. If I use an if statement the next 10 can be 9 ore 
less 9 items because there could be one ore more documents 
with a=de.

 

Who can help me ?

 

regards,

 

Martin Koekenberg

___
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] searching free hosting

2006-03-08 Thread Maciej Wisniowski

> I'm looking for a free hosting service to publish my homepage.
> Freezope.org seems to be unavailable (registration form does not 
load). Anyone

> knows another site/service like freezope?
Check http://objectis.net/

--
Maciej Wisniowski
___
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] Re: Redirect Exception and Five

2006-03-08 Thread Santi Camps
Hi again,

I reply to myself, just for the case that this can help somebody in the future

Finally I've found the problem was the directive
, that enters in conflict with the Redirect
exception raised from PluggableAuthFolder in its
before_publishing_traverse_hook.

Removing  and leaving default page in Zope 2
mode (index_html), all works fine.

Regards
--
Santi Camps
Earcon S.L. - http://www.earcon.com
  - http://www.kmkey.com
___
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] How to search doc about acl permissions Zope?

2006-03-08 Thread José Carlos Senciales

Hi,

I´m trying to develop a product to control my own folders, users , roles and 
then i need to known how to interact with acl permissions of zope.


I´ve looked the Zope API and i think have to use BasicUserFolder and 
UserFolder but i don´t found a document to explain this.


The zope book and the developer guide don´t speak about.

thanks






___
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] Zope Managed Server

2006-03-08 Thread Jonathan
If you want your own 'dedicated' server it would probably be cheaper to get 
your own machine, load & configure zope to your specifications and then use 
a standard co-location ISP.  This will be easier/cheaper to set-up/operate 
than trying to find a zope ISP who will rent you a dedicated box.


Jonathan

- Original Message - 
From: "Dan Gaibel" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, March 07, 2006 9:28 PM
Subject: [Zope] Zope Managed Server



Hello Folks,

I'm interested in finding a company that will do monthly managed zope
hosting. We're looking for a dedicated machine. I know that Zope Corp does
this and it is quite expensive. I wonder if anyone has had any experiences
with such a service.

Any advice is highly appreciated, and I apologize if this list is an
inappropriate venue to pose such a question.

Thanks!

Dan

___
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 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] question: upload files to folder AND database

2006-03-08 Thread Andrew Milton
+---[ Olivier Wambacq ]--
| hello,
| 
| is it possible to upload files in plone, using a form (like the form in
| plonelocalfolderNG) AND sending a url to that file + additional information
| to a database using popy connection?
| 
| I can upload files using plonelocalfolderNG, but I can't send any more info
| with it. + I need to sort them, so I need some more info (like category,
| author, ...) in a database to perform my sql on.
| 
| also, I want to let users upload using a form, not with the add tab button.
| 
| I tried watching the plonelocalfolderNG code, and making my own, but I can't
| get it to work.


Post to a python script that first sends it to your db storage script, 
and then on to plonelocalfolderNG

-- 
Andrew Milton
[EMAIL PROTECTED]
___
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] question: upload files to folder AND database

2006-03-08 Thread Olivier Wambacq
hello,

is it possible to upload files in plone, using a form (like the form in
plonelocalfolderNG) AND sending a url to that file + additional information
to a database using popy connection?

I can upload files using plonelocalfolderNG, but I can't send any more info
with it. + I need to sort them, so I need some more info (like category,
author, ...) in a database to perform my sql on.

also, I want to let users upload using a form, not with the add tab button.

I tried watching the plonelocalfolderNG code, and making my own, but I can't
get it to work.

thanx in advance,
Olivier

___
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] repozo.py

2006-03-08 Thread Tim Peters
[Dennis Allison]
>> We are (finally) moving to repozo for our backups.  We are running a mixed
>> collection of Zopes -- mostly Zope 2.7.6, Zope 2.8.X and Zope 2.9.0.   For
>> the near term we cannot move to a single release.  There are differences
>> between the versions of repozo distributed with the different Zope
>> systems.
>>
>> I assume that the they are backward compatible and that the repozo.py
>> shipped with Zope 2.9.0 is compatible with all variations of the Data.fs
>> format.

[Chris Withers]
> I would play it safe and use the repozo.py appropriate for each version
> of Zope you're using to drive each ZEO server...

It's probably safest to use the most recent version of repozo with
all:  repozo hasn't grown new features, but it has gotten bugfixes,
and pretty much regardless of the software in question the most recent
release is the one most likely to contain all bugfixes to date. 
repozo in particular doesn't know anything about the _structure_ of a
Data.fs file (it works by copying bytes -- doesn't know anything about
transactions or objects), so it wouldn't be possible for repozo to be
incompatible across ZODB releases even if the Data.fs format had
changed (which it hasn't).
___
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] searching free hosting

2006-03-08 Thread Fabio
Hi!
I'm looking for a free hosting service to publish my homepage.
Freezope.org seems to be unavailable (registration form does not load). Anyone 
knows another site/service like freezope?

Thanks,
Fabio
-- 

Dott. Fabio Marcone

2T srl
Telefono   +39 - 0871- 540154
Fax+39 - 0871- 571594
Email  [EMAIL PROTECTED]
Indirizzo  Viale B. Croce 573
   66013 Chieti Scalo (CH)
GNU/Linux registered user  #400424
___
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] Need Urgent Help

2006-03-08 Thread Chris Withers

Andrew Milton wrote:

| haha...do you have the need to accept any customer? :-)

No, but, you can't just turn them away either d8)


Yeah, but I'm sure we'd all need customers like him about as much as a 
hole in the head made with a rusty cork-screw ;-)


Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
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] repozo.py

2006-03-08 Thread Chris Withers

Dennis Allison wrote:
I assume that the they are backward compatible and that the repozo.py 
shipped with Zope 2.9.0 is compatible with all variations of the Data.fs

format.


I would play it safe and use the repozo.py appropriate for each version 
of Zope you're using to drive each ZEO server...


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
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] Help needed to simplify some code

2006-03-08 Thread Chris Withers

John Poltorak wrote:


Several months ago someone provided me with me with some sample code which 
did exactly what I wanted, but looking at it again it looks a little 
unwieldy and could do with tidying up. It consists of:-




   
  
   



Okay, if you can get parse_file to return a list of dictionaries like:
[
  {
   'folder':'whatever',
   'label':'whatever',
  }
]
...then you can do:



  

  


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
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] Re: Need Urgent Help

2006-03-08 Thread Max M

Andrew Milton wrote:

+---[ Andreas Jung ]--
| 
| But learn to post before posting again.

| Subjects like "need urgent help" + cross-postings are the first step
| for a consultant to throw such a posting into the trashcan.

Actually we rub our hands together and triple our rate d8)



LOL!


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

___
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] TAL tutorial

2006-03-08 Thread Sascha Welter
(Tue, Mar 07, 2006 at 12:00:05PM -0500) [EMAIL PROTECTED] wrote/schrieb/egrapse:
> From: John Poltorak <[EMAIL PROTECTED]>
> Subject: [Zope] TAL tutorial
> 
> Can anyone point me to a good TAL tutorial for people who have difficulty 
> getting to grips with it?

Assuming you have read and practiced the 2 chapters on ZPT in the Zope
book I would also recommend peterbe's "DTML2ZPT Conversion examples",
even if you have never done DTML, these are a collection of common code
snippets:
http://www.zope.org/Members/peterbe/DTML2ZPT

After that keep in mind that anything complicated enough to need 
"python:" in a TAL statement should likely be moved out to a python
method. (That could be either a python script through the ZMI, or even
better a method of your filesystem based python product.) The results of
the python method can then be placed in the option space and accessed
very easily from the ZPT. A common usage scheme is to always call the
python method through the web, which assembles all needed data and then
returns the ZPT with the data as parameters.

Have fun!

Regards,

Sascha

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