[Grok-dev] Manipulating the Grok ZODB via Script.
jure
jcerjak at termitnjak.si
Wed Jul 14 08:26:58 EDT 2010
On 07/12/2010 10:33 AM, Jan-Wijbrand Kolman wrote:
> On 7/12/10 9:33 AM, Achim Domma wrote:
>
>> Am 12.07.2010 um 06:55 schrieb Jasper Spaans:
>>
>>
>>> Sure, not a problem. Start by setting up a connection to your ZODB, and fetching the root object:
>>>
>> [...]
>>
>>> Now you can add any object you like:
>>>
>> [...]
>>
>>> After this, you can start your grok application and everything should be in place.
>>>
>> Sounds quite simple, but isn't it too simple? What about groking my classes and the Grok infrastructure? I guess if I create an application like this, no events are fired, no local utilities are created, ... Or am I wrong?
>>
> That's exactly what is taken care of when using
> ./bin/interactive_debugger [somescript.py]. The application is
> completely setup like when actually running it as a web application
> including all component configuration.
>
> regards, jw
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev
>
Hi,
I tried this script method, the method with an event handler for the
ObjectCreated event of the application and creating the objects in
__init__ method of my app, but in all cases the newly created objects
didn't get an IntId assigned, which happens normally if I create an
object with an AddForm. I thought that maybe I have to trigger the
appropriate events manually with grok.notify, but that didn't help. Can
you help a brother out?
regards,
jure
More information about the Grok-dev
mailing list