Package s3 :: Module s3report :: Class S3Report
[frames] | no frames]

Class S3Report

source code

     object --+    
              |    
s3rest.S3Method --+
                  |
                 S3Report

RESTful method for pivot table reports

Instance Methods
 
apply_method(self, r, **attr)
Page-render entry point for REST interface.
source code
 
report(self, r, **attr)
Pivot table report page
source code
 
geojson(self, r, **attr)
Render the pivot table data as a dict ready to be exported as GeoJSON for display on a Map.
source code
 
widget(self, r, method=None, widget_id=None, visible=True, **attr)
Pivot table report widget
source code
 
explore(self, r, **attr)
Ajax-lookup of representations for items contributing to the aggregate value in a pivot table cell (cell explore) - called with a body JSON containing the record IDs to represent, and the URL params for the pivot table (rows, cols, fact)
source code

Inherited from s3rest.S3Method: __call__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods
 
inject_d3()
Re-usable helper function to inject D3/NVD3 scripts into the current page
source code

Inherited from s3rest.S3Method: crud_string

Properties

Inherited from object: __class__

Method Details

apply_method(self, r, **attr)

source code 

Page-render entry point for REST interface.

Parameters:
  • r - the S3Request instance
  • attr - controller attributes for the request
Returns:
output object to send to the view
Overrides: s3rest.S3Method.apply_method

report(self, r, **attr)

source code 

Pivot table report page

Parameters:
  • r - the S3Request instance
  • attr - controller attributes for the request

geojson(self, r, **attr)

source code 

Render the pivot table data as a dict ready to be exported as GeoJSON for display on a Map.

Parameters:
  • r - the S3Request instance
  • attr - controller attributes for the request

widget(self, r, method=None, widget_id=None, visible=True, **attr)

source code 

Pivot table report widget

Parameters:
  • r - the S3Request
  • method - the widget method
  • widget_id - the widget ID
  • visible - whether the widget is initially visible
  • attr - controller attributes
Returns:
output
Overrides: s3rest.S3Method.widget

explore(self, r, **attr)

source code 

Ajax-lookup of representations for items contributing to the
aggregate value in a pivot table cell (cell explore)
- called with a body JSON containing the record IDs to represent,
  and the URL params for the pivot table (rows, cols, fact)

@param r: the S3Request instance
@param attr: controller attributes for the request

inject_d3()
Static Method

source code 

Re-usable helper function to inject D3/NVD3 scripts into the current page