Package s3 :: Module s3filter :: Class S3DateFilter
[frames] | no frames]

Class S3DateFilter

source code

    object --+        
             |        
S3FilterWidget --+    
                 |    
     S3RangeFilter --+
                     |
                    S3DateFilter


Date Range Filter Widget
- use a single field or a pair of fields for start_date/end_date

Configuration options:

@keyword label: label for the widget
@keyword comment: comment for the widget
@keyword hidden: render widget initially hidden (="advanced" option)

@keyword fieldtype: explicit field type "date" or "datetime" to
                    use for context or virtual fields
@keyword hide_time: don't show time selector

Instance Methods
 
data_element(self, variables)
Overrides S3FilterWidget.data_element(), constructs multiple hidden INPUTs (one per variable) with element IDs of the form <id>-<operator>-data (where no operator is translated as "eq").
source code
 
ajax_options(self, resource)
Method to Ajax-retrieve the current options of this widget
source code
 
widget(self, resource, values)
Render this widget as HTML helper object(s)
source code

Inherited from S3FilterWidget: __call__, __init__, variable

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

Class Variables
  operator = ["ge", "le"]
  input_labels = {"ge": "From", "le": "To"}

Inherited from S3FilterWidget: alternatives

Properties

Inherited from object: __class__

Method Details

data_element(self, variables)

source code 

Overrides S3FilterWidget.data_element(), constructs multiple hidden INPUTs (one per variable) with element IDs of the form <id>-<operator>-data (where no operator is translated as "eq").

Parameters:
  • variables - the variables
Overrides: S3FilterWidget.data_element

ajax_options(self, resource)

source code 

Method to Ajax-retrieve the current options of this widget

Parameters:
  • resource - the S3Resource
Overrides: S3RangeFilter.ajax_options

widget(self, resource, values)

source code 

Render this widget as HTML helper object(s)

Parameters:
  • resource - the resource
  • values - the search values from the URL query
Overrides: S3FilterWidget.widget

Class Variable Details

operator

Value:
["ge", "le"]

input_labels

Value:
{"ge": "From", "le": "To"}