Showing data on frontend from sql databases using django

For fetching data from databases, I usually see people create a class in models.py and they migrate it, and then they fetch data from databases and show it on the front-end. my question is, i already have a database which has student_info table and has lots of data. I don’t want to define student_info class in models.py and do migration. Instead, since i already have student_info data in sql database. so I want to fetch it directly. can i do so?

one method i know of doing the same, is directly connecting sql server in views.py as;

mydb=mysql.connector.connect(host="localhost",user="root",password="******",database=database_name)

and fetching the data and passing it as variable in index.html. But the problem is, it fetches data only once, and if i refresh the page where local server is running, all the content will disappear, and server will report Broken pipe from ('127.0.0.1', 59579) and to see the data, again i need to restart the sever.

Kindly looking for a better approach to show data on front-end from the existing databases