| this means that either: | | this means that either: |
| | | |
| - a column type in a list can be displayed more th | | - a column type in a list can be displayed more th |
| an once with a different "setting" | | an once with a different "setting" |
| - or that users can dynamically add a new column t | | - or that users can dynamically add a new column t |
| ype to the list | | ype to the list |
| | | |
t | | t |
|
| | | # column configuration
|
| | |
|
| | | the basic column types are hard coded in python co |
| | | de - just like newforms or models.
|
| | |
|
| | | all "advanced object lists" and their columns need |
| | | to be stateless - the user configuration (column |
| | | config, sorting) is stored in the session (or simi |
| | | lar)
|
| | |
|
| | | an example advanced object list definition could l |
| | | ook like:
|
| | |
|
| | | from sphene.generic import advanced_object_lis |
| | | t as objlist
|
| | | class TaskList(objlist.AdvancedObjectList):
|
| | | summary = objlist.AttributeColumn('summary |
| | | ', sortcolumn = 'summary')
|
| | | status = objlist.AttributeColumn('owner')
|
| | | tagcol = TagCategoryColumn()
|
| | |
|
| | | an example configuration (json encoded) might look |
| | | like:
|
| | |
|
| | | ( "summary", "status", { 'column': 'tagcol', ' |
| | | tagcategory': 'priority' }, )
|
| | |
|
| | | the following conditions must be met:
|
| | |
|
| | | - only columns listed in the configuration are |
| | | displayed
|
| | | - ... in the order they are configured
|
| | | - if the config value is a dictionary the valu |
| | | es must be passed 1:1 to the column who's name is |
| | | defined in 'column'
|
| | | - if the config value is a list it should be c |
| | | onsidered nested columns (two values in one column |
| | | )
|
| | | - another implementation possibility would |
| | | be to create a 'MultiValueColumn' and pass a dict |
| | | value to it configuring "sub columns" .. but i th |
| | | ink mult-value columns should be integrated right |
| | | into the 'advanced object list'.
|