(cls, backend_id, api_id=None, is_couch_id=False, include_deleted=False)
backend_id - the pk of the SQLMobileBackend to load
        api_id - if you know the hq_api_id of the SQLMobileBackend, pass it
                 here for a faster lookup; otherwise, it will be looked up
                 automatically
        is_couch_id - if True, then backend_id should be the couch_id to use
                   during lookup instead of the postgres model's pk;
                   we have to support both for a little while until all
                   foreign keys are migrated over
backend_id - the pk of the SQLMobileBackend to load
        api_id - if you know the hq_api_id of the SQLMobileBackend, pass it
                 here for a faster lookup; otherwise, it will be looked up
                 automatically
        is_couch_id - if True, then backend_id should be the couch_id to use
                   during lookup instead of the postgres model's pk;
                   we have to support both for a little while until all
                   foreign keys are migrated over
backend_id - the pk of the SQLMobileBackend to load api_id - if you know the hq_api_id of the SQLMobileBackend pass it here for a faster lookup ; otherwise it will be looked up automatically is_couch_id - if True then backend_id should be the couch_id to use during lookup instead of the postgres model s pk ; we have to support both for a little while until all foreign keys are migrated over
def load(cls, backend_id, api_id=None, is_couch_id=False, include_deleted=False):
        """
        backend_id - the pk of the SQLMobileBackend to load
        api_id - if you know the hq_api_id of the SQLMobileBackend, pass it
                 here for a faster lookup; otherwise, it will be looked up
                 automatically
        is_couch_id - if True, then backend_id should be the couch_id to use
                   during lookup instead of the postgres model's pk;
                   we have to support both for a little while until all
                   foreign keys are migrated over
        """
        backend_classes = smsutil.get_sms_backend_classes()
        api_id = api_id or cls.get_backend_api_id(backend_id, is_couch_id=is_couch_id)

        if api_id not in backend_classes:
            raise BadSMSConfigException("Unexpected backend api id found '%s' for "
                                        "backend '%s'" % (api_id, backend_id))

        klass = backend_classes[api_id]

        if include_deleted:
            result = klass.objects
        else:
            result = klass.active_objects

        if is_couch_id:
            return result.get(couch_id=backend_id)
        else:
            return result.get(pk=backend_id)
def load ( cls , backend_id , api_id = None , is_couch_id = False , include_deleted = False ) : backend_classes = smsutil . get_sms_backend_classes ( ) api_id = api_id or cls . get_backend_api_id ( backend_id , is_couch_id = is_couch_id ) if api_id not in backend_classes : raise BadSMSConfigException ( "Unexpected backend api id found '%s' for " "backend '%s'" % ( api_id , backend_id ) ) klass = backend_classes [ api_id ] if include_deleted : result = klass . objects else : result = klass . active_objects if is_couch_id : return result . get ( couch_id = backend_id ) else : return result . get ( pk = backend_id )