T
T
timkin12020-08-15 14:15:03
Django
timkin1, 2020-08-15 14:15:03

How to generate json file in Django?

Good afternoon everyone!

Now we have a json file with certain data on the server (there are not so many of them), it is loaded by a separate application. At the moment I am manually editing it. I'm thinking about optimizing this process, for example, using the Django admin panel to update the field values. So far, the creation of models for the fields and the subsequent generation of json using the restful api came to mind. But there is a feeling that:
a) there may not be so many fields, and it is not clear how effective it is to keep the database under this
b) now I have a static file, but with the solution described above, a dynamic one, i.e. each request will generate a new response. What do you think, "is the game worth the candle"? Or are there more elegant solutions that I haven't thought of yet? Perhaps it is worth considering the option of loading the finished json, changing it in the panel and automatically unloading it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question