I currently have the following interface:

def start_extension():
    pass

def shutdown_extension():
    pass

def create_extension_model():
    pass


Each extension is expected to check a config variable to determine whether it is enabled. If not enabled, start_extension & shutdown_extension should be NOPs.

At the moment, the Visit Tracking and Identity extensions call create_extension_model from start_extension, because there's no support in tg-admin for "model create".

Unless I hear objections, I'll be committing these changes in the morning.

One minor side effect, I've removed the turbogears.visit.plugins entrypoint. Visit Tracking plugins should register via a call to enable_visit_plugin (Identity does this in its start_extension function if identity.on==True).

--
Jeff Watkins
http://newburyportion.com/

"Computers are like Old Testament gods; lots of rules and no mercy."
-- Joseph Campbell


Reply via email to