如果urls.py中不存在任何类型的url模式到创建的页面"404.html"页面,而不是由django显示错误,如何将其重定向到.
我需要在特定的div,class或id中显示一条敬酒消息。默认情况下为body。我发现我需要更改目标。但是我似乎无法使它起作用。
例如,我要在此div中显示烤面包机:
<showerror> </showerror>
这是我正在使用的代码:
toastr.options = {
"closeButton": false,
"debug": false,
"newestOnTop": false,
"progressBar": false,
"positionClass": "toast-top-right",
"preventDuplicates": false,
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut",
};
$('#submitform').submit(function(e){
e.preventDefault();
console.log($('#ques1').val());
if($('#ques1').val()==null){
toastr.error('Please select a question', 'Error!');
}
});
Run Code Online (Sandbox Code Playgroud)
谁能帮忙。