Get apphook configs for an object obj

    :param obj: any model instance
    :return: list of apphook configs for given obj
961736
def get_apphook_configs(obj):
    
    keys = get_apphook_field_names(obj)
    return [getattr(obj, key) for key in keys] if keys else []
708798
def list_public_methods(obj: Any):
    
    return [member for member in dir(obj)
            if not member.startswith('_') and
            callable(getattr(obj, member))]
240983
def find_field_generators(obj):
    

    cls_dict = obj.__class__.__dict__
    obj_dict = obj.__dict__
    #debug_print_dict(cls_dict, 'cls_dict')
    #debug_print_dict(obj_dict, 'obj_dict')

    field_gens = {}
    add_field_generators(field_gens, cls_dict)
    add_field_generators(field_gens, obj_dict)

    return field_gens
675361
def get_model_config_value(self, obj, name):
        """"""
        config = models_config.get_config(obj)
        return getattr(config, name)
283975
def lookup(cls, backend, obj):
        
        ids = set([el for el in obj.traverse(lambda x: x.id) if el is not None])
        if len(ids) == 0:
            raise Exception("Object does not own a custom options tree")
        elif len(ids) != 1:
            idlist = ",".join([str(el) for el in sorted(ids)])
            raise Exception("Object contains elements combined across "
                            "multiple custom trees (ids %s)" % idlist)
        return cls._custom_options[backend][list(ids)[0]]
959098
def get_object_attrs(obj):
    
    attrs = [k for k in dir(obj) if not k.startswith('__')]
    if not attrs:
        attrs = dir(obj)
    return attrs
1034491
def get_form_context(self, obj):
        
        return {
            "url": url_for("attachments.create", entity_id=obj.id),
            "form": self.Form(),
            "buttons": [UPLOAD_BUTTON],
        }
1358413
def get_class_logger(obj):
    
    return logging.getLogger(obj.__class__.__module__ + '.' + obj.__class__.__name__)
990407
function listFromOwnerApps(listByApp) {
    return app.info().
      then(function (appInfo) {
        return Promise.all(listByApp.
          filter(function (addon) {
            return addon.app.name !== appInfo.name;
          }).
          map(function (addon) {
            return client.addons(addon.name).info();
          }));
      });
  }
49664
def list_straten_adapter(obj, request):
    
    return {
        'id': obj.id,
        'label': obj.label,
        'status': {
            'id': obj.status.id,
            'naam': obj.status.naam,
            'definitie': obj.status.definitie
        },
    }
209146
def getConfig(self, key):
        
        if hasattr(self, key):
            return getattr(self, key)
        else:
            return False
359918
def item_perceel_crab_adapter(obj, request):
    
    return {
        'id': obj.id,
        'centroid': obj.centroid,
        'postadressen': obj.postadressen,
        'metadata': {
            'begin_tijd': obj.metadata.begin_tijd,
            'begin_datum': obj.metadata.begin_datum,
            'begin_bewerking': {
                'id': obj.metadata.begin_bewerking.id,
                'naam': obj.metadata.begin_bewerking.naam,
                'definitie': obj.metadata.begin_bewerking.definitie
            },
            'begin_organisatie': {
                'id': obj.metadata.begin_organisatie.id,
                'naam': obj.metadata.begin_organisatie.naam,
                'definitie': obj.metadata.begin_organisatie.definitie
            }
        }
    }
232595
def _get_app_config(self, app_name):
        

        matches = [app_config for app_config in apps.get_app_configs()
                   if app_config.name == app_name]
        if not matches:
            return
        return matches[0]
388391
def list_adresposities_adapter(obj, request):
    
    return {
        'id': obj.id,
        'herkomst': {
            'id': obj.herkomst.id,
            'naam': obj.herkomst.naam,
            'definitie': obj.herkomst.definitie
        }
    }
1014032
def _get_apphook_field_names(model):
    
    from .models import AppHookConfig  # avoid circular dependencies
    fields = []
    for field in model._meta.fields:
        if isinstance(field, ForeignKey) and issubclass(field.remote_field.model, AppHookConfig):
            fields.append(field)
    return [field.name for field in fields]
803605
def get_object_metadata(self, container, obj, prefix=None):
        
        return self._manager.get_object_metadata(container, obj, prefix=prefix)
119423
private static TagList getMonitorTags(Object obj) {
    try {
      Set<Field> fields = getFieldsAnnotatedBy(obj.getClass(), MonitorTags.class);
      for (Field field : fields) {
        field.setAccessible(true);
        return (TagList) field.get(obj);
      }

      Set<Method> methods = getMethodsAnnotatedBy(obj.getClass(), MonitorTags.class);
      for (Method method : methods) {
        method.setAccessible(true);
        return (TagList) method.invoke(obj);
      }
    } catch (Exception e) {
      throw Throwables.propagate(e);
    }

    return null;
  }