def model(self, typename, **kwargs): if 'client' not in kwargs and self.bbclient: kwargs['client'] = self.bbclient model = bbmodel.make_model(typename, **kwargs) model.set('doc', self.docid) self.models[model.id] = model return model
def model(self, typename, **kwargs): if 'client' not in kwargs and self.bbclient: kwargs['client'] = self.bbclient model = bbmodel.make_model(typename, **kwargs) model.set('doc', self.docid) if hasattr(self, "apikey"): model.set('script_inject_escaped', script_inject_escaped( self, model.id, typename)) self.models[model.id] = model return model
def model(self, typename, **kwargs): if 'client' not in kwargs and self.bbclient: kwargs['client'] = self.bbclient model = bbmodel.make_model(typename, **kwargs) model.set('doc', self.docid) if hasattr(self, "apikey"): model.set('script_inject_escaped', script_inject_escaped(self, model.id, typename)) self.models[model.id] = model return model