How to save Django ModelForm data?

前端 未结 1 1655
暗喜
暗喜 2021-01-16 12:45

I have created form using ModelForm but its not saving data into database.

views.py

def answer(request):
    if request.method == \         


        
相关标签:
1条回答
  • 2021-01-16 13:22

    You forgot to handle the case where the form isn't valid.

    0 讨论(0)
提交回复
热议问题