def get_form_field_class(model_field):

    FIELD_MAPPING = {
        IntField: forms.IntegerField,
        StringField: forms.CharField,
        FloatField: forms.FloatField,
        BooleanField: forms.BooleanField,
        DateTimeField: forms.DateTimeField,
        DecimalField: forms.DecimalField,
        URLField: forms.URLField,
        EmailField: forms.EmailField
    }

    return FIELD_MAPPING.get(model_field.__class__, forms.CharField)
This method will reset reference counts for aliases so that they match
dataset/ETHPy150Open jazzband/django-mongonaut/mongonaut/forms/widgets.py/get_form_field_class--crossover with--dataset/ETHPy150Open django/django/django/db/models/sql/query.py/Query.reset_refcounts