I have an event manager that is a bit like a database driven pydispatch combined with a general logging/monitoring app. Embarassingly enough I wrote it before learning about pydispatch and signals. So much for not reinventing the wheel. It keeps track of various events, calls registered callback functions on those events, and depending on settings for that event type it may log it to the database, syslog, or cache it for a period of time waiting for a related event.
It's django model aware for logging of object types, keys and model specific info by use of a mixin class (which references the manager) to go along with models.Model. That has a side effect of causing the manager to load before all of the model relations are complete, making getting the configuration from the database tricky if I want to use the orm. There are a number of possible hacks I think will work to get around it for this, but it just seemed like a 'django is ready, do your own init if you want to' signal would make the most sense if it existed. For now I just don't allow any event at module level, and the first event logged triggers a sync with the database when it doesn't fnd the information in the cache. I'll probably just keep it this way so I can periodically requery the database for updated configuration when the cache expires. I hope this isn't being posted twice, but it's been an hour or two and the original reply hasn't found its way here yet. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---