[Answer]-Store database data into json file using python

1👍

path = "{0}/app_name/fixtures/book.json".format(settings.PROJECT_ROOT)
with open(path, "w") as out:
    json_serializer.serialize(Book.objects.all(), stream=out)

Leave a comment