[Fixed]-How to set the default value can shown on the table with Django?

1👍

Since you’re using modelforms, you could use:

def update_lyric(request, pk):
  lyric = get_object_or_404(Lyric, pk = pk)
  form = LyricForm(request.POST, instance=lyric)
  return render(request, 'update_lyric_page.html',{'pk':pk, 'form':form})

Leave a comment