(fieldsets)
return fields or None
Get a list of all fields included in a fieldsets definition.
Get a list of all fields included in a fieldsets definition.
Get a list of all fields included in a fieldsets definition .
def get_fields_from_fieldsets(fieldsets):
    """Get a list of all fields included in a fieldsets definition."""
    fields = []
    try:
        for name, options in fieldsets:
            fields.extend(options['fields'])
    except (TypeError, KeyError):
        raise ValueError('"fieldsets" must be an iterable of two-tuples, '
                         'and the second tuple must be a dictionary '
                         'with a "fields" key')
    return fields or None
def get_fields_from_fieldsets ( fieldsets ) : fields = [ ] try : for name , options in fieldsets : fields . extend ( options [ 'fields' ] ) except ( TypeError , KeyError ) : raise ValueError ( '"fieldsets" must be an iterable of two-tuples, ' 'and the second tuple must be a dictionary ' 'with a "fields" key' ) return fields or None