Open JamesPHoughton opened 6 months ago
Fixed import by moving javascript folder to static
and using flask command:
<script src="{{ url_for('static', filename='javascript/modal.js') }}"></script>
Dealt with calling python by adding a new socket event that happens when you click "submit", calls a socket handler on the server side, which runs python and returns a message to the client side with the python result.
Code for replacing text in input box is:
const inputField = document.getElementById("message-input");
inputField.value = suggestedRevision;
Write to database from server side in socket callbacks.
Best strategy for making the websockets robust (if they turn out not to be good) might be just to find someone who knows websockets really well on upwork once everything else is in place.
Problems
Potential user issues:
Checks that look good: