Skip to content

Commit

Permalink
[fc] Repository: plone.schema
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2022-04-08T19:13:46+03:00
Author: MrTango (MrTango) <md@derico.de>
Commit: plone/plone.schema@a163d48

Use indent in data converter, to make json readable in widget

Files changed:
A news/16.feature
M plone/schema/browser/jsonfield.py
Repository: plone.schema

Branch: refs/heads/master
Date: 2022-04-09T15:16:10+02:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/plone.schema@501a866

Merge pull request #16 from plone/jsonfield-widget-use-indent

Use indent in data converter, to make json readable in widget

Files changed:
A news/16.feature
M plone/schema/browser/jsonfield.py
  • Loading branch information
jensens committed Apr 9, 2022
1 parent e665b0a commit d88a2d4
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
Repository: plone.app.redirector
Repository: plone.schema


Branch: refs/heads/master
Date: 2022-04-07T17:56:08+02:00
Date: 2022-04-08T19:13:46+03:00
Author: MrTango (MrTango) <md@derico.de>
Commit: https://github.com/plone/plone.schema/commit/a163d48f002539f750db33811c6121e70373e0e8

Use indent in data converter, to make json readable in widget

Files changed:
A news/16.feature
M plone/schema/browser/jsonfield.py

b'diff --git a/news/16.feature b/news/16.feature\nnew file mode 100644\nindex 0000000..c840728\n--- /dev/null\n+++ b/news/16.feature\n@@ -0,0 +1 @@\n+Use indent in json.dumps to make JSON readable in the widget [MrTango]\n\\ No newline at end of file\ndiff --git a/plone/schema/browser/jsonfield.py b/plone/schema/browser/jsonfield.py\nindex 8990afc..9d2a8a6 100644\n--- a/plone/schema/browser/jsonfield.py\n+++ b/plone/schema/browser/jsonfield.py\n@@ -43,7 +43,7 @@ def toWidgetValue(self, value):\n """See interfaces.IDataConverter"""\n if value is self.field.missing_value:\n return u\'\'\n- return json.dumps(value)\n+ return json.dumps(value, indent=True)\n \n def toFieldValue(self, value):\n """See interfaces.IDataConverter"""\n'

Repository: plone.schema


Branch: refs/heads/master
Date: 2022-04-09T15:16:10+02:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: https://github.com/plone/plone.app.redirector/commit/73a6594f63ee652e35f13d5fd113f3409b0dfd4b
Commit: https://github.com/plone/plone.schema/commit/501a8668c1b085b4e283d25a25f69500297c812f

Merge pull request #16 from plone/jsonfield-widget-use-indent

newsfile
Use indent in data converter, to make json readable in widget

Files changed:
A news/modernize.breaking
A news/16.feature
M plone/schema/browser/jsonfield.py

b'diff --git a/news/modernize.breaking b/news/modernize.breaking\nnew file mode 100644\nindex 0000000..5873060\n--- /dev/null\n+++ b/news/modernize.breaking\n@@ -0,0 +1,3 @@\n+Plone 6 only, remove Archetypes specific code.\n+Also Code modernization (black, isort, pyupgrade).\n+[jensens]\n\\ No newline at end of file\n'
b'diff --git a/news/16.feature b/news/16.feature\nnew file mode 100644\nindex 0000000..c840728\n--- /dev/null\n+++ b/news/16.feature\n@@ -0,0 +1 @@\n+Use indent in json.dumps to make JSON readable in the widget [MrTango]\n\\ No newline at end of file\ndiff --git a/plone/schema/browser/jsonfield.py b/plone/schema/browser/jsonfield.py\nindex 8990afc..9d2a8a6 100644\n--- a/plone/schema/browser/jsonfield.py\n+++ b/plone/schema/browser/jsonfield.py\n@@ -43,7 +43,7 @@ def toWidgetValue(self, value):\n """See interfaces.IDataConverter"""\n if value is self.field.missing_value:\n return u\'\'\n- return json.dumps(value)\n+ return json.dumps(value, indent=True)\n \n def toFieldValue(self, value):\n """See interfaces.IDataConverter"""\n'

0 comments on commit d88a2d4

Please sign in to comment.