gavo.svcs.customwidgets module¶
gavo.formal custom widgets used by the DC (enumerations, table options, etc)
- class gavo.svcs.customwidgets.DBOptions(typeOb, service, queryMeta)[source]¶
Bases:
object
A widget that offers limit and sort options for db based cores.
This is for use in a formal form and goes together with the FormalDict type below.
- limitWidget = None¶
- renderImmutable(request, key, args, errors)¶
- sortWidget = None¶
- class gavo.svcs.customwidgets.DateExpressionField(*args, **kwargs)[source]¶
Bases:
StringFieldWithBlurb
- additionalMaterial = Tag('a', attributes={'href': '/static/help_vizier.shtml#dates'}, children=['[?date expr.]'])¶
- gavo.svcs.customwidgets.EnumeratedWidget(ik)[source]¶
a widget factory for input keys over enumerated columns.
This probably contains a bit too much magic, but let’s see. The current rules are:
If values.multiOk is true, render a MultiSelectChoice, else render a SelectChoice or a RadioChoice depending on how many items there are.
If ik is not required, add an ANY key evaluating to None. For MultiSelectChoices we don’t need this since for them, you can simply leave it all unselected.
If there is a default, it becomes the NoneOption.
- class gavo.svcs.customwidgets.FormalDict(name=None, required=None, missing=None, immutable=None, validators=None)[source]¶
Bases:
Type
is a formal type for dictionaries.
- class gavo.svcs.customwidgets.Interval(original)[source]¶
Bases:
object
A widget to enter an interval (lower/upper) pair of something.
As usual with formal widgets, this is constructed with the type, which must be PairOf here; we’re taking the widget we’re supposed to pair from it.
- class gavo.svcs.customwidgets.MultiSelectChoice(original, size=None, **kwargs)[source]¶
Bases:
SelectChoice
- size = 3¶
- class gavo.svcs.customwidgets.NumericExpressionField(*args, **kwargs)[source]¶
Bases:
StringFieldWithBlurb
- additionalMaterial = Tag('a', attributes={'href': '/static/help_vizier.shtml#floats'}, children=['[?num. expr.]'])¶
- class gavo.svcs.customwidgets.ScalingTextArea(original, cols=None, rows=None)[source]¶
Bases:
TextArea
is a text area that scales with the width of the window.
- class gavo.svcs.customwidgets.SimpleSelectChoice(original, options, noneLabel=None)[source]¶
Bases:
SelectChoice
- class gavo.svcs.customwidgets.StringExpressionField(*args, **kwargs)[source]¶
Bases:
StringFieldWithBlurb
- additionalMaterial = Tag('a', attributes={'href': '/static/help_vizier.shtml#string'}, children=['[?char expr.]'])¶
- class gavo.svcs.customwidgets.StringFieldWithBlurb(*args, **kwargs)[source]¶
Bases:
TextInput
is a text input widget with additional material at the side.
- additionalMaterial = ''¶