I have to use Django with a legacy MongoDB database. I have made the connection but I don't know how to access the documents/data present inside the database?
For relational legacy databases, we use inspectdb command and we get references for the existing tables/models but how do we query existing data in legacy non-relational databases?
I am making a connection using mongoengine
myclient = connect('db_name',host='host_ip', port=post_number, username='db_user', password='db_password', authentication_source='db_name ')
and I am able to retrieve data using
mydb = myclient['db_name']
mycol = mydb['collection_name']
mycol.find_one()
but I want to retrieve data using Django models.