Add basic docs for CSV download support in master view
This commit is contained in:
parent
d03de66b64
commit
6c0f243655
|
@ -68,6 +68,11 @@ override when defining your subclass.
|
||||||
Factory callable to be used when creating new grid instances; defaults to
|
Factory callable to be used when creating new grid instances; defaults to
|
||||||
:class:`tailbone.grids.Grid`.
|
:class:`tailbone.grids.Grid`.
|
||||||
|
|
||||||
|
.. attribute:: MasterView.results_downloadable_csv
|
||||||
|
|
||||||
|
Flag indicating whether the view should allow CSV download of grid data,
|
||||||
|
i.e. primary search results.
|
||||||
|
|
||||||
.. attribute:: MasterView.help_url
|
.. attribute:: MasterView.help_url
|
||||||
|
|
||||||
If set, this defines the "default" help URL for all views provided by the
|
If set, this defines the "default" help URL for all views provided by the
|
||||||
|
@ -85,4 +90,8 @@ subclass.
|
||||||
|
|
||||||
.. .. automethod:: MasterView.get_settings
|
.. .. automethod:: MasterView.get_settings
|
||||||
|
|
||||||
|
.. automethod:: MasterView.get_csv_fields
|
||||||
|
|
||||||
|
.. automethod:: MasterView.get_csv_row
|
||||||
|
|
||||||
.. automethod:: MasterView.get_help_url
|
.. automethod:: MasterView.get_help_url
|
||||||
|
|
|
@ -2076,7 +2076,8 @@ class MasterView(View):
|
||||||
|
|
||||||
def get_csv_fields(self):
|
def get_csv_fields(self):
|
||||||
"""
|
"""
|
||||||
Return the list of fields to be written to CSV download.
|
Return the list of fields to be written to CSV download. Default field
|
||||||
|
list will be constructed from the underlying table columns.
|
||||||
"""
|
"""
|
||||||
fields = []
|
fields = []
|
||||||
mapper = orm.class_mapper(self.model_class)
|
mapper = orm.class_mapper(self.model_class)
|
||||||
|
|
Loading…
Reference in a new issue