[Zope-dev] Unauthorized error with this code
Servizio tecnico NOMOS
tech.nomos@nomos-sw.it
Mon, 17 Sep 2001 17:23:39 +0200
Messaggio in formato MIME composto da pił parti.
------=_NextPart_000_0011_01C13F9D.7DD7E200
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
In Python:
def Funzione1():
class Trecord:
NOME =3D ''
result =3D []
r =3D Trecord()
r.NOME =3D 10 #First element
result.append(r)
r.NOME =3D 20 #Second element
result.append(r)
return result
In Zope I use this function:
<!--#with "_(qry=3DFunzione1())"-->
<!--#in qry-->
<dtml-var NOME><BR>
<!--#/in-->
<!--#/with-->
Zope don't work and ask me user name and password.
If instead write this:
<!--#with "_(qry=3DFunzione1())"-->
<!--#in qry-->
test<BR>
<!--#/in-->
<!--#/with-->
This work and diplay correctly: test test.
This problem there is only ZOPE 2.4.0, the precedent version is run OK.
Can you help ME ?
------=_NextPart_000_0011_01C13F9D.7DD7E200
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><STRONG>In =
Python:</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV><FONT size=3D2>
<DIV><FONT face=3D"Courier New">def Funzione1():</FONT></DIV>
<DIV><FONT face=3D"Courier New"> class =
Trecord:</FONT></DIV>
<DIV><FONT face=3D"Courier New"> =
NOME =3D=20
''</FONT></DIV>
<DIV><FONT face=3D"Courier New"> result =3D =
[]</FONT></DIV>
<DIV><FONT face=3D"Courier New"> r =3D =
Trecord()</FONT></DIV>
<DIV><FONT face=3D"Courier New"> r.NOME =3D 10 #First=20
element</FONT></DIV>
<DIV><FONT face=3D"Courier New"> =
result.append(r)</FONT></DIV>
<DIV><FONT face=3D"Courier New"> r.NOME =3D 20 #Second =
element</FONT></DIV>
<DIV><FONT face=3D"Courier New"> =
result.append(r)</FONT></DIV>
<DIV><FONT face=3D"Courier New"> return =
result</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial><STRONG>In Zope I use this =
function:</STRONG></FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3D"Courier New"><!--#with =
"_(qry=3DFunzione1())"--><BR> =20
<!--#in qry--><BR> <dtml-var=20
NOME><BR><BR> =20
<!--#/in--><BR><!--#/with--></FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT> </DIV>
<DIV><FONT face=3DArial><STRONG>Zope don't work and ask me user name and =
password.</STRONG></FONT></DIV>
<DIV><FONT face=3DArial><STRONG></STRONG></FONT> </DIV>
<DIV><FONT face=3DArial><STRONG>If instead write =
this:</STRONG></FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT> </DIV>
<DIV>
<DIV><FONT face=3D"Courier New"><!--#with =
"_(qry=3DFunzione1())"--><BR> =20
<!--#in qry--><BR> test<BR><BR> =20
<!--#/in--><BR><!--#/with--></FONT></DIV>
<DIV><FONT face=3D"Courier New"></FONT> </DIV></DIV>
<DIV><FONT face=3DArial><STRONG>This work and diplay correctly: test=20
test.</STRONG></FONT></DIV>
<DIV><STRONG><FONT face=3DArial></FONT></STRONG> </DIV>
<DIV><STRONG><FONT face=3DArial>This problem there is only ZOPE 2.4.0, =
the=20
precedent version is run OK.</FONT></STRONG></DIV>
<DIV><STRONG><FONT face=3DArial></FONT></STRONG> </DIV>
<DIV><STRONG><FONT face=3DArial>Can you help ME=20
?</FONT></STRONG></DIV></FONT></BODY></HTML>
------=_NextPart_000_0011_01C13F9D.7DD7E200--