如何在HTML文件中调用Python脚本?

2024-06-17 13:41:04 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用的是HTML5,Django,python3.4

1)我想要2使用Javascript/Jquery/AJAX/DJANGO/Anyshitstuff在html5文档中调用python脚本

代码(pyscript.py)=

print("Hello everyone")

注意文件pyscript.py和{}r位于同一个名为templates的目录中

2)我想在另一个python脚本中调用一个python脚本,我该怎么做?在

1.年

^{pr2}$

2.年

//here i include python script that is 1.py then
print(a)

Tags: django代码文档py脚本helloajaxjavascript