Exemplo n.º 1
0
def association_proxy(target_collection, attr, model_class):
  """Return an association proxy with a creator function specified."""
  return orig_association_proxy(
      target_collection,
      attr,
      creator=lambda arg: resolve_class(model_class)(**{attr: arg})
  )
def association_proxy(target_collection, attr, model_class):
  """Return an association proxy with a creator function specified."""
  #FIXME is model_class needed? can't that be determined off of reflection?!
  return orig_association_proxy(target_collection, attr, creator=\
      lambda arg: resolve_class(model_class)(**{
        attr: arg,
        }))
Exemplo n.º 3
0
def association_proxy(target_collection, attr, model_class):
    """Return an association proxy with a creator function specified."""
    #FIXME is model_class needed? can't that be determined off of reflection?!
    return orig_association_proxy(target_collection, attr, creator=\
        lambda arg: resolve_class(model_class)(**{
          attr: arg,
          }))
Exemplo n.º 4
0
def association_proxy(target_collection, attr, model_class):
    """Return an association proxy with a creator function specified."""
    return orig_association_proxy(
        target_collection,
        attr,
        creator=lambda arg: resolve_class(model_class)(**{
            attr: arg
        }))