Hello World!
I got this error from when I submit a post method, and here is my post code.
I can not have an exact traceback to know the error well,
any help please
def post(self, request, *args, **kwargs):
form = self.form_class(request.POST)
context = {
‘form’: form,
}
if form.is_valid():
print(‘yeeeeeeees’)
clt = form.save(commit=False)
clt.creator = request.user
clt.number = autoNumInvoice()
clt.save()
return render(‘clients:home’)
else:
return form.errors
return render(request, self.template_name, context=context)