[Zope] set HTTP response in a python script

2006-12-22 Thread Daniel de la Cuesta
Hello,

How can I set a valid http response inside a python script?

Thank you!



Daniel de la Cuesta Navarrete
Técnico de Desarrollo 
FUNDACIÓN IAVANTE 
[EMAIL PROTECTED]
Tel. 951 015 300 

 

Este correo electrónico y, en su caso, cualquier fichero anexo, contiene
información confidencial exclusivamente dirigida a su(s)
  destinatario(s). Toda copia o divulgación deberá ser autorizada por
IAVANTE.





This e-mail and any attachments are confidential and exclusively
 directed to its adressee(s). Any copy or distribution will have to be
 authorized by IAVANTE.






___
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] special characters in XML

2006-12-15 Thread Daniel de la Cuesta
Hello,

I am using a page template to geneate a valid XML document, this is the
template:


http://xml.zope.org/namespaces/tal";>

  Mi mobile



The caracter "&" gives me the following error:


Compilation failed
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 3, column 38



If I remove the "&" everything goes ok. What can I do??

Thank you












___
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] conditional python expresion inside ZPT

2006-12-05 Thread Daniel de la Cuesta
Hello,

How can I insert a conditional python expresion inside a ZPT.

Example:

if (my_expresion):
toreturn = a
else:
toreturn = b

return toretun

Thank you!






___
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] Re: Specifying the target language with i18n

2006-11-24 Thread Daniel de la Cuesta
It is not necesary.

Anyway, if I specify my domain nothing happens.

- Mensaje original 
De: Josef Meile <[EMAIL PROTECTED]>
Para: zope@zope.org
Enviado: viernes, 24 de noviembre, 2006 13:03:31
Asunto: [Zope] Re: Specifying the target language with i18n

Hi Daniel,

> Hello,
> 
> I am trying to set the target language using "i18n:target" label
> 
> Example:
> 
> 
> label_search
> 
> 
> It doesn't work. I cannot specify the target language.
> 
> I am in Zope 2.9.4.
Just a guess: Don't you need to specify a domain as well?

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










__ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.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] Specifying the target language with i18n

2006-11-24 Thread Daniel de la Cuesta
Hello,

I am trying to set the target language using "i18n:target" label

Example:


label_search


It doesn't work. I cannot specify the target language.

I am in Zope 2.9.4. 

Thank you.





__ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.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] i18n tags in XML file using Page Templates

2006-11-13 Thread Daniel de la Cuesta
The error message is the following:Line 7 is exctly where the i18n tag is- Mensaje original De: Andreas Jung <[EMAIL PROTECTED]>Para: Daniel de la Cuesta <[EMAIL PROTECTED]>; zope@zope.orgEnviado: lunes, 13 de noviembre, 2006 1:51:49Asunto: Re: [Zope] i18n tags in XML file using Page Templates--On 13.
 November 2006 00:48:22 +0100 Daniel de la Cuesta <[EMAIL PROTECTED]> wrote:> Hi everybody,>> I am want to return an XML file with i18n tags using a page template.>> For example:>> > http://xml.zope.org/namespaces/tal";>> My value> >> When I use the i18n tag inside the page template I get a compilation> error.It would really help if you could include the complete *error message*.-aj
		LLama Gratis a cualquier PC del Mundo.Llamadas a fijos y móviles desde 1 céntimo por minuto.http://es.voice.yahoo.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] i18n tags in XML file using Page Templates

2006-11-12 Thread Daniel de la Cuesta



Hi everybody,
 
I am 
want to return an XML file with i18n tags using a page 
template.
 
For 
example:
 


  
  
xml version="1.0" encoding="UTF-8"?> 
  

    
My value
 
When I 
use the i18n tag inside the page template I get a compilation error. The 
problem is exactly
in the 
line where the i18n tag is.
 
I have tried to include the i18n tal 
namespace but the problem persists.
 
How can I 
generate the XML inside the page template using i18n 
tags???
 
Thank 
you!!

___
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] Path expression in Python based script

2006-09-29 Thread Daniel de la Cuesta
Hi, I am beginner working with Zope. I like it but I have some doubts:I have an structure with folders and subfoulders, each folder and subfolder has items.I want to go round this structre with a Python based script, to know the number of elements i do the following:path="animals"items=len(context.sections.path.contentValues())When I try to run the script I get an error saying that the variable "path" is not present.If i do:items=len(context.sections.animals.contentValues())everything is ok,How can I refer to a variable into a path _expression_ in a Python Based Script?Thank you. 
		LLama Gratis a cualquier PC del Mundo.Llamadas a fijos y móviles desde 1 céntimo por minuto.http://es.voice.yahoo.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 )