Category : flask

I have the following code piece of code in the HTML: <video autoplay="true" id="videoElement"> then I have a JS script, which sends a stream via axios to the the flask python backend endpoint: <script> var video = document.querySelector("#videoElement"); if (navigator.mediaDevices.getUserMedia) { navigator.mediaDevices.getUserMedia({ video: true }) .then(function (stream) { video.srcObject = stream; axios.post(‘/game’, stream ) .then(function ..

Read more

I can’t get single value [in for loop(html)] but i can get the key. here is the route: @app.route("/mail/<username>/<password>/<mailext>",methods=[‘POST’,’GET’]) def mail(username,password,mailext): host= request.host mailsJsonUrl = f"http://{host}/mails/{username}/{password}/{mailext}" if request.method == "POST": reciever = request.form[‘username’] time=request.form[‘time’] title=request.form[‘title’] content=request.form[‘content’] date = request.form[‘date’] data = { ‘sender’:username, ‘time’:time, ‘title’:title, ‘content’:content, ‘date’:date } testerForStudent = db.child(f"Users/{reciever}/username").get().val() testerForTeacher = db.child(f"Users/teachers/{reciever}/username").get().val() if ..

Read more

I have this management page that lists my employees from my sqlite database, but when I click Add New Employees, nothing happens, and I don’t get an error message as well… I went over Bootstrap5 documentation to make sure I didn’t misspell anything but still stuck… {% extends ‘base.html’ %} {% include ‘header.html’ %} {% ..

Read more

Is it possible to use Flask API with pyspark? I was using it in a python script earlier but now due to change in requirements, I require spark for processing thus tried using pyspark, but it ain’t working. Requirement : I’ll pass arguments via flask API to script where I’ll read data from hadoop and ..

Read more