plain 0.24.0__py3-none-any.whl → 0.24.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
plain/forms/fields.py CHANGED
@@ -945,9 +945,13 @@ class JSONField(CharField):
945
945
  "invalid": "Enter a valid JSON.",
946
946
  }
947
947
 
948
- def __init__(self, encoder=None, decoder=None, **kwargs):
948
+ def __init__(
949
+ self, encoder=None, decoder=None, indent=None, sort_keys=False, **kwargs
950
+ ):
949
951
  self.encoder = encoder
950
952
  self.decoder = decoder
953
+ self.indent = indent
954
+ self.sort_keys = sort_keys
951
955
  super().__init__(**kwargs)
952
956
 
953
957
  def to_python(self, value):
@@ -983,7 +987,13 @@ class JSONField(CharField):
983
987
  def prepare_value(self, value):
984
988
  if isinstance(value, InvalidJSONInput):
985
989
  return value
986
- return json.dumps(value, ensure_ascii=False, cls=self.encoder)
990
+ return json.dumps(
991
+ value,
992
+ indent=self.indent,
993
+ sort_keys=self.sort_keys,
994
+ ensure_ascii=False,
995
+ cls=self.encoder,
996
+ )
987
997
 
988
998
  def has_changed(self, initial, data):
989
999
  if super().has_changed(initial, data):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain
3
- Version: 0.24.0
3
+ Version: 0.24.1
4
4
  Summary: A web framework for building products with Python.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-File: LICENSE
@@ -28,7 +28,7 @@ plain/forms/README.md,sha256=fglB9MmHiEgfGGdZmcRstNl6eYaFljrElu2mzapK52M,377
28
28
  plain/forms/__init__.py,sha256=UxqPwB8CiYPCQdHmUc59jadqaXqDmXBH8y4bt9vTPms,226
29
29
  plain/forms/boundfield.py,sha256=LhydhCVR0okrli0-QBMjGjAJ8-06gTCXVEaBZhBouQk,1741
30
30
  plain/forms/exceptions.py,sha256=XCLDRl5snIEDu5-8mLB0NnU_tegcBfyIHMiJxqvbxnc,164
31
- plain/forms/fields.py,sha256=86ZE9jac6Zyg5vKsYGgyOUOIQLKxO--UomGXwA65tk4,35103
31
+ plain/forms/fields.py,sha256=OiZnJPANsy-sEpiE5JduxVFsQebWpDuB531VBY1Tfpk,35328
32
32
  plain/forms/forms.py,sha256=CiONLo9VhE7E1-u-UejX4XWxxwu6MvR-lVPaVAY7VQM,10441
33
33
  plain/http/README.md,sha256=HjEtoAhn14OoMdgb-wK-uc8No7C4d4gZUhzseOp7Fg4,236
34
34
  plain/http/__init__.py,sha256=DIsDRbBsCGa4qZgq-fUuQS0kkxfbTU_3KpIM9VvH04w,1067
@@ -138,8 +138,8 @@ plain/views/forms.py,sha256=RhlaUcZCkeqokY_fvv-NOS-kgZAG4XhDLOPbf9K_Zlc,2691
138
138
  plain/views/objects.py,sha256=g5Lzno0Zsv0K449UpcCtxwCoO7WMRAWqKlxxV2V0_qg,8263
139
139
  plain/views/redirect.py,sha256=9zHZgKvtSkdrMX9KmsRM8hJTPmBktxhc4d8OitbuniI,1724
140
140
  plain/views/templates.py,sha256=cBkFNCSXgVi8cMqQbhsqJ4M_rIQYVl8cUvq9qu4YIes,1951
141
- plain-0.24.0.dist-info/METADATA,sha256=X4WLjJIco22nM723QFl9QslXEbSHHjNhDf4Oqqpr9Fw,319
142
- plain-0.24.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
143
- plain-0.24.0.dist-info/entry_points.txt,sha256=DHHprvufgd7xypiBiqMANYRnpJ9xPPYhYbnPGwOkWqE,40
144
- plain-0.24.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
145
- plain-0.24.0.dist-info/RECORD,,
141
+ plain-0.24.1.dist-info/METADATA,sha256=fv18aykx9W3GX_VzeOOf3wWAozsqUPzUUbJ-LV7OaQM,319
142
+ plain-0.24.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
143
+ plain-0.24.1.dist-info/entry_points.txt,sha256=DHHprvufgd7xypiBiqMANYRnpJ9xPPYhYbnPGwOkWqE,40
144
+ plain-0.24.1.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
145
+ plain-0.24.1.dist-info/RECORD,,
File without changes