momoh Posted October 28, 2020 Share Posted October 28, 2020 Hi, I need help here with my server i cant seem to get the render_template functionality working properly, I followed the instructions by kyros on how to host flask app on heliohost and i will love if mutagen was installed Link to comment Share on other sites More sharing options...
Luigi123 Posted October 28, 2020 Share Posted October 28, 2020 Let’s see if Krydos is able to install that for you or any other ideas to fix this. Escalating Link to comment Share on other sites More sharing options...
momoh Posted October 28, 2020 Author Share Posted October 28, 2020 I will really need that nothing seem to be working Link to comment Share on other sites More sharing options...
Luigi123 Posted October 28, 2020 Share Posted October 28, 2020 He will do it right a way when he sees this, but probably in whiten 24 hours because he is currently busy doing busy stuff. Link to comment Share on other sites More sharing options...
Krydos Posted October 29, 2020 Share Posted October 29, 2020 What is the error you're getting? What is the url to your flask app? Are you aware that since you picked the Ricky server you have to use python 2.7 with flask? Johnny and Tommy have python 3.7 for flask. Link to comment Share on other sites More sharing options...
momoh Posted October 29, 2020 Author Share Posted October 29, 2020 yes i do thanks for the quick response, i was able to solve that now but i can seem to connect to sqlite my app is url /home/momoh/public_html/app this is what i tried import sysimport sqlite3from flask import Flask,url_for,render_template,redirect,request,jsonify,flash,session,get_flashed_messages,make_responseapp = Flask(__name__)application = app #Index page@app.route("/",methods=["POST","GET"])def index(): conn=sqlite3.connect("fmuzic.db")c=conn.cursor()data=c.execute("select rowid,* from music")return render_template("index.html",data=data) if __name__ == "__main__": app.run() Link to comment Share on other sites More sharing options...
momoh Posted October 29, 2020 Author Share Posted October 29, 2020 Can you please install Flask-MySQLdb, so i use in place since an having issues with this Link to comment Share on other sites More sharing options...
Krydos Posted October 29, 2020 Share Posted October 29, 2020 Whenever anyone tries and fails to use sqlite I always suggest switching to mysql. It's a lot easier since you don't have to worry about file permissions. There you go https://krydos1.heliohost.org/cgi-bin/modules27.py Link to comment Share on other sites More sharing options...
Recommended Posts