TypeError:save()获得了意外的关键字参数'commit'

保存new_post会引发错误。我还没有修改save方法,所以我想知道错误是从哪里来的。

def post(request,method="POST"):
    if request.method == "POST":
        post_data = Post(request.POST)

        new_post = post_data.save(commit=False)
jayxh314 回答:TypeError:save()获得了意外的关键字参数'commit'

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3094407.html

大家都在问