Hello,
I need to launch a python file (refresh.py) from my template.
I have created a .bat wich starts refresh.py, but I can't get it to work:
<button onclick="runbat()"> Launch refresh </button>
<script language="JavaScript" type="text/javascript">
MyObject = new ActiveXObject("WScript.Shell");
function Runbat()
{
MyObject.Run("\"C:\\..path...\\refresh.bat\"");
}
</script>
Could somebody show me how to "properly" start my refresh.py?
Refresh.py reads log files and checks the status of a few servers. It the deletes the Objects in my SQLite DB and rewrites them.
I would also appreciate if somebody would give me a hint, wich points me in the right direction of how to "properly" solve problems like this in Django.
If you want me to I could upload refresh.py
Thank you in advance!