{% load static %}

<!DOCTYPE html>
<html lang="ru">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
        <link rel="stylesheet" href="{% static 'style.css' %}">

    </head>

    <body>
        <div class="container-login">
            <div>
                <h2 class="index-title">Авторизация прошла успешно.</h2>
                <p>В течение <span id="sec">5</span> секунд произойдет переадресация.</p>
                <p>Если этого не произошло, нажмите на <a href="/admin">эту ссылку</a></p>
            </div>
        </div>

        <script type="text/javascript">
            var sec=5;
            function Sec(){
                document.getElementById("sec").innerHTML=sec;
                sec--;
                if (sec==-1) { 
                    location.replace("/admin")
                    };
                    setTimeout('Sec()',1100);
            }
            Sec();
        </script>
        <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>    
    </body>
</html>