tooreht / django-jsonsuit Goto Github PK
View Code? Open in Web Editor NEWDjango goodies to dress JSON data in a suit.
Home Page: https://tooreht.github.io/django-jsonsuit
License: MIT License
Django goodies to dress JSON data in a suit.
Home Page: https://tooreht.github.io/django-jsonsuit
License: MIT License
The widget looks very useful but it is very difficult to understand how to use it w/o working examples.
Disabling change permissions for the admin user in my ModelAdmin
results in JSONSuit stopping to work.
I tried setting up my fields with either the JSONSuit or the ReadOnlyJSONSuit widgets.
There is a workaround which involves faking the change form layout, but for obvious reasons I would avoid going down that path, if possible.
do not accept any parameter name except "data"
{% jsonsuit data %}
views.py
...
return render(request, 'sensor_list.html', {'sensor': sensorTypeModel.jsonTemplate})
...
expect:
in file sensor_list.html
{% jsonsuit sensor %} is working
but I have error
is not JSON serializable
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
When trying to add multiple instances of the same form to a page, controls from a JSON field on any instance of the form operate the same field on the first instance of a form.
{% for form in model_forms %}
{{ form }}
{% endfor %}
When clicking on "Raw", I expect it to switch that field to raw mode.
When clicking on "Raw", the corresponding field on the first instance of the form on that page switched to raw mode.
Right now the code for JsonSuit assumes the field will have an id of id_{field.name}
, which is generally correct. However, in the case of more than one instance of the form, it selects the first element matching that ID, which will be on the first form.
Generally you could mitigate this by changing the auto_id
parameter on the Form object, which alters the ID generated for all fields (its default value is id_%s
). However, because JSONSuit doesn't use this when calculating the ID it expects for a given field, changing that value will break JSONSuit entirely.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.