Пример #1
0
 def from_model(cls, model, model_field_name=None, model_field=None, **kwargs):
     return member_from_model(
         cls=cls,
         model=model,
         factory_lookup=_filter_factory_by_django_field_type,
         model_field_name=model_field_name,
         model_field=model_field,
         defaults_factory=lambda model_field: {},
         **kwargs)
Пример #2
0
 def from_model(cls, model, model_field_name=None, model_field=None, **kwargs):
     return member_from_model(
         cls=cls,
         model=model,
         factory_lookup=_filter_factory_by_django_field_type,
         model_field_name=model_field_name,
         model_field=model_field,
         defaults_factory=lambda model_field: {},  # TODO: this is wrong! but base_defaults_factory doesn't work either.. there's no display_name on Filter
         **kwargs,
     )
Пример #3
0
 def from_model(cls, model, field_name=None, model_field=None, **kwargs):
     return member_from_model(
         cls=cls,
         model=model,
         factory_lookup=_field_factory_by_field_type,
         factory_lookup_register_function=register_field_factory,
         defaults_factory=field_defaults_factory,
         field_name=field_name,
         model_field=model_field,
         **kwargs)