I have found myself unsatisfied with Django's ability to submit JSON data if I use serializes built in Database foreign key relationships are not included in the data (key only). Also, it seems impossible to include custom data in the JSN feed, which is not part of the model.
As a test, I have implemented a template which provides some JSON for the results of a particular model. I was able to include / exclude parts of the model that I wanted and was able to include custom data too.
The test worked well and was not slow compared to recommended serialization methods.
While it is difficult to definitly anybody in this method There can be a loss, this method is that we use it in production, as you control everything that has been serialized, even if the underlying model has changed. We are running a high-traffic application in about two years using this method.
Hope it helps.
Comments
Post a Comment