[Grok-dev] Re: Keeping indexes up to date
Luciano Ramalho
luciano at ramalho.org
Sun Aug 12 17:20:12 EDT 2007
Thank you all! I've added the changed fields information, like this:
from zope.lifecycleevent import modified, Attributes
# [...]
changed = Attributes(IBook, *list(book_dict))
modified(book, changed)
...where book_dict is a dictionary with book data received from XML-RPC.
In this use case, Martijn's suggestion to use IBook instead of
individual fields was right on, because in fact this XML-RPC API is
used to load data into book objects which are completely empty except
for the ISBN.
But in the future I can see this same interface being used for
different kinds of updates, and then it will be nice to have this
optimization.
Regards,
Luciano
More information about the Grok-dev
mailing list