from django.dispatch import dispatcher from django.db.models import signals from zilbo.common.openid.utils import getStore from zilbo.common.openid import models as openid_app def create_openid_tables(app, created_models): store = getStore() try: store.createTables() except Exception, e: print "Ignore table exists error: %s " % e dispatcher.connect(create_openid_tables, sender=openid_app, signal=signals.post_syncdb)