select *from table_name where name = %s",params={"name1","name2"}
全码:
from django.shortcuts import render
from . models import destination
def index(request,params = None):
dests1 = destination.objects.raw("select *from travello_destination where name = %s",params={'Bangalore','Mumbai'})
return render(request,'index.html', {"dests":dests1})