Re: Zugriff von einem Utility auf die Datenbank

Vladislav Vorobiev <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <CADmZVq9i3qpOqK35b7TWn4aSTCUf7+vvyBZ8SWF20fUH3b9wLA@mail.gmail.com>
Am 15. Juli 2011 16:36 schrieb Maik Derstappen, Derstappen IT
<[email protected]>:
> Am 15.07.2011 13:40, schrieb Vladislav Vorobiev:
>>
>> Hallo Maik,
>>
>> du meinst den getSite von
>> from zope.app.component.hooks?
>>
>> getSite scheint irgend ein info Objekt zusein.
>>
>> (Pdb) dir(getSite())
>> ['__class__', '__delattr__', '__doc__', '__format__',
>> '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__',
>> '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
>> '__subclasshook__']
>> (Pdb) getSite()
>> (Pdb) print getSite()
>> None
>>
>> Es erlaubt mir kein Zugrif auf den Rootbaum.
>>
> ja es kommt darauf an womit du unterwegs bist, in zope2 bekommst du mit
> getSite wie folgt:
> http://inqbus-hosting.de/support/dokumentation/docs/plone-portal-root-object-ermitteln

Hallo,

ja es ist Zope2.

(Pdb) from zope.site.hooks import getSite
(Pdb) getSite()
(Pdb) dir(getSite())
['__class__', '__delattr__', '__doc__', '__format__',
'__getattribute__', '__hash__', '__init__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
'__subclasshook__']

(Pdb) from zope.app.component.hooks import getSite
(Pdb) getSite()
(Pdb) dir(getSite())
['__class__', '__delattr__', '__doc__', '__format__',
'__getattribute__', '__hash__', '__init__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
'__subclasshook__']
(Pdb)

Weder das eine noch das andere erlaubt mir Zugriff auf  die Objekte.
Wie wendet ihr das an? Könntest du oder jemand ein Beispiel posten?


_______________________________________________
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.