Re: [Zope] Another "Structure" Problem

2007-08-16 Thread Chris Withers

[EMAIL PROTECTED] wrote:



Yes, it's sloppy, but I'm trying to resolve one problem at a time. Once it's 
working, I'll make it cleaner ;)


No, it's insane. You have *absolutely* no business passing html round 
like this>


Stop and totally rethink what you are doing...

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] Another "Structure" Problem

2007-08-16 Thread tonylabarbara

It's insane. It's working. Now that it's working, I can take my time, sit down 
and figure out a good, clean solution. But at least I've got the darn thing 
working!

Thanks for your help, Chris.

Tony


-Original Message-
From: Chris Withers <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Thu, 16 Aug 2007 3:33 am
Subject: Re: [Zope] Another "Structure" Problem



[EMAIL PROTECTED] wrote:?
> ?
> > Yes, it's sloppy, but I'm trying to resolve one problem at a time. Once 
> > it's working, I'll make it cleaner ;)?
?
No, it's insane. You have *absolutely* no business passing html round like 
this>?
?
Stop and totally rethink what you are doing...?
?
Chris?
?
-- Simplistix - Content Management, Zope & Python Consulting?
? - http://www.simplistix.co.uk?



AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.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] URL_Rewrite

2007-08-16 Thread Garito
This is another problem. You need to import url_quote in order to use it

But my help was about the error you send

See u

2007/8/16, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> Your solution didn't work. It throws an error, stating "url_quote" is not
> defined. Actually, the solution I posted below *did* work, but I needed to
> clean up the code being tossed around (I found a mistake).
> Thanks,
> Tony
>
>
> -Original Message-
> From: Garito <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Sent: Thu, 16 Aug 2007 12:49 am
> Subject: Re: [Zope] URL_Rewrite
>
>  python: url_quote(path('here/CheckOutAfterEditStuff'))
>
> Cheers
>
> 2007/8/15, [EMAIL PROTECTED] < [EMAIL PROTECTED]>:
> >
> > I have this line of code:
> >
> >  > tal:attributes="href
> > string:${here/renumberTheCart/absolute_url}?doc=${x}">test
> >
> > but I get this error:
> >
> > *Error Type: NameError
> > Error Value: name 'CheckOutAfterEditStuff' is not defined*
> >
> > So I tried this:
> >
> >  > tal:attributes="href
> > string:${here/renumberLarimanCart/absolute_url}?doc=${x}">test
> >
> > and I got the same error, although now it can't find "Our_Store". Now,
> > "Our_Store" is the container for this PT and "CheckOutAfterEditStuff" is in
> > the same container. What am I doing wrong?
> > TIA,
> > Tony
> > --
> > AOL now offers free email to everyone. Find out more about what's free
> > from AOL at *AOL.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 )
> >
> >
>
>
> --
> Mis Cosas
> http://blogs.sistes.net/Garito
>  --
> AOL now offers free email to everyone. Find out more about what's free
> from AOL at *AOL.com* .
>



-- 
Mis Cosas
http://blogs.sistes.net/Garito
___
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] URL_Rewrite

2007-08-16 Thread Peter Bengtsson

In TAL this::

 python:url_quote(here/Our_Store/CheckOutAfterEditStuff)"

means

  here  Our_Store  CheckOutAfterEditStuff

What you need is::

 python:url_quote(here.Our_Store.CheckOutAfterEditStuff())"

[EMAIL PROTECTED] wrote:

I have this line of code:

tal:attributes="href 
string:${here/renumberTheCart/absolute_url}?doc=${x}">test


but I get this error:

*Error Type: NameError
Error Value: name 'CheckOutAfterEditStuff' is not defined*

So I tried this:

tal:attributes="href 
string:${here/renumberLarimanCart/absolute_url}?doc=${x}">test


and I got the same error, although now it can't find "Our_Store". Now, 
"Our_Store" is the container for this PT and "CheckOutAfterEditStuff" is 
in the same container. What am I doing wrong?

TIA,
Tony

AOL now offers free email to everyone. Find out more about what's free 
from AOL at *AOL.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 )


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] Zope 3 Foliage Sprint

2007-08-16 Thread Stephan Richter
Hi everyone,

it has been over a year, since we had a conference-independent fully Zope 3 
focused sprint. And I think it is time to have one! :-)

Thanks to JSA Tech, there will be a sprint between September 24-28, 2007 right 
in the center of historical Concord, Massachusetts. We have reserved a big 
room where we can easily fit 35 people. For details, go to the link below:

http://wiki.zope.org/zope3/FoliageSprint

Now that some fairly large Zope 3 projects are in production, this will be a 
great opportunity to share our experiences, to learn from each other and 
discuss new directions that we would like to go. Upon request, I will also 
give some of my Zope 3 training sessions during the sprint. So I envision the 
sprint to be interesting for any level of Zope 3 developer, from the beginner 
to the expert.

So sign up now! Just add yourself to the list of participants in the Wiki or 
send me an E-mail, if you can't.

Regards,
Stephan
___
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] URL_Rewrite

2007-08-16 Thread Garito
Or as I previously say:

python: url_quote(path("here/Our_Store/CheckOutAfterEditStuff"))

Where path is a method that evaluates a string as a tales expresion like
this

2007/8/16, Peter Bengtsson <[EMAIL PROTECTED]>:
>
> In TAL this::
>
>   python:url_quote(here/Our_Store/CheckOutAfterEditStuff)"
>
> means
>
>here  Our_Store  CheckOutAfterEditStuff
>
> What you need is::
>
>   python:url_quote(here.Our_Store.CheckOutAfterEditStuff())"
>
> [EMAIL PROTECTED] wrote:
> > I have this line of code:
> >
> >  > tal:attributes="href
> > string:${here/renumberTheCart/absolute_url}?doc=${x}">test
> >
> > but I get this error:
> >
> > *Error Type: NameError
> > Error Value: name 'CheckOutAfterEditStuff' is not defined*
> >
> > So I tried this:
> >
> >  > tal:attributes="href
> > string:${here/renumberLarimanCart/absolute_url}?doc=${x}">test
> >
> > and I got the same error, although now it can't find "Our_Store". Now,
> > "Our_Store" is the container for this PT and "CheckOutAfterEditStuff" is
> > in the same container. What am I doing wrong?
> > TIA,
> > Tony
> > 
> > AOL now offers free email to everyone. Find out more about what's free
> > from AOL at *AOL.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 )
>
> --
> Peter Bengtsson,
> work www.fry-it.com
> home www.peterbe.com
> hobby www.issuetrackerproduct.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 )
>



-- 
Mis Cosas
http://blogs.sistes.net/Garito
___
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] cannot access POST content in Zope

2007-08-16 Thread Manuel Spuhler
Hello,

I am trying to record the result of a POST request sent to Plone.

I can get the content of the POST when I send the file post.xml (valid xml)

curl http://elevator.sytes.net/RSR/setSMS -d @post.xml

In this case, CONTENT_TYPE headers is set to
'application/x-www-form-urlencoded' by curl.

but the content of the POST is empty when I do

curl http://elevator.sytes.net/RSR/setSMS -H "Content-Type: text/xml"
-d @post.xml

I'm working on integrating SMS on Plone, and the external system sends
me a text/xml header, text/xml is the right type, I think, according
rfc 3023

I have been tracking the frames through tcpdump and the request looks
good before zope.

I have then parsed the code of Zope to find where I could change this,
but I can't figure it out for the moment, and maybe it's something
which need to be changed.

Could you help me to fix this please?

Best regards

Manuel Spuhler
www.rsr.ch


Zope 2.9.7-final, python 2.4.4, Plone 2.5.3
___
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] Why doesn't os.system(command) work?

2007-08-16 Thread rieh25

I have an external method like this:

import os

def ext_programm():
  os.system('notepad.exe')


But it doesn't work.

-- 
View this message in context: 
http://www.nabble.com/Why-doesn%27t-os.system%28command%29-work--tf4283613.html#a12193786
Sent from the Zope - General mailing list archive at Nabble.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] cannot access POST content in Zope

2007-08-16 Thread Andreas Jung



--On 17. August 2007 01:52:27 +0200 Manuel Spuhler 
<[EMAIL PROTECTED]> wrote:



Hello,

I am trying to record the result of a POST request sent to Plone.

I can get the content of the POST when I send the file post.xml (valid
xml)



No idea where and how you look for the uploaded content. Everything in Zope 
is available from the REQUEST. And of course you can _not_ upload something 
to the mutator method of some object. This makes zero sense. You might 
write your script that takes the data from the REQUEST and calls the API 
method e.g. a mutator method.


-aj

P.S. Plone specific questions belong to the plone-users list

pgpA7vqHUVu2q.pgp
Description: PGP signature
___
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] Why doesn't os.system(command) work?

2007-08-16 Thread Andreas Jung



--On 16. August 2007 21:21:36 -0700 rieh25 <[EMAIL PROTECTED]> wrote:



I have an external method like this:

import os

def ext_programm():
  os.system('notepad.exe')


But it doesn't work.



You can figure it out yourself by checking the return value of os.system() 
and by checking the console messages. Likely you're search path is not set 
properly.


-aj

pgpfeozwQBqH5.pgp
Description: PGP signature
___
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] Why doesn't os.system(command) work?

2007-08-16 Thread rieh25

What is a search path and how do I set it?
-- 
View this message in context: 
http://www.nabble.com/Why-doesn%27t-os.system%28command%29-work--tf4283613.html#a12194033
Sent from the Zope - General mailing list archive at Nabble.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] Why doesn't os.system(command) work?

2007-08-16 Thread Andreas Jung



--On 16. August 2007 21:58:08 -0700 rieh25 <[EMAIL PROTECTED]> wrote:



What is a search path and how do I set it?



Google "windows search path".

-aj

pgpptZy8FpD0f.pgp
Description: PGP signature
___
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] Why doesn't os.system(command) work?

2007-08-16 Thread rieh25

I think it's finding the programm because I'm using the complete path. And
when I test it using the wrong programm name, it returns a 1. But instead,
when I pass it the right name, it just hangs. In the task manager there is
an entry for the program, but it doesn't seem to execute. Thanks for the
help.

-- 
View this message in context: 
http://www.nabble.com/Why-doesn%27t-os.system%28command%29-work--tf4283613.html#a12194312
Sent from the Zope - General mailing list archive at Nabble.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] Why doesn't os.system(command) work?

2007-08-16 Thread Andrew Milton
+---[ rieh25 ]--
| 
| I think it's finding the programm because I'm using the complete path. And
| when I test it using the wrong programm name, it returns a 1. But instead,
| when I pass it the right name, it just hangs. In the task manager there is
| an entry for the program, but it doesn't seem to execute. Thanks for the
| help.

Are you trying to start an interactive windows programme, from inside a
programme started as a windows service?

Because the default mode for this, is not to show windows from apps started as
services.

-- 
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] Why doesn't os.system(command) work?

2007-08-16 Thread Andreas Jung



--On 16. August 2007 22:40:45 -0700 rieh25 <[EMAIL PROTECTED]> wrote:



I think it's finding the programm because I'm using the complete path. And
when I test it using the wrong programm name, it returns a 1. But instead,
when I pass it the right name, it just hangs. In the task manager there is
an entry for the program, but it doesn't seem to execute. Thanks for the
help.



You're misusing Zope is an evil way. External methods are not designed to 
start desktop apps. Don't do that - unless you know what you are doing.

The right approach would be to trigger the start of an application through
an URL handler or something like that. Basically "ExternalEditor" (your 
magic search term) would be a good starting point.


-aj

pgphMp6Kiixli.pgp
Description: PGP signature
___
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 )