1- ''' ```eval_rst
1+ '''
22This module contains :class:`appyter.fields.Field`, the base class for all fields
33defined in :mod:`appyter.profiles.default.fields`.
4- ``` '''
4+ '''
55
66from markupsafe import Markup
77from appyter .ext .flask import request_get
88
99class PartialField :
1010 ''' Partial instantiation of a field
1111 Replaces a decorator so that we can still identify it as
12- a callable which will produce a field.
12+ a callable which will produce a field.
1313 '''
1414 def __init__ (self , field , ** kwargs ):
1515 self ._field = field
@@ -47,10 +47,9 @@ def as_dict(self):
4747
4848class Field (dict ):
4949 ''' Base field for which all fields derive
50- ```eval_rst
5150 Base class for all Field objects representing a value that will later be provided via a front-end form.
5251 See :mod:`appyter.profiles.default.fields` for the actual fields.
53- ``` '''
52+ '''
5453 def __init__ (self ,
5554 name = None ,
5655 label = None ,
@@ -62,7 +61,7 @@ def __init__(self,
6261 section = None ,
6362 _env = None ,
6463 ** kwargs ):
65- '''
64+ r '''
6665 :param name: (str) A name that will be used to refer to the object as a variable and in the HTML form.
6766 :param label: (str) A human readable label for the field for the HTML form
6867 :param description: (Optional[str]) A long human readable description for the field for the HTML form
@@ -71,7 +70,7 @@ def __init__(self,
7170 :param default: (Any) A default value as an example and for use during prototyping
7271 :param section: (Optional[str]) The name of a SectionField for which to nest this field under, defaults to a root SectionField
7372 :param value: (INTERNAL Any) The raw value of the field (from the form for instance)
74- :param **kwargs: Additional keyword arguments used by other fields
73+ :param \ **kwargs: Additional keyword arguments used by other fields
7574 '''
7675 super ().__init__ (
7776 field = self .field ,
@@ -113,7 +112,7 @@ def constraint(self):
113112 return (self .raw_value is None and not self .args .get ('required' )) or (self .raw_value in self .choices )
114113
115114 def render (self , ** kwargs ):
116- ''' Return a rendered version of the field (form)
115+ r ''' Return a rendered version of the field (form)
117116
118117 :param \**kwargs: The instance values of the form e.g. `Field.render(**field.args)`
119118 '''
0 commit comments