

def get_default_form_field_types(document, field_name, field_type):
    default_form_field_types = {
        bool: forms.BooleanField,
        int: forms.IntegerField,
        float: forms.FloatField,
        str: forms.CharField,
        unicode: forms.CharField,
        datetime.datetime: forms.DateTimeField,
        datetime.date: forms.DateField,
        datetime.time: forms.TimeField,
        list: JsonListField,
        dict: JsonField,
    }
    return default_form_field_types[field_type]

dataset/ETHPy150Open peterbe/django-mongokit/django_mongokit/forms/forms.py get_default_form_field_types/original