You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing a library that handles data that is exchanged in JSON format. It shall be designed to be easily usable with Django, but not require it.
jsonmodels seems like a good fit to start the modelling process. Has anyone thought about how to link it to Django ORM, as in, optionally persist data in real Django models?
The text was updated successfully, but these errors were encountered:
If you are creating lib, of which jsonmodels would be a transport layer with optional Django support - then I suggest to put code (in the beginning at least) responsible for that in that very library (as jsonmodels does not have any integration with any framework for now).
As the lib grows - you could make this generic - and extract this as a plugin to your library (or jsonmodels?)
And diving into more details about
Has anyone thought about how to link it to Django ORM, as in, optionally persist data in real Django models?
I'd keep jsonmodels and Django agnostic - and build around them layer that translates/autogenerates models (field by field) - although this is complicated as you can have few approaches like keeping only one-level models (so they are easily translated) or cast deeper json structures as json field or as related model... Plus there is problem how to handle django migrations (especially that Django has to be optional).
So yeah, problem is complicated - you should start with as many constraints and assumptions as possible to make this easier :)
I am developing a library that handles data that is exchanged in JSON format. It shall be designed to be easily usable with Django, but not require it.
jsonmodels seems like a good fit to start the modelling process. Has anyone thought about how to link it to Django ORM, as in, optionally persist data in real Django models?
The text was updated successfully, but these errors were encountered: