Was looking at this link https://www.geeksforgeeks.org/python-subprocess-module-to-execute-programs-written-in-different-languages/ and am trying to translate it into Django.
Upon form submission from index.html in templates, I want to call the view function to run HelloWorld.java (in same directory as the admin, apps, models, etc files) and return the result onto the webpage.
So the form code would be something like
<form action="{% url path.to.request_page %}" method="POST"> <input id="submit" type="button" value="Click" /> </form>
The view function (same as from the link)
import subprocess
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/65ead62a-d2e3-4655-87c2-4077d9d0baf2o%40googlegroups.com.
No comments:
Post a Comment