#users为当前app的名称,index为路径名称
reverse('users:index')
全局404、500页面配置
注意:
Django2.2.2中,500视图不需要加exception
def page_not_found(request, exception):
return render(request,'handler_404.html')
def page_error(request):
return render(request,'handler_500.html')
https://blog.csdn.net/weixin_42134789/article/details/80276855