Re: Debug-Modus REQUEST erzeugen?

Raphael Ritz <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
Peter Zechmeister wrote:
> Hm...
> danke für die rasche Antwort,
> geht aber noch nicht ganz.

Seltsam. Ich mache das normalerweise auch
so wie Andreas und komm damit (meistens) durch.

[..]
>     rtn = self.getObjAttrValue( self.getObjAttr( 'attr_type'),
> self.REQUEST)
> AttributeError: REQUEST
> 
> wenn ich aber das mache:
>>>> app.REQUEST={}
> funktioniert danach der Funktionsaufruf von oben.
> 
> Nur will ich da keinen Schaden an der DB anrichten. Wenn ich später ein
> commit mache, will ich ja nicht, dass dieses REQUEST={} irgendwo in der
> DB landet. Ist diese Befürchtung gerechtfertigt?

Add

   del app.REQUEST

vor dem commit und das sollte es sein.

Raphael


> 
> Grü
> PeterZ
> 
> 
> Am Mittwoch, den 21.01.2009, 15:32 +0100 schrieb Andreas Jung:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 21.01.2009 15:28 Uhr, Peter Zechmeister wrote:
>>> Hallo,
>>>
>>> ich möchte mich mit der Zope-Debug-Console etwas näher anfreunden.
>>>
>>> Wir verwenden das ZMS. Sehr viele Funktionen verlangen nach dem REQUEST
>>> als Parameter.
>>> Wenn ich in der Console bin und so eine Funktion auf ein Objekt anwende,
>>> woher nehme ich da das REQUEST-Objekt? Wie kann man das erzeugen?
>>>
>>> manches kann man so aufrufen:
>>>
>>> obj.eineFunktion(REQUEST={})
>>>
>>> aber machmal wird der REQUEST in einer Funktion auch aus self geholt:
>>>
>>> if ob.meta_type == 'ZMSLinkElement' and ob.isEmbedded( self.REQUEST):
>>>
>>> da geht das dann irgendwie nicht.
>>>
>>>
>>   from Testing import makerequest
>>   app=makerequest.makerequest(app)
>>
>> - -aj
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.9 (Darwin)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAkl3MeUACgkQCJIWIbr9KYwb7wCfWySdXj/5YM5ej0WRoFVgCuOg
>> 2cYAoIuT9x8nT3jA7hnZbYSVdNpbxi+7
>> =oGeb
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> zope mailing list
>> [email protected]
>> https://mail.dzug.org/mailman/listinfo/zope
>>
>> ------------------------------------------------------------------------
>>
>>
>>
>> _______________________________________________
>> zope mailing list
>> [email protected]
>> https://mail.dzug.org/mailman/listinfo/zope



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.