Retrive data from Database [closed]

1- am making a sample project for my learning I have a html code and how to retrieve data's from database through this code in Django

  Blood Group
    O+ 
   O- 
   A+ 
   A- 
   B+ 
   B- 
   AB+ 
   AB- 

2- after press search i need to display a selected blood groups results in that / new page

3- my views.py code as follows

def search(request):

return render(request,'search.html')
  • and in database

table name = home_index_bgs column names as follows NAME FATHERS NAME GROUP GENDER DONATED

  • any one can help with this problem for this,
  • its only for educational purpose not for any kind of project
Back to Top