Example #1
0
 def to_json(self, context):
     return {
         "text": compact({
             "type": self.field_type,
             "placeholder": force_text(self.placeholder) if self.placeholder else None,
         })
     }
Example #2
0
 def to_json(self, context):
     return {
         "text": compact({
             "type": self.field_type,
             "placeholder": force_text(self.placeholder) if self.placeholder else None,
         })
     }
Example #3
0
 def to_json(self, context):
     return {
         "range": compact({
             "min": maybe_call(self.min, context=context),
             "max": maybe_call(self.max, context=context),
             "step": maybe_call(self.step, context=context),
             "type": self.field_type,
         })
     }
Example #4
0
 def to_json(self, context):
     return {
         "range": compact({
             "min": maybe_call(self.min, context=context),
             "max": maybe_call(self.max, context=context),
             "step": maybe_call(self.step, context=context),
             "type": self.field_type,
         })
     }