Scalable universal field representation for option fields and foreign
keys. Can be subclassed and tailored to the particular model where
necessary.
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
__init__(self,
lookup=None,
key=None,
fields=None,
labels=None,
options=None,
translate=False,
linkto=None,
show_link=False,
multiple=False,
hierarchy=False,
default=None,
none=None,
field_sep=" ")
Constructor |
source code
|
|
|
__call__(self,
value,
row=None,
show_link=True)
Represent a single value (standard entry point). |
source code
|
|
|
multiple(self,
values,
rows=None,
list_type=True,
show_link=True)
Represent multiple values as a comma-separated list. |
source code
|
|
|
bulk(self,
values,
rows=None,
list_type=True,
show_link=True)
Represent multiple values as dict {value: representation} |
source code
|
|
|
render_list(self,
value,
labels,
show_link=True)
Helper method to render list-type representations from
bulk()-results. |
source code
|
|
|
|
|
|
|
link(self,
k,
v,
row=None)
Represent a (key, value) as hypertext link. |
source code
|
|