[英]Data transfer from one HTML page to another
When creating a technical site, I faced the need to transfer data and save it in a file.在创建技术站点时,我需要传输数据并将其保存在文件中。 I am making a website in Django.
我正在 Django 中创建一个网站。 In models I create input data.
在模型中,我创建输入数据。 I receive these data in HTML and, if necessary, the user changes them and JS performs the necessary calculations, the results of which are sent to the same page.
我在 HTML 中接收这些数据,如有必要,用户更改它们,JS 执行必要的计算,其结果被发送到同一页面。 It is possible to do a lot of analytical work on outgoing data (build graphs, calculate a loan, calculate various project risks).
可以对输出数据进行大量分析工作(构建图表、计算贷款、计算各种项目风险)。 I prefer to create several pages so as not to fill one.
我更喜欢创建几个页面,以免填满一个。 All pages have already been built.
所有页面都已构建。 There was a problem of this nature: On the main page, JS did his job but I do not know how to access this data on other pages.
有一个这样的问题:在主页上,JS做了他的工作,但我不知道如何访问其他页面上的这些数据。 Is there a solution to write a JSON string to a file or send them to Django model (update static data).
是否有将 JSON 字符串写入文件或将它们发送到 Django model 的解决方案(更新 ZA8129459CEF8E9E5D26 数据。) I read a lot and looked for solutions, but I could not figure it out until the end.
我阅读了很多并寻找解决方案,但直到最后我才弄清楚。 Maybe someone knows the solution.
也许有人知道解决方案。
Thank you in advance.先感谢您。
If need more information, please let me know.如果需要更多信息,请告诉我。 This is my first request for help, so please don't be strict if I cannot ask correctly.
这是我第一次寻求帮助,所以如果我不能正确询问,请不要严格。
Writing to a temporary or holding table in a database might be a solution.写入数据库中的临时表或保留表可能是一种解决方案。 You would be able to fetch the data as needed when a new page loads.
当新页面加载时,您将能够根据需要获取数据。
There is probably a better solution though.不过可能有更好的解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.