我刚刚介绍了Django框架,我想将这个框架用于我所在小组的许多基于系统的Perl/Python/wlst脚本。我如何获得正常的命令行输出,并让它以近乎实时的方式输出浏览器?我研究过连载,但似乎找不到好的教程。我只是在寻找关于如何制作一个普通的Python/Perl脚本并使其与基于Django的web站点一起工作的建议。在
具体来说:我有一个脚本,它将用户添加到一个组中,添加到一个weblogic域的角色中。我想让你填写表单,它连接到服务器上做工作并返回输出。唯一的问题是它需要一点时间来连接。在
Tags:
我想你得更具体一点。 如果要在浏览器中输出“操作”的结果,则必须使用呈现模板的
view
。在引用django的docs on views:
因此,如果您有一个正在工作的python函数/脚本,您可以将其导入视图,并将结果通过管道传输到模板中。在
您想在web浏览器中siplay外部脚本结果吗?然后,我建议您让这些脚本将结果写入数据库,然后使用django模型获取和显示信息。在
如果要在每次用户打开网页并显示结果时执行脚本,请使用以下python代码:
相关问题 更多 >
编程相关推荐