def get_fields(model_class, field_name='', path=''):
    """ Get fields and meta data from a model

    :param model_class: A django model class
    :param field_name: The field name to get sub fields from
    :param path: path of our field in format
        field_name__second_field_name__ect__
    :returns: Returns fields and meta data about such fields
        fields: Django model fields
        properties: Any properties the model has
        path: Our new path
    :rtype: dict
    """
    fields = get_direct_fields_from_model(model_class)
    app_label = model_class._meta.app_label

    if field_name != '':
        field, model, direct, m2m = _get_field_by_name(model_class, field_name)

        path += field_name
        path += '__'
        if direct:  # Direct field
            try:
                new_model = _get_remote_field(field).parent_model
            except AttributeError:
                new_model = _get_remote_field(field).model
        else:  # Indirect related field
            new_model = field.related_model

        fields = get_direct_fields_from_model(new_model)

        app_label = new_model._meta.app_label

    return {
        'fields': fields,
        'path': path,
        'app_label': app_label,
    }
Get fields and meta data from a model

    :param model_class: A django model class
    :param field_name: The field name to get sub fields from
    :param path: path of our field in format
        field_name__second_field_name__ect__
    :returns: Returns fields and meta data about such fields
        fields: Django model fields
        properties: Any properties the model has
        path: Our new path
    :rtype: dict