def db_for_read(self, model, **hints):
    if issubclass(model, Ticket
        ) and model._meta.proxy and model._meta.app_label == 'sidebar':
        return 'kayakodb'

def db_for_write(self, model, **hints):
    if issubclass(model, Ticket
        ) and model._meta.proxy and model._meta.app_label == 'sidebar':
        return 'kayakodb'
return None

def allow_relation(self, obj1, obj2, **hints):
    if self.allow_proxy_to_different_db(obj1
        ) or self.allow_proxy_to_different_db(obj2):
        return True
Django proxy model to different database