📜  表单有效 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:09.957000             🧑  作者: Mango

代码示例1
def form_valid(self, form):
    form.instance.user = self.request.user
    super(Your_View, self).form_valid(form)
    return redirect('home')