1👍
✅
You work with a parameter, so:
def profile(request):
with connection.cursor() as cursor:
cursor.execute('SELECT * FROM Student WHERE ID = %s', [request.user.id])
data = dictfetchall(cursor)
return render(request, 'personal.html', {'data': data})
however using raw queries is often not a good idea.
Source:stackexchange.com