While connecting to mongodb database

hi iam having table
having data like

now i want tocode in show a way that when i give the number 10 i get the name ashwin

Hello @ashwinp, are you using MongoDB database ?? In Django, we generally use an SQLite database. And for this, you need to connect them with a foreign key or like one to one mapping after that only you can access with Ashwin to 10 and with 10 to Ashwin.

OK Chirag let me try,we have to put in model right

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.