[Fixed]-Save HTML Form Data To Database – Django


I found my fault
in views.py calling student for change database values is wrong

When we created a list of database tuple, values can edit by using that list

def update_student_detail(request, student_id):
   list = get_object_or_404 ( student, pk=student_id)
   if request.method == 'POST' :
      list.First_Name = request.POST.get('update_name','')
   return HttpResponseRedirect('/school_manager/students/' + student_id)

Leave a comment