With the use of django-json-widget package, the data field of the Configuration model now utilizes a JSON editor window in the main Django admin dashboard. This change helps in providing a more user friendly interface for admins to manage the configuration instances of the screener.
The JSON editor for the data field provides two different views, namely Tree and Code. The JSON editor also provides search, sort, order, and other features.
What (if anything) did you refactor?
The JSON data, when saved in the data field of the Configuration model, previously included escape characters. However, after passing the data through json.loads in the admin.py of the Configuration model, the escape characters \ are now excluded only while the data is being viewed in the JSON editor.
Any other comments, questions, or concerns?
The django-json-widget package is added in the requirements.txt, the package needs to be installed for the new data UI to work.
What (if any) features are you implementing?
data
field of the Configuration model now utilizes a JSON editor window in the main Django admin dashboard. This change helps in providing a more user friendly interface for admins to manage the configuration instances of the screener.data
field provides two different views, namely Tree and Code. The JSON editor also provides search, sort, order, and other features.What (if anything) did you refactor?
json.loads
in theadmin.py
of the Configuration model, the escape characters\
are now excluded only while thedata
is being viewed in the JSON editor.Any other comments, questions, or concerns?
data
UI to work.