小编Ank*_*iri的帖子

如果在django中的urls.py中找不到,则将任何网址重定向到404.html

如果urls.py中不存在任何类型的url模式到创建的页面"404.html"页面,而不是由django显示错误,如何将其重定向到.

python regex django django-urls

8
推荐指数
1
解决办法
1万
查看次数

在特定的div中显示烤面包机

我需要在特定的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)

谁能帮忙。

javascript jquery toastr

5
推荐指数
1
解决办法
3027
查看次数

标签 统计

django ×1

django-urls ×1

javascript ×1

jquery ×1

python ×1

regex ×1

toastr ×1