Re: [Zope] use path function on a python script

2008-10-08 Thread Garito
I'm agree with you, Tino. Plone has a lot of ugly features (as KSS, for
instance)

Perhaps someone has a better solution for this issue

I only want to generate a PDF with the print view of a plone point

Plone2PDF will be ok but only works with Plone 2.5 or less

2008/10/8 Tino Wildenhain <[EMAIL PROTECTED]>

> Garito wrote:
>
>>
>>
>> 2008/10/8 Tino Wildenhain <[EMAIL PROTECTED] > >>
>>
>>Garito wrote:
>>
>>Perhaps is better if I explain you what I'm trying to do
>>
>>Imagine a Plone site (I know there are a plone list but this is
>>a generic question, sorry if not)
>>
>>I configure it in the way if you put a parameter ?print the
>>plone point renders as when you push the print button at the
>>bottom of the point
>>
>>For example: plone_site_url/front-page?print renders the plone
>>front page with the print.css sytle
>>
>>Now I want to get the rendered code of this point as string to
>>pass it to PDFNode.renderAsPdf (it expect a string with the HTML
>>and the name of the generated pdf)
>>
>>Did you know how can I get the html code of an url with get
>>parameters?
>>
>>
>>just context['front-page'](print=True) ?
>>
>>
>> Perhaps but this puts print on options/args/print or options/print in the
>> page_template scope, isn't it?
>>
>> In my way to solve this I use request/form/print because plone_css use tal
>> expressions and request is passed to it
>>
>
> This would be very ugly. However in this case just set context.REQUEST
> or context.REQUEST.form accordingly
>
> HTH
> Tino
>



-- 
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670
___
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] use path function on a python script

2008-10-08 Thread Tino Wildenhain

Garito wrote:



2008/10/8 Tino Wildenhain <[EMAIL PROTECTED] >

Garito wrote:

Perhaps is better if I explain you what I'm trying to do

Imagine a Plone site (I know there are a plone list but this is
a generic question, sorry if not)

I configure it in the way if you put a parameter ?print the
plone point renders as when you push the print button at the
bottom of the point

For example: plone_site_url/front-page?print renders the plone
front page with the print.css sytle

Now I want to get the rendered code of this point as string to
pass it to PDFNode.renderAsPdf (it expect a string with the HTML
and the name of the generated pdf)

Did you know how can I get the html code of an url with get
parameters?


just context['front-page'](print=True) ?


Perhaps but this puts print on options/args/print or options/print in 
the page_template scope, isn't it?


In my way to solve this I use request/form/print because plone_css use 
tal expressions and request is passed to it


This would be very ugly. However in this case just set context.REQUEST
or context.REQUEST.form accordingly

HTH
Tino


smime.p7s
Description: S/MIME Cryptographic 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] use path function on a python script

2008-10-08 Thread Garito
Everything can be possible but I like non-intrusive solutions and modify the
portal_css will be a heavy-intrusive way

I'm thinking about it but if someone has an *as non-intrusive as possible*
solution will be very appreciate

Thanks!

2008/10/8 Andreas Jung <[EMAIL PROTECTED]>

> Am 08.10.2008 7:36 Uhr, Garito schrieb:
>
>> Sorry Andreas but I can't modify portal_css
>>
>
> Everything can be modified.
>
> -aj
>



-- 
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670
___
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] use path function on a python script

2008-10-08 Thread Andreas Jung

Am 08.10.2008 7:36 Uhr, Garito schrieb:

Sorry Andreas but I can't modify portal_css


Everything can be modified.

-aj
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[EMAIL PROTECTED]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

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


Re: [Zope] use path function on a python script

2008-10-08 Thread Garito
Sorry Andreas but I can't modify portal_css

2008/10/8 Andreas Jung <[EMAIL PROTECTED]>

> Am 08.10.2008 7:17 Uhr, Garito schrieb:
>
>>
>>
>> 2008/10/8 Tino Wildenhain <[EMAIL PROTECTED] > >>
>>
>>Garito wrote:
>>
>>Perhaps is better if I explain you what I'm trying to do
>>
>>Imagine a Plone site (I know there are a plone list but this is
>>a generic question, sorry if not)
>>
>>I configure it in the way if you put a parameter ?print the
>>plone point renders as when you push the print button at the
>>bottom of the point
>>
>>For example: plone_site_url/front-page?print renders the plone
>>front page with the print.css sytle
>>
>>Now I want to get the rendered code of this point as string to
>>pass it to PDFNode.renderAsPdf (it expect a string with the HTML
>>and the name of the generated pdf)
>>
>>Did you know how can I get the html code of an url with get
>>parameters?
>>
>>
>>just context['front-page'](print=True) ?
>>
>>
>> Perhaps but this puts print on options/args/print or options/print in
>> the page_template scope, isn't it?
>>
>> In my way to solve this I use request/form/print because plone_css use
>> tal expressions and request is passed to it
>>
>
> Then fix your code in a way to accept parameters either from request or
> options. The '|' operator is your friend in TALES.
>
>
> -aj
>
> --
> ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
> Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
> Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
> Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
> 
> E-Publishing, Python, Zope & Plone development, Consulting
>
>


-- 
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670
___
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] use path function on a python script

2008-10-08 Thread Andreas Jung

Am 08.10.2008 7:17 Uhr, Garito schrieb:



2008/10/8 Tino Wildenhain <[EMAIL PROTECTED] >

Garito wrote:

Perhaps is better if I explain you what I'm trying to do

Imagine a Plone site (I know there are a plone list but this is
a generic question, sorry if not)

I configure it in the way if you put a parameter ?print the
plone point renders as when you push the print button at the
bottom of the point

For example: plone_site_url/front-page?print renders the plone
front page with the print.css sytle

Now I want to get the rendered code of this point as string to
pass it to PDFNode.renderAsPdf (it expect a string with the HTML
and the name of the generated pdf)

Did you know how can I get the html code of an url with get
parameters?


just context['front-page'](print=True) ?


Perhaps but this puts print on options/args/print or options/print in
the page_template scope, isn't it?

In my way to solve this I use request/form/print because plone_css use
tal expressions and request is passed to it


Then fix your code in a way to accept parameters either from request or 
options. The '|' operator is your friend in TALES.



-aj

--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK

E-Publishing, Python, Zope & Plone development, Consulting

begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[EMAIL PROTECTED]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

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


Re: [Zope] use path function on a python script

2008-10-08 Thread Garito
2008/10/8 Tino Wildenhain <[EMAIL PROTECTED]>

> Garito wrote:
>
>> Perhaps is better if I explain you what I'm trying to do
>>
>> Imagine a Plone site (I know there are a plone list but this is a generic
>> question, sorry if not)
>>
>> I configure it in the way if you put a parameter ?print the plone point
>> renders as when you push the print button at the bottom of the point
>>
>> For example: plone_site_url/front-page?print renders the plone front page
>> with the print.css sytle
>>
>> Now I want to get the rendered code of this point as string to pass it to
>> PDFNode.renderAsPdf (it expect a string with the HTML and the name of the
>> generated pdf)
>>
>> Did you know how can I get the html code of an url with get parameters?
>>
>
> just context['front-page'](print=True) ?


Perhaps but this puts print on options/args/print or options/print in the
page_template scope, isn't it?

In my way to solve this I use request/form/print because plone_css use tal
expressions and request is passed to it

>
>
> or something? (Am I the only one which does not see value in a print
> button because there is CSS to make this happen without server
> interaction? )


Yes, this work as you think but if you need the same view (the print view)
in the server side you need to change portal_css

>
>
> Regards
> Tino
>



-- 
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670
___
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] use path function on a python script

2008-10-08 Thread Tino Wildenhain

Garito wrote:

Perhaps is better if I explain you what I'm trying to do

Imagine a Plone site (I know there are a plone list but this is a 
generic question, sorry if not)


I configure it in the way if you put a parameter ?print the plone point 
renders as when you push the print button at the bottom of the point


For example: plone_site_url/front-page?print renders the plone front 
page with the print.css sytle


Now I want to get the rendered code of this point as string to pass it 
to PDFNode.renderAsPdf (it expect a string with the HTML and the name of 
the generated pdf)


Did you know how can I get the html code of an url with get parameters?


just context['front-page'](print=True) ?

or something? (Am I the only one which does not see value in a print
button because there is CSS to make this happen without server
interaction? )

Regards
Tino


smime.p7s
Description: S/MIME Cryptographic 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] use path function on a python script

2008-10-08 Thread Garito
Perhaps is better if I explain you what I'm trying to do

Imagine a Plone site (I know there are a plone list but this is a generic
question, sorry if not)

I configure it in the way if you put a parameter ?print the plone point
renders as when you push the print button at the bottom of the point

For example: plone_site_url/front-page?print renders the plone front page
with the print.css sytle

Now I want to get the rendered code of this point as string to pass it to
PDFNode.renderAsPdf (it expect a string with the HTML and the name of the
generated pdf)

Did you know how can I get the html code of an url with get parameters?

2008/10/8 Andreas Jung <[EMAIL PROTECTED]>

> Am 08.10.2008 4:46 Uhr, Garito schrieb:
>
>> Hi!
>> How can I import the TALES funcion path on a python script?
>>
>> I would like to use the path function on a python script. The same path
>> function I can use on page templates
>>
>> Imagine this TALES expression: python: path("a/concrete/path")
>>
>> Can I use it on a python script?
>>
>
> Why can't you use acquisition or traversal?
>
> -aj
>



-- 
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670
___
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] use path function on a python script

2008-10-08 Thread Andreas Jung

Am 08.10.2008 4:46 Uhr, Garito schrieb:

Hi!
How can I import the TALES funcion path on a python script?

I would like to use the path function on a python script. The same path
function I can use on page templates

Imagine this TALES expression: python: path("a/concrete/path")

Can I use it on a python script?


Why can't you use acquisition or traversal?

-aj
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[EMAIL PROTECTED]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

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


[Zope] use path function on a python script

2008-10-08 Thread Garito
Hi!
How can I import the TALES funcion path on a python script?

I would like to use the path function on a python script. The same path
function I can use on page templates

Imagine this TALES expression: python: path("a/concrete/path")

Can I use it on a python script?

Thanks!

-- 
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670
___
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 )