这是我的代码
class FarticlesWizard(FormWizard):
def done(self,request,form_list):
if request.method=='POST':
form1=F1articles(request.POST)
form2=F2articles(request.POST)
form_dict={}
for x in form_list:
form_dict=dict(form_dict.items()+x.cleaned_data.items())
insert_db=Marticles(heading = form_dict['heading'],
content = form_dict['content'],
created_by=request.session['user_name'],
country=form_dict['country'],
work=form_dict['work'])
insert_db.save()
return HttpResponseRedirect('/display/')
但我现在需要传递定义done(self,request,id=None, form_list):
,其中 id 是非默认参数...我收到错误消息non-default argument follows default argument (views.py, line 130)
有没有办法做到这一点?