Beispiel #1
0
 def to_json(self, context):
     return {
         "text": compact({
             "type": self.field_type,
             "placeholder": force_text(self.placeholder) if self.placeholder else None,
         })
     }
Beispiel #2
0
 def to_json(self, context):
     return {
         "text": compact({
             "type": self.field_type,
             "placeholder": force_text(self.placeholder) if self.placeholder else None,
         })
     }
Beispiel #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,
         })
     }
Beispiel #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,
         })
     }