在Django中实现404页面,但收到错误

时间:2018-02-08 23:20:17

标签: python html css django

error image 1

error image 2

我试图将我的404.html页面实施到我的django项目中,并遇到此错误。在我的项目中,其他所有内容都已完成,所以我非常渴望完成最后一件作品!任何帮助是极大的赞赏。包括404.html和head_css.html文件。如果您需要查看其他任何内容,请告诉我。

任何人都可以帮忙吗?

提前致谢!!

我的404.html代码:

<!doctype html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="404 Page not found">
<meta content="width=device-width, initial-scale=1, user-scalable=no" name="viewport">
<title>Codes For Anyone</title>
<link rel="shortcut icon" type="image/x-icon" href="{% static 'themes/images/favicon.ico' %}">

<!-- Google icon -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

{% include 'landing/head_css.html' %}

</head>

<body class="body-custom body-404page">
    <div class="errorpage">
        <div class="wrapper">
            <div class="container">
                <div class="content-primary">
                    <h1 class="title">Page Not Found</h1>
                     <p class="description">The page you are looking for was moved, removed, <br>
                        renamed or might never existed.</p>
                     <div class="section-footer">
                        <a href="{% url 'referall:home' %}" class="btn btn-primary">Back To Homepage</a>
                        <a href="{% url 'referall:contact' %}" class="btn btn-secondary">Report Error</a>
                     </div>
                </div><!-- content-primary -->
            </div><!-- container -->
        </div>
    </div>
        <!-- chitika ad  code -->
            <div class=" container-fluid full-width-container contact">
                    <script type="text/javascript">
                    ( function() {
                    if (window.CHITIKA === undefined) { window.CHITIKA = { 'units' : [] }; };
                    var unit = {"calltype":"async[2]","publisher":"andrewdiemer","width":550,"height":250,"sid":"Chitika Default"};
                    var placement_id = window.CHITIKA.units.length;
                    window.CHITIKA.units.push(unit);
                    document.write('<div id="chitikaAdBlock-' + placement_id + '"></div>');
                    }());
                    </script>
                    <script type="text/javascript" src="//cdn.chitika.net/getads.js" async></script>
            </div>
        <!-- end ad code -->
    </div>
    <!-- Scripts Starts -->
    {% include 'landing/javascript.html' %}
    <script>
            $(document).ready(function() {
                    var sPath=window.location.pathname;
                    var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
                    $(".pmd-sidebar-nav").each(function(){
                            $(this).find("a[href='"+sPage+"']").parents(".dropdown").addClass("open");
                            $(this).find("a[href='"+sPage+"']").parents(".dropdown").find('.dropdown-menu').css("display", "block");
                            $(this).find("a[href='"+sPage+"']").parents(".dropdown").find('a.dropdown-toggle').addClass("active");
                            $(this).find("a[href='"+sPage+"']").addClass("active");
                    });
            });
    </script>

    <!-- Scripts Ends -->

</body>
</html>

head_css.html:

{% load staticfiles %}
<!-- Bootstrap css -->
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/bootstrap.min.css' %}">
<!-- Propeller css -->
<!-- build:[href] assets/css/ -->
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/propeller.min.css' %}">
<!-- /build -->

<!-- Propeller date time picker css-->
<link rel="stylesheet" type="text/css" href="{% static 'components/datetimepicker/css/bootstrap-datetimepicker.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'components/datetimepicker/css/pmd-datetimepicker.css' %}" />

<!-- Propeller theme css-->
<link rel="stylesheet" type="text/css" href="{% static 'themes/css/propeller-theme.css' %}" />

<!-- Propeller admin theme css-->
<link rel="stylesheet" type="text/css" href="{% static 'themes/css/propeller-admin.css' %}">

0 个答案:

没有答案