Package container
source code
Container classes are classes that are used to transport data between the
model thread and the GUI thread.
When complex data sets need to be visualized (eg.: charts, intervals), built-in
python types don't contain enough information, while dictionary like structures
are not self documented. Hence the need of specialized container classes to
transport this data between the model and the GUI.
To use this classes :
1. On your model class, define properties returning a container class
2. In the admin class, add the property to the list of fields to visualize, and
specify its delegate
eg:
class MyEntity(Entity):
@property
def my_interval(self):
return IntervalsContainer()
class Admin(EntityAdmin):
form_display = ['my_interval']
field_attributes = dict(my_interval=dict(delegate=IntervalsDelegate))
|
Container
Top level class for all container classes
|
|
Interval
Helper class for IntervalsContainer, specifications for one interval
|
|
IntervalsContainer
Containter to hold interval data
|
|
__package__ = None
hash(x)
|