Jump to content

[Krydos] Python flask render_template throw error on Ricky server


momoh

Recommended Posts

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

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 sys
import sqlite3
from flask import Flask,url_for,render_template,redirect,request,jsonify,flash,session,get_flashed_messages,make_response
app = 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

Guest
This topic is now closed to further replies.
×
×
  • Create New...