Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django 视图bonet.decorators.wrapper_func没有';t返回HttpResponse对象。它没有返回任何结果_Django_Django Models_Django Forms_Django Views_Decorator - Fatal编程技术网

Django 视图bonet.decorators.wrapper_func没有';t返回HttpResponse对象。它没有返回任何结果

Django 视图bonet.decorators.wrapper_func没有';t返回HttpResponse对象。它没有返回任何结果,django,django-models,django-forms,django-views,decorator,Django,Django Models,Django Forms,Django Views,Decorator,错误 视图bonet.decorators.wrapper_func未返回HttpResponse对象。相反,它没有返回任何值 嗨!!我是stackoverflow的新手,我遇到了这个错误,我没有得到正确的解决方案,所以请帮助我摆脱这个错误 My view.py: @login\u必需(login\u url='login') @允许的用户(允许的用户角色=['customer']) def配置文件(请求): 返回呈现(请求'bonet/profile.html') @需要登录(登录url='l

错误

视图bonet.decorators.wrapper_func未返回HttpResponse对象。相反,它没有返回任何值

嗨!!我是stackoverflow的新手,我遇到了这个错误,我没有得到正确的解决方案,所以请帮助我摆脱这个错误

My view.py:

@login\u必需(login\u url='login')
@允许的用户(允许的用户角色=['customer'])
def配置文件(请求):
返回呈现(请求'bonet/profile.html')
@需要登录(登录url='login')
@允许的用户(允许的用户角色=['customer'])
def帐户设置(请求):
customer=request.user.customer
表单=客户执行(实例=客户)
如果request.method==“POST”:
form=CustomerForm(request.POST,request.FILES,instance=customer)
如果form.is_有效():
form.save()
上下文={'form':form}
返回渲染(请求'bonet/account\u settings.html',上下文)