Display objects
The ListView and DetailView views have an enhanced fields attribute.
The list view defaults to just show the object string; set it to
Noneto show all fieldsThe default view defaults to show all fields
The
fieldsattribute is normally a list of strings for the field namesEnhanced display fields also support a
DisplayValueinstance
Fastview provides the following DisplayValue types:
AttributeValue- show an attribute of the object. The following are equivalent:fields = ["name"] fields = [AttributeValue("name")]
An
AttributeValuecan also take a label, egAttributeValue("user", label="Name")ObjectValue- convert the object to a string usingstr(object)
Create a custom display value by subclassing one of those or the base DisplayValue
class.