django_any/functions.py
def split_model_kwargs(kw):
    """
    django_any birds language parser
    """
    from collections import defaultdict
    
    model_fields = {}
    fields_agrs = defaultdict(lambda : {})
    
    for key in kw.keys():
        if '__' in key:
            field, _, subfield = key.partition('__')
            fields_agrs[field][subfield] = kw[key]
        else:
            model_fields[key] = kw[key]

    return model_fields, fields_agrs
def split_model_kwargs(kw):
    """
    django_any birds language parser
    """
    from collections import defaultdict
    
    model_fields = {}
    fields_agrs = defaultdict(lambda : {})
    
    for key in kw.keys():
        if '__' in key:
            field, _, subfield = key.partition('__')
            fields_agrs[field][subfield] = kw[key]
        else:
            model_fields[key] = kw[key]

    return model_fields, fields_agrs
def split_model_kwargs ( kw ) : from collections import defaultdict model_fields = { } fields_agrs = defaultdict ( lambda : { } ) for key in kw . keys ( ) : if '__' in key : field , _ , subfield = key . partition ( '__' ) fields_agrs [ field ] [ subfield ] = kw [ key ] else : model_fields [ key ] = kw [ key ] return model_fields , fields_agrs
django_any birds language parser
django_any birds language parser