I have a pre coded Sql Alchemy database and the file name is app.db , I wold like to use the same app to get those data to code a fresh flask app , If so how can i do it?
from flask import Flask,render_template,current_app
from flask_sqlalchemy import SQLAlchemy
app=Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI']="sqlite:///app .db"
app.config['SQLALCHEMY_TRACK_MODIFICATIONS']=False
db=SQLAlchemy(app)
@app.route('/')
def home_page():
return render_template('index.html')
When I run the above code in my Flask app it creates a new db file but I want to get data from the app.db file which I have already created