{"id":364652,"date":"2024-05-21T02:21:33","date_gmt":"2024-05-21T02:21:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=364652"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T02:21:33","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=364652","title":{"rendered":"<span>Flask \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u2014 \u0427\u0430\u0441\u0442\u044c 2 \u043f\u0438\u0448\u0435\u043c landing page+admin panel \u0441 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong>\u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438<\/strong>: \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 landing page \u0441 admin panel, \u043e\u0441\u043d\u0430\u0449\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u0441\u0430\u0439\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u044c. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c &#8212; \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u043d\u0430 Flask \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430.<\/p>\n<p><strong>\u0427\u0442\u043e \u0432\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c<\/strong>:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0435\u043b\u0435\u0442\u0430 landing page \u043d\u0430 Bootstrap 5.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 admin panel \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u043d\u0430 \u043b\u0435\u043d\u0434\u0438\u043d\u0433\u0435.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0422\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u043d\u0430\u0432\u044b\u043a\u0438<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u041e\u0441\u043d\u043e\u0432\u044b <strong>Python<\/strong>: \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u044f\u0437\u044b\u043a\u0430 \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 <strong>HTML<\/strong>: \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u0435\u0433\u043e\u0432 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439: Flask \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 &#8212; <a href=\"https:\/\/habr.com\/ru\/articles\/783574\/\" rel=\"noopener noreferrer nofollow\">Flask \u0434\u043b\u044f\u00a0\u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445\u00a0\u2014 \u0427\u0430\u0441\u0442\u044c 1\u00a0\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0447\u0442\u0435\u043d\u0438\u044f<\/strong>: \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u00a0<u>30-40 \u043c\u0438\u043d\u0443\u0442<\/u>.<\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Bootstrap 5. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e HTML \u0434\u043b\u044f landing page, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Flask, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0432 \u043d\u0430\u0448 HTML \u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 SQLite \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0438 html \u043d\u0430 bootstrap 5.<br \/>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 Flask \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u043d\u0430\u0448 html \u043d\u0430 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u044b \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0442\u044f\u043d\u0443\u0442\u044c \u0441 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 SQLite<\/p>\n<h2>\u0428\u0430\u0433 1: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Landing Page (\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430)<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f landing page, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 Bootstrap. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d <a href=\"https:\/\/getbootstrap.com\/docs\/5.0\/examples\/carousel\/\" rel=\"noopener noreferrer nofollow\">Carousel<\/a>.<\/p>\n<p><u>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b Landing Page \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 Carousel \u0438\u0437 Bootstrap 5<\/u><\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b landing page, \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c Carousel, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 Bootstrap. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<\/p>\n<p>\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c \u043a\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 inspector \u043a\u043e\u0434\u0430 \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <a href=\"https:\/\/getbootstrap.com\/docs\/5.0\/examples\/carousel\/\" rel=\"noopener noreferrer nofollow\">https:\/\/getbootstrap.com\/docs\/5.0\/examples\/carousel\/<\/a> <\/p>\n<p>\u0438\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 : <br \/>\u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0432 html \u0444\u0430\u0439\u043b \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html> &lt;html lang=\"en\"> &lt;head> &lt;meta charset=\"UTF-8\"> &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"> &lt;title>Bootstrap Page&lt;\/title> &lt;!-- Bootstrap CSS --> &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.1.3\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\">  &lt;style>         .carousel-inner {             max-width: 1024px;             margin: auto;             height: 500px; \/* \u0412\u044b\u0441\u043e\u0442\u0430 \u043a\u0430\u0440\u0443\u0441\u0435\u043b\u0438 *\/         }          .carousel-inner img {             width: 100%;             height: 100%;             object-fit: cover; \/* \u041e\u0431\u0440\u0435\u0437\u043a\u0430 \u0438\u043b\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f *\/         }          .carousel-caption {             text-align: left; \/* \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e *\/             bottom: 30%; \/* \u041f\u0440\u0438\u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0438 \u043a\u043d\u043e\u043f\u043a\u0443 \u0432\u0432\u0435\u0440\u0445 *\/             right: 40%; \/* \u0426\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e *\/             transform: translateX(0%); \/* \u041a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f *\/             background-color: rgba(0, 0, 0, 0.1); \/* \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0444\u043e\u043d \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438 *\/             padding: 10px;         } &lt;\/style>  &lt;\/head> &lt;body> &lt;!-- Header --> &lt;header> &lt;nav class=\"navbar navbar-expand-lg navbar-light bg-light\"> &lt;div class=\"container-fluid\"> &lt;a class=\"navbar-brand\" href=\"#\">Navbar&lt;\/a> &lt;button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarNav\"         aria-controls=\"navbarNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\"> &lt;span class=\"navbar-toggler-icon\">&lt;\/span> &lt;\/button> &lt;div class=\"collapse navbar-collapse\" id=\"navbarNav\"> &lt;ul class=\"navbar-nav\"> &lt;li class=\"nav-item\">                       &lt;!-- \u0432 href \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c id div block \u043a\u0443\u0434\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043a\u0440\u043e\u043b\u043b --> &lt;a class=\"nav-link\" href=\"#carouselExampleIndicators\">Carousel&lt;\/a> &lt;\/li> &lt;li class=\"nav-item\"> &lt;a class=\"nav-link\" href=\"#cards\">Cards&lt;\/a> &lt;\/li> &lt;li class=\"nav-item\"> &lt;a class=\"nav-link\" href=\"#featurette1\">Featurette 1&lt;\/a> &lt;\/li> &lt;li class=\"nav-item\"> &lt;a class=\"nav-link\" href=\"#featurette2\">Featurette 2&lt;\/a> &lt;\/li> &lt;\/ul> &lt;\/div> &lt;\/div> &lt;\/nav> &lt;\/header>  &lt;!-- Carousel With Indicators --> &lt;div id=\"carouselExampleIndicators\" class=\"carousel slide\" data-bs-ride=\"carousel\"> &lt;!-- Indicators --> &lt;div class=\"carousel-indicators\"> &lt;button type=\"button\" data-bs-target=\"#carouselExampleIndicators\" data-bs-slide-to=\"0\" class=\"active\"         aria-current=\"true\" aria-label=\"Slide 1\">&lt;\/button> &lt;button type=\"button\" data-bs-target=\"#carouselExampleIndicators\" data-bs-slide-to=\"1\"         aria-label=\"Slide 2\">&lt;\/button> &lt;button type=\"button\" data-bs-target=\"#carouselExampleIndicators\" data-bs-slide-to=\"2\"         aria-label=\"Slide 3\">&lt;\/button> &lt;\/div>  &lt;!-- Carousel items --> &lt;div class=\"carousel-inner\"> &lt;div class=\"carousel-item active\"> &lt;img src=\"https:\/\/via.placeholder.com\/1024x500\" class=\"d-block w-100\" alt=\"First slide\"> &lt;div class=\"carousel-caption d-none d-md-block\"> &lt;h5>First Slide&lt;\/h5> &lt;p>Description for the first slide.&lt;\/p> &lt;button class=\"btn btn-primary\">Click Me&lt;\/button> &lt;\/div> &lt;\/div> &lt;div class=\"carousel-item\"> &lt;img src=\"https:\/\/via.placeholder.com\/1024x500\" class=\"d-block w-100\" alt=\"Second slide\"> &lt;div class=\"carousel-caption d-none d-md-block\"> &lt;h5>Second Slide&lt;\/h5> &lt;p>Description for the second slide.&lt;\/p> &lt;button class=\"btn btn-primary\">Click Me&lt;\/button> &lt;\/div> &lt;\/div> &lt;div class=\"carousel-item\"> &lt;img src=\"https:\/\/via.placeholder.com\/1024x500\" class=\"d-block w-100\" alt=\"Third slide\"> &lt;div class=\"carousel-caption d-none d-md-block\"> &lt;h5>Third Slide&lt;\/h5> &lt;p>Description for the third slide.&lt;\/p> &lt;button class=\"btn btn-primary\">Click Me&lt;\/button> &lt;\/div> &lt;\/div> &lt;\/div>  &lt;!-- Controls --> &lt;button class=\"carousel-control-prev\" type=\"button\" data-bs-target=\"#carouselExampleIndicators\"         data-bs-slide=\"prev\"> &lt;span class=\"carousel-control-prev-icon\" aria-hidden=\"true\">&lt;\/span> &lt;span class=\"visually-hidden\">Previous&lt;\/span> &lt;\/button> &lt;button class=\"carousel-control-next\" type=\"button\" data-bs-target=\"#carouselExampleIndicators\"         data-bs-slide=\"next\"> &lt;span class=\"carousel-control-next-icon\" aria-hidden=\"true\">&lt;\/span> &lt;span class=\"visually-hidden\">Next&lt;\/span> &lt;\/button> &lt;\/div>   &lt;!-- Cards in grid --> &lt;section id=\"cards\" class=\"container mt-4\"> &lt;div class=\"row\"> &lt;!-- Card 1 --> &lt;div class=\"col-md-4\"> &lt;div class=\"card\"> &lt;img src=\"https:\/\/via.placeholder.com\/150\" class=\"card-img-top rounded-circle mx-auto mt-3\"      alt=\"Card image 1\" style=\"width: 150px; height: 150px; object-fit: cover;\"> &lt;div class=\"card-body\"> &lt;h5 class=\"card-title\">Card Title 1&lt;\/h5> &lt;p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.&lt;\/p> &lt;a href=\"#\" class=\"btn btn-primary\">Go somewhere&lt;\/a> &lt;\/div> &lt;\/div> &lt;\/div>  &lt;!-- Card 2 --> &lt;div class=\"col-md-4\"> &lt;div class=\"card\"> &lt;img src=\"https:\/\/via.placeholder.com\/150\" class=\"card-img-top rounded-circle mx-auto mt-3\"      alt=\"Card image 2\" style=\"width: 150px; height: 150px; object-fit: cover;\"> &lt;div class=\"card-body\"> &lt;h5 class=\"card-title\">Card Title 2&lt;\/h5> &lt;p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.&lt;\/p> &lt;a href=\"#\" class=\"btn btn-primary\">Go somewhere&lt;\/a> &lt;\/div> &lt;\/div> &lt;\/div>  &lt;!-- Card 3 --> &lt;div class=\"col-md-4\"> &lt;div class=\"card\"> &lt;img src=\"https:\/\/via.placeholder.com\/150\" class=\"card-img-top rounded-circle mx-auto mt-3\"      alt=\"Card image 3\" style=\"width: 150px; height: 150px; object-fit: cover;\"> &lt;div class=\"card-body\"> &lt;h5 class=\"card-title\">Card Title 3&lt;\/h5> &lt;p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.&lt;\/p> &lt;a href=\"#\" class=\"btn btn-primary\">Go somewhere&lt;\/a> &lt;\/div> &lt;\/div> &lt;\/div> &lt;\/div> &lt;\/section>  &lt;!-- Horizontal Card with image left and text right --> &lt;section id=\"featurette1\" class=\"container mt-4\"> &lt;div class=\"row align-items-center\"> &lt;div class=\"col-md-6\"> &lt;img src=\"https:\/\/via.placeholder.com\/500\" class=\"featurette-image img-fluid\" alt=\"Placeholder Image\"> &lt;\/div> &lt;div class=\"col-md-6\"> &lt;!-- Text --> &lt;h2 class=\"featurette-heading\">\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0430&lt;\/h2> &lt;p class=\"lead\">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec elementum leo. Cras tincidunt magna ut aliquam tincidunt. Nunc lacinia turpis ac neque porta, a fermentum neque facilisis. Curabitur in felis nec ipsum sollicitudin fermentum. Sed ultrices, nunc vel mollis dapibus, lacus risus fermentum massa, id condimentum justo sem eget leo. Aenean efficitur, sapien in sodales cursus, ligula magna cursus lorem, a elementum nulla orci nec nunc.&lt;\/p> &lt;\/div> &lt;\/div> &lt;\/section>   &lt;hr class=\"featurette-divider\">  &lt;!-- Horizontal Card with image right and text left --> &lt;section id=\"featurette2\" class=\"container mt-4\"> &lt;div class=\"row align-items-center\"> &lt;div class=\"col-md-6\"> &lt;!-- Text --> &lt;h2 class=\"featurette-heading\">\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0430&lt;\/h2> &lt;p class=\"lead\">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec elementum leo. Cras tincidunt magna ut aliquam tincidunt. Nunc lacinia turpis ac neque porta, a fermentum neque facilisis. Curabitur in felis nec ipsum sollicitudin fermentum. Sed ultrices, nunc vel mollis dapibus, lacus risus fermentum massa, id condimentum justo sem eget leo. Aenean efficitur, sapien in sodales cursus, ligula magna cursus lorem, a elementum nulla orci nec nunc.&lt;\/p> &lt;\/div> &lt;div class=\"col-md-6\"> &lt;img src=\"https:\/\/via.placeholder.com\/500\" class=\"featurette-image img-fluid\" alt=\"...\"> &lt;\/div> &lt;\/div> &lt;\/section>  &lt;hr class=\"featurette-divider\">  &lt;!-- Repeat of the first horizontal card --> &lt;section id=\"featurette3\" class=\"container mt-4\"> &lt;div class=\"row align-items-center\"> &lt;div class=\"col-md-6\"> &lt;img src=\"https:\/\/via.placeholder.com\/500\" class=\"featurette-image img-fluid\" alt=\"...\"> &lt;\/div> &lt;div class=\"col-md-6\"> &lt;!-- Text --> &lt;h2 class=\"featurette-heading\">\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0430&lt;\/h2> &lt;p class=\"lead\">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec elementum leo. Cras tincidunt magna ut aliquam tincidunt. Nunc lacinia turpis ac neque porta, a fermentum neque facilisis. Curabitur in felis nec ipsum sollicitudin fermentum. Sed ultrices, nunc vel mollis dapibus, lacus risus fermentum massa, id condimentum justo sem eget leo. Aenean efficitur, sapien in sodales cursus, ligula magna cursus lorem, a elementum nulla orci nec nunc.&lt;\/p> &lt;\/div> &lt;\/div> &lt;\/section>  &lt;!-- Footer --> &lt;footer class=\"footer mt-auto py-3 bg-light\"> &lt;div class=\"container\"> &lt;span class=\"text-muted\">Place sticky footer content here.&lt;\/span> &lt;\/div> &lt;\/footer>  &lt;!-- Bootstrap JS --> &lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.1.3\/dist\/js\/bootstrap.bundle.min.js\">&lt;\/script>   &lt;\/body> &lt;\/html> <\/code><\/pre>\n<p>\u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u043a\u0435\u0442 (\u0441\u0442\u0438\u043b\u0438\u0441\u0442\u0438\u043a\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0430\u043c\u0438, \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b):<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/db5\/597\/1e9\/db55971e938d7814beaf31168f9b94c1.png\" alt=\"Flask - landing page skeleton\" title=\"Flask - landing page skeleton\" width=\"507\" height=\"966\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/db5\/597\/1e9\/db55971e938d7814beaf31168f9b94c1.png\"\/><\/p>\n<div><figcaption>Flask &#8212; landing page skeleton<\/figcaption><\/div>\n<\/figure>\n<h2>\u0428\u0430\u0433 2: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0434\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043b\u043e\u0433\u0438\u043d\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u044c<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043d\u0435\u043b\u044c. \u042d\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e, \u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u044f \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044f.<\/p>\n<h4>\u0412\u0430\u0436\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0445\u043e\u0434\u0430:<\/h4>\n<ol>\n<li>\n<p><strong>\u041c\u0435\u0442\u043e\u0434 POST \u0434\u043b\u044f \u0424\u043e\u0440\u043c\u044b:<\/strong> \u0414\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u044b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 POST. \u042d\u0442\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0435\u0442\u043e\u0434 POST \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0432 URL, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0445 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 GET \u0438 POST:<\/strong><\/p>\n<ul>\n<li>\n<p><strong>GET:<\/strong> \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0432 URL. \u041e\u043d \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0433\u0434\u0435 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435).<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 GET \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h4>\n<p>GET \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u0430\u043d\u043d\u044b\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 GET \u0437\u0430\u043f\u0440\u043e\u0441, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0432 URL. \u0412\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 GET \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0435:<\/p>\n<pre><code class=\"python\">https:\/\/example.com\/search?query=\u043a\u043e\u0442\u0438\u043a\u0438&amp;sort=popular<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<ul>\n<li>\n<p><code>https:\/\/example.com\/search<\/code> &#8212; \u044d\u0442\u043e URL, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<li>\n<p><code>?query=\u043a\u043e\u0442\u0438\u043a\u0438&amp;sort=popular<\/code> &#8212; \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0434\u0430\u043d\u043d\u044b\u0435. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430: <code>query<\/code>, \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#171;\u043a\u043e\u0442\u0438\u043a\u0438&#187;, \u0438 <code>sort<\/code> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c &#171;popular&#187;.<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>POST:<\/strong> \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 GET, POST \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0435\u043b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0438\u0445 \u0432 URL. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 POST \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043b\u043e\u0433\u0438\u043d\u044b \u0438 \u043f\u0430\u0440\u043e\u043b\u0438.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 POST \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h4>\n<p>POST \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0444\u043e\u0440\u043c\u044b. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 GET \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0434\u0430\u043d\u043d\u044b\u0435 POST \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0430 \u043d\u0435 \u0432 URL, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0445 \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c POST \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<pre><code>POST \/login HTTP\/1.1 Host: example.com Content-Type: application\/x-www-form-urlencoded username=alice&amp;password=12345<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<\/p>\n<ul>\n<li>\n<p><code>\/login<\/code> &#8212; \u043f\u0443\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043a\u0443\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<li>\n<p><code>username=alice&amp;password=12345<\/code> &#8212; \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u041e\u043d\u0438 \u043d\u0435 \u0432\u0438\u0434\u043d\u044b \u0432 URL, \u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432 \u0442\u0435\u043b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0444\u043e\u0440\u043c\u044b \u0432\u0445\u043e\u0434\u0430:<\/h4>\n<p>\u0424\u043e\u0440\u043c\u0430 \u0432\u0445\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b:<\/p>\n<ul>\n<li>\n<p><strong>\u041f\u043e\u043b\u0435 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/strong> \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u043b\u0435 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u043e\u043b\u044f:<\/strong> \u041f\u043e\u043b\u0435 \u0441 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u043e\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043d\u043e\u043f\u043a\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0444\u043e\u0440\u043c\u044b:<\/strong> \u041a\u043d\u043e\u043f\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"xml\">&lt;!DOCTYPE html> &lt;html lang=\"en\"> &lt;head> &lt;meta charset=\"UTF-8\"> &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"> &lt;title>\u0412\u0445\u043e\u0434 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443&lt;\/title> &lt;!-- Bootstrap CSS --> &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.1.3\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\"> &lt;\/head> &lt;body> &lt;div class=\"container d-flex align-items-center justify-content-center\" style=\"min-height: 100vh;\"> &lt;div class=\"card w-100\" style=\"max-width: 400px;\"> &lt;div class=\"card-body\"> &lt;h3 class=\"card-title text-center mb-4\">\u0412\u0445\u043e\u0434 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443&lt;\/h3> &lt;form method=\"post\"> &lt;div class=\"mb-3\"> &lt;label for=\"username\" class=\"form-label\">\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f&lt;\/label> &lt;input type=\"text\" class=\"form-control\" id=\"username\" name=\"username\"        aria-describedby=\"usernameHelp\"> &lt;div id=\"usernameHelp\" class=\"form-text\">\u0412\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c.&lt;\/div> &lt;\/div> &lt;div class=\"mb-3\"> &lt;label for=\"password\" class=\"form-label\">\u041f\u0430\u0440\u043e\u043b\u044c&lt;\/label> &lt;input type=\"password\" class=\"form-control\" id=\"password\" name=\"password\"> &lt;\/div> &lt;div class=\"mb-3 form-check\"> &lt;input type=\"checkbox\" class=\"form-check-input\" id=\"rememberMe\"> &lt;label class=\"form-check-label\" for=\"rememberMe\">\u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043c\u0435\u043d\u044f&lt;\/label> &lt;\/div> &lt;button type=\"submit\" class=\"btn btn-primary w-100\">\u0412\u043e\u0439\u0442\u0438&lt;\/button> &lt;\/form>  &lt;\/div> &lt;\/div> &lt;\/div>  &lt;!-- Bootstrap JS --> &lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.1.3\/dist\/js\/bootstrap.bundle.min.js\">&lt;\/script> &lt;\/body> &lt;\/html> <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/767\/73d\/bfd\/76773dbfdc9c679d799fbbc56c789a70.png\" alt=\"Flask - login form to admin panel\" title=\"Flask - login form to admin panel\" width=\"1131\" height=\"973\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/767\/73d\/bfd\/76773dbfdc9c679d799fbbc56c789a70.png\"\/><\/p>\n<div><figcaption>Flask &#8212; login form to admin panel<\/figcaption><\/div>\n<\/figure>\n<h2>\u0428\u0430\u0433 3: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u043a\u0435\u0442\u0430 \u0434\u043b\u044f  \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u0438 <\/h2>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u2014 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0441\u0430\u0439\u0442\u0430 \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \u0412\u043e\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0438\u0437\u0430\u0439\u043d\u0430:<\/p>\n<ol>\n<li>\n<p><strong>\u0428\u0430\u043f\u043a\u0430 (Header):<\/strong> \u0412 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0441\u044f \u0448\u0430\u043f\u043a\u0430, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0430\u044f \u0438\u043c\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043a\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d. \u0422\u0430\u043a\u0436\u0435 \u0432 \u0448\u0430\u043f\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u043d\u043e\u043f\u043a\u0430 &#171;\u0412\u044b\u0445\u043e\u0434&#187;, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0441\u0435\u0430\u043d\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u0435\u0432\u043e\u0435 \u041d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u041c\u0435\u043d\u044e:<\/strong> \u0421\u043b\u0435\u0432\u0430 \u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u043c\u0435\u043d\u044e, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u043c\u043e\u0433\u0443\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f &#171;\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430&#187;. \u042d\u0442\u043e \u043c\u0435\u043d\u044e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0431\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0441\u044b\u043b\u043e\u043a \u0438\u043b\u0438 \u043a\u043d\u043e\u043f\u043e\u043a, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0435\u0434\u0435\u0442 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u041e\u0431\u043b\u0430\u0441\u0442\u044c \u041a\u043e\u043d\u0442\u0435\u043d\u0442\u0430:<\/strong> \u0417\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0432 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043c\u0435\u043d\u044e.<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"xml\">&lt;!DOCTYPE html> &lt;html lang=\"en\"> &lt;head>     &lt;meta charset=\"UTF-8\">     &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">     &lt;title>\u0410\u0434\u043c\u0438\u043d-\u041f\u0430\u043d\u0435\u043b\u044c&lt;\/title>     &lt;!-- Bootstrap CSS -->     &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.1.3\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\">  &lt;style>         \/* \u0421\u0442\u0438\u043b\u0438 \u0434\u043b\u044f \u0431\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u043d\u044e *\/         #sidebarMenu {             min-height: 100vh; \/* \u0412\u044b\u0441\u043e\u0442\u0430 \u043d\u0430 \u0432\u0441\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0432\u044c\u044e\u043f\u043e\u0440\u0442\u0430 *\/             box-shadow: 0 2px 5px rgba(0,0,0,0.1); \/* \u0422\u0435\u043d\u044c \u0434\u043b\u044f \u0431\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u043d\u044e *\/             z-index: 1000; \/* \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c z-index, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u043d\u044e \u0431\u044b\u043b\u043e \u043f\u043e\u0432\u0435\u0440\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 *\/         }          .sidebar .nav-link {             border-radius: 0; \/* \u0423\u0431\u0438\u0440\u0430\u0435\u043c \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0443\u0433\u043b\u043e\u0432 *\/             color: #333; \/* \u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 *\/         }          .sidebar .nav-link:hover {             background: #f8f9fa; \/* \u0424\u043e\u043d \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 *\/         }          .sidebar .nav-link.active {             background-color: #007bff; \/* \u0424\u043e\u043d \u0434\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 *\/             color: white; \/* \u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 *\/         }     &lt;\/style> &lt;\/head> &lt;body>  &lt;!-- Header --> &lt;nav class=\"navbar navbar-expand-lg navbar-light bg-light\">     &lt;div class=\"container-fluid\">         &lt;a class=\"navbar-brand\" href=\"#\">\u041b\u043e\u0433\u043e\u0442\u0438\u043f&lt;\/a>         &lt;div class=\"d-flex align-items-center\">             &lt;span class=\"me-3\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0410\u0434\u043c\u0438\u043d&lt;\/span>             &lt;button class=\"btn btn-outline-secondary\" type=\"button\">\u0412\u044b\u0445\u043e\u0434&lt;\/button>         &lt;\/div>     &lt;\/div> &lt;\/nav>  &lt;!-- Admin Panel Layout --> &lt;div class=\"container-fluid\">     &lt;div class=\"row\">         &lt;!-- Sidebar Menu -->         &lt;nav id=\"sidebarMenu\" class=\"col-md-3 col-lg-2 d-md-block bg-light sidebar collapse\">             &lt;div class=\"position-sticky pt-3\">                 &lt;ul class=\"nav flex-column\">                     &lt;li class=\"nav-item\">                         &lt;a class=\"nav-link active\" aria-current=\"page\" href=\"#\">                             &lt;span data-feather=\"home\">&lt;\/span>                             \u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440                         &lt;\/a>                     &lt;\/li>                     &lt;!-- More menu items -->                 &lt;\/ul>             &lt;\/div>         &lt;\/nav>          &lt;!-- Main Content -->         &lt;main class=\"col-md-9 ms-sm-auto col-lg-10 px-md-4\">             &lt;div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\">                 &lt;h1 class=\"h2\">\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0410\u0434\u043c\u0438\u043d-\u041f\u0430\u043d\u0435\u043b\u044c&lt;\/h1>             &lt;\/div>              &lt;!-- Content goes here -->         &lt;\/main>     &lt;\/div> &lt;\/div>  &lt;!-- Bootstrap JS --> &lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.1.3\/dist\/js\/bootstrap.bundle.min.js\">&lt;\/script> &lt;\/body> &lt;\/html> <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/80d\/48b\/4d2\/80d48b4d22a68fc465799fb92eaeaee0.png\" alt=\"Flask - admin panel\" title=\"Flask - admin panel\" width=\"2040\" height=\"1138\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/80d\/48b\/4d2\/80d48b4d22a68fc465799fb92eaeaee0.png\"\/><\/p>\n<div><figcaption>Flask &#8212; admin panel<\/figcaption><\/div>\n<\/figure>\n<h2>\u0428\u0430\u0433 4: \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Flask <\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043c\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438, \u043d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Flask. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u043f\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 Flask \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 &#171;<a href=\"https:\/\/habr.com\/ru\/articles\/783574\/\" rel=\"noopener noreferrer nofollow\">Flask \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445: \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/a>&#171;. \u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u0441\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cc1\/45b\/de4\/cc145bde43e4d52b4649e927df752bc8.png\" width=\"209\" height=\"101\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cc1\/45b\/de4\/cc145bde43e4d52b4649e927df752bc8.png\"\/><\/figure>\n<ul>\n<li>\n<p><strong>static:<\/strong> \u042d\u0442\u0430 \u043f\u0430\u043f\u043a\u0430 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a CSS \u0438 JavaScript. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u043d\u0430\u0448 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u0442\u0438\u043b\u0435\u0432\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0439 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>templates:<\/strong> \u0412 \u044d\u0442\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c HTML-\u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043c\u0430\u043a\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445 (1-3), \u0438 \u043e\u043d\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043c\u0430\u043a\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. Flask \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u043e\u0439 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 HTML-\u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>venv:<\/strong> \u042d\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 Python, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Python \u0432\u0435\u0440\u0441\u0438\u0438 3, SQLite \u0438 \u0434\u0440\u0443\u0433\u0438\u0435) \u0431\u0435\u0437 \u0440\u0438\u0441\u043a\u0430 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>app.py:<\/strong> \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Flask. \u0412 <code>app.py<\/code> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Flask-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0424\u0430\u0439\u043b <code>app.py<\/code> \u0441\u043b\u0443\u0436\u0438\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0447\u0430\u0441\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n<h4>\u0428\u0430\u0433\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f venv:<\/h4>\n<ol>\n<li>\n<p><strong>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438\u043b\u0438 \u041a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0421\u0442\u0440\u043e\u043a\u0443:<\/strong><br \/> \u041d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b (\u043d\u0430 Linux \u0438\u043b\u0438 macOS) \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443\/PowerShell (\u043d\u0430 Windows).<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/strong><br \/> \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 <code>venv<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"bash\">python -m venv venv<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043d\u043e\u0432\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>venv<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/strong><\/p>\n<ul>\n<li>\n<p>\u041d\u0430 Windows:<\/p>\n<pre><code class=\"bash\">.\\venv\\Scripts\\activate<\/code><\/pre>\n<\/li>\n<li>\n<p>\u041d\u0430 Linux \u0438\u043b\u0438 macOS:<\/p>\n<pre><code class=\"bash\">source venv\/bin\/activate<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432\u0430\u0448 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0438\u0437\u043c\u0435\u043d\u0438\u0442 \u0441\u0432\u043e\u0439 \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439:<\/strong><br \/> \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u0448\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Flask:<\/p>\n<pre><code class=\"bash\">pip install flask<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0432\u0430\u0448\u0438\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0431\u043e\u0442\u0430 \u0432 \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438:<\/strong><br \/> \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435. \u0412\u0441\u0435 Python-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u041e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/strong><br \/> \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0443, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432:<\/p>\n<pre><code class=\"bash\">deactivate<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0432\u0435\u0440\u043d\u0435\u0442 \u0432\u0430\u0441 \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c\u0443 Python \u0438 \u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430\u043c.<\/p>\n<\/li>\n<\/ol>\n<h4>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f venv:<\/h4>\n<ul>\n<li>\n<p>\u0418\u0437\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Python.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0423\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/h4>\n<ol>\n<li>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Python.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">python -m venv venv<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u041d\u0430 Windows: <code>venv\\Scripts\\activate<\/code><\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 macOS\/Linux: <code>source venv\/bin\/activate<\/code><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>pip<\/code>:<\/p>\n<pre><code class=\"bash\">pip install flask<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>\u0421\u043b\u0435\u0434\u0443\u044f \u044d\u0442\u0438\u043c \u0448\u0430\u0433\u0430\u043c, \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u0442\u0435 \u043d\u0430\u0434\u0435\u0436\u043d\u0443\u044e \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0430\u0448\u0435\u0433\u043e Flask-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441 \u0447\u0435\u0442\u043a\u0438\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 App.py<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430, \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Flask \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ul>\n<li>\n<p><code>\/<\/code> &#8212; \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u043b\u0435\u043d\u0434\u0438\u043d\u0433-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<\/li>\n<li>\n<p><code>\/adm_login<\/code> &#8212; \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0434\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0445\u043e\u0434\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u044c.<\/p>\n<\/li>\n<li>\n<p><code>\/admin_panel<\/code> &#8212; \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0434\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u0438. <\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/03f\/9fa\/bb5\/03f9fabb541ea1c9aaf238f2fa6c0345.png\" alt=\"Flask - \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043c\u0430\u043a\u0435\u0442\u0430\u043c\u0438 html\" title=\"Flask - \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043c\u0430\u043a\u0435\u0442\u0430\u043c\u0438 html\" width=\"215\" height=\"174\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/03f\/9fa\/bb5\/03f9fabb541ea1c9aaf238f2fa6c0345.png\"\/><\/p>\n<div><figcaption>Flask &#8212; \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043c\u0430\u043a\u0435\u0442\u0430\u043c\u0438 html<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0444\u0430\u0439\u043b\u0430 <code>app.py<\/code> \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0430\u0448\u0438 HTML-\u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0434\u043b\u044f \u0438\u0445 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0444\u0430\u0439\u043b\u0430 <code>app.py<\/code> \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438, \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0449\u0438\u043c\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433:<\/p>\n<pre><code class=\"python\">from flask import Flask, render_template, redirect, url_for, request # Flask - \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Flask - app # render_template - \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 html \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0430\u0441\u044c \u043a\u043e\u0440\u0440\u0435\u0442\u043a\u043d\u043e # redirect - \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0444\u043e\u0440\u043c\u044b \u0433\u0434\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u0438 # url_for - \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0435\u0448 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 adm_panel # request - \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 GET\/POST \u0438 \u0434\u0440\u0433\u0443\u0438\u0445   app = Flask(__name__)  #  \u043d\u0430\u0448\u0430 \u043a\u043e\u0440\u043d\u0435\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u0438\u043d\u0438\u0446\u0443 \u043b\u0435\u043d\u0434\u0438\u043d\u0434\u0430  @app.route('\/') def home():     # \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (landing page)     return render_template('landing.html')   # \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0444\u043e\u0440\u043c\u044b \u043b\u043e\u0433\u0438\u043d\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u044c   @app.route('\/adm_login', methods=['GET', 'POST']) def admin_login():     if request.method == 'POST':         # \u0417\u0434\u0435\u0441\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438         # \u0415\u0441\u043b\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430 \/admin_panel         return redirect(url_for('admin_panel'))     # \u0415\u0441\u043b\u0438 GET \u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u043e\u0440\u043c\u0443 \u0432\u0445\u043e\u0434\u0430     return render_template('login_adm.html')  # \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u0438 @app.route('\/admin_panel') def admin_panel():     # \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u0438     return render_template('admin_panel.html')  if __name__ == '__main__':     app.run(debug=True)<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<pre><code class=\"bash\">python app.py<\/code><\/pre>\n<p> \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b71\/b31\/d7a\/b71b31d7a65bc086e751fb4e27513c14.png\" width=\"1036\" height=\"186\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b71\/b31\/d7a\/b71b31d7a65bc086e751fb4e27513c14.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0448\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0447\u0442\u043e \u043e\u043d\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0438\u0441\u044c: <\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <a href=\"http:\/\/127.0.0.1:5000\/\" rel=\"noopener noreferrer nofollow\">http:\/\/127.0.0.1:5000\/<\/a> &#8212; landing page <\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/127.0.0.1:5000\/adm_login\" rel=\"noopener noreferrer nofollow\">http:\/\/127.0.0.1:5000\/adm_login<\/a> &#8212; \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0444\u043e\u0440\u043c\u044b \u043b\u043e\u0433\u0438\u043d\u0430 <\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/127.0.0.1:5000\/admin_panel\" rel=\"noopener noreferrer nofollow\">http:\/\/127.0.0.1:5000\/admin_panel<\/a> &#8212; \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u0438 <\/p>\n<\/li>\n<\/ul>\n<p>\u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0438\u0441\u044c \u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0432\u0441\u0451 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 5<\/p>\n<details class=\"spoiler\">\n<summary>\u043f\u0440\u0438\u043c\u0435\u0440 Troubleshooting<\/summary>\n<div class=\"spoiler__content\">\n<p><strong>Troubleshooting  &#8212; <\/strong> \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u0440\u0435\u0448\u0438\u0442\u044c \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b \u0437\u0430\u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 request <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9da\/2fa\/c3d\/9da2fac3d2ac6b26a6d60671d53c2d6d.png\" width=\"590\" height=\"131\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9da\/2fa\/c3d\/9da2fac3d2ac6b26a6d60671d53c2d6d.png\"\/><\/figure>\n<p>\u0442\u043e\u0433\u0434\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 <a href=\"http:\/\/127.0.0.1:5000\/adm_login\" rel=\"noopener noreferrer nofollow\">http:\/\/127.0.0.1:5000\/adm_login<\/a> \u0444\u043e\u0440\u043c\u044b \u043b\u043e\u0433\u0438\u043d\u0430 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0b6\/f54\/c6e\/0b6f54c6e60c136b0dee6e166ccdb98e.png\" alt=\"\u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435\" title=\"\u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435\" width=\"952\" height=\"216\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0b6\/f54\/c6e\/0b6f54c6e60c136b0dee6e166ccdb98e.png\"\/><\/p>\n<div><figcaption>\u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1c5\/af3\/f50\/1c5af3f50d5c8a829ee0780a46e7cc18.png\" alt=\"\u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f - \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438\" title=\"\u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f - \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438\" width=\"363\" height=\"49\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1c5\/af3\/f50\/1c5af3f50d5c8a829ee0780a46e7cc18.png\"\/><\/p>\n<div><figcaption>\u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f &#8212; \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<p>\u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0447\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u043b\u0438 \u0432\u044b \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 request \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <br \/>\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f request  \u0432 \u043d\u0430\u0448 \u043a\u043e\u0434 &#8212; \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u0430\u0439\u0442\u0430 \u043d\u0430\u0447\u043d\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ba0\/a86\/2d5\/ba0a862d514ee097f7f97c1c111f7bab.png\" alt=\"\u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 request \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443\" title=\"\u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 request \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443\" width=\"600\" height=\"46\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ba0\/a86\/2d5\/ba0a862d514ee097f7f97c1c111f7bab.png\"\/><\/p>\n<div><figcaption>\u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 request \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/284\/a62\/892\/284a62892c15a84c457ff98c59297150.png\" alt=\"\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u0430\u0439\u0442\u0430 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430\" title=\"\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u0430\u0439\u0442\u0430 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430\" width=\"1411\" height=\"980\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/284\/a62\/892\/284a62892c15a84c457ff98c59297150.png\"\/><\/p>\n<div><figcaption>\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u0430\u0439\u0442\u0430 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430<\/figcaption><\/div>\n<\/figure>\n<\/div>\n<\/details>\n<h2>\u0428\u0430\u0433 5: \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0411\u0430\u0437\u0443 \u0414\u0430\u043d\u043d\u044b\u0445: <\/h2>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SQLite \u2014 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u0443\u044e, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0438 \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a MySQL \u0438\u043b\u0438 PostgreSQL.<\/p>\n<h3>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445:<\/h3>\n<p><strong>\u0420\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u0441\u0430\u0439\u0442\u0430 \u043d\u0430 \u0431\u043b\u043e\u043a\u0438:<\/strong><br \/> \u041c\u044b \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044f \u043d\u0430\u0448 \u0441\u0430\u0439\u0442 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b, \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (landing page).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e69\/2b8\/b88\/e692b8b88db54f8df6e10f584b8b1dcc.png\" alt=\"\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043f\u043e \u0431\u043b\u043e\u043a\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u0430\u0439\u0442\u0430\" title=\"\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043f\u043e \u0431\u043b\u043e\u043a\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u0430\u0439\u0442\u0430\" width=\"1421\" height=\"1157\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e69\/2b8\/b88\/e692b8b88db54f8df6e10f584b8b1dcc.png\"\/><\/p>\n<div><figcaption>\u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043f\u043e \u0431\u043b\u043e\u043a\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0441\u0430\u0439\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 <\/p>\n<p>\u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u043b\u043e\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0441\u0432\u043e\u0439 id  + \u043a\u043e\u043d\u0442\u0435\u043d\u0442 <\/p>\n<p>\u043f\u0440\u0438\u043c\u0435\u0440 \u0422\u0430\u0431\u043b\u0438\u0446\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u043b\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<p><strong>\u0422\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445:<\/strong><\/p>\n<p><strong>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 <\/strong><code>Content<\/code>:<\/p>\n<ul>\n<li>\n<p><code>id<\/code>: int, \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043d\u044b\u0439 &#8212; \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<li>\n<p><code>idblock<\/code>: text &#8212; \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0431\u043b\u043e\u043a\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p><code>short_title<\/code>: text &#8212; \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u0430 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043c\u0435\u043d\u044e \u0438\u043b\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p><code>img<\/code>: text &#8212; \u043f\u0443\u0442\u044c \u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p><code>altimg<\/code>: text &#8212; \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0438 SEO.<\/p>\n<\/li>\n<li>\n<p><code>title<\/code>: text &#8212; \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><code>contenttext<\/code>: text &#8212; \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u0431\u043b\u043e\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p><code>author<\/code>: text &#8212; \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u0430\u0432\u0442\u043e\u0440\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><code>timestampdata<\/code>: datetime &#8212; \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/em> <code>idblock<\/code> \u0438 <code>short_title<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0431\u043b\u043e\u043a (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043b\u0430\u0439\u0434\u0435\u0440 \u0438\u043b\u0438 \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0443).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b8b\/7d7\/a5c\/b8b7d7a5ca947d8c55e7029750f167b5.png\" alt=\"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b\" title=\"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b\" width=\"1276\" height=\"511\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b8b\/7d7\/a5c\/b8b7d7a5ca947d8c55e7029750f167b5.png\"\/><\/p>\n<div><figcaption>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b<\/figcaption><\/div>\n<\/figure>\n<p>idblock \u0438 short_title &#8212; \u044d\u0442\u043e \u0446\u0435\u043b\u044b\u0439 \u0431\u043b\u043e\u043a \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u043e\u043a\u043e\u0432 \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u043e\u0439 \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u043c <\/p>\n<p>\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u0430\u0439\u0434\u0430, \u0433\u0434\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c img, altimg, title, contenttext \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 idblock \u0438 short_title \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0432 slider block \u0438\u043b\u0438 mini card block  \u0438 \u0442\u0434<\/p>\n<p>author \u0438 timestampdata &#8212; \u0431\u0443\u0434\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434\u0435 <\/p>\n<p>\u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0440\u0430 \/ \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0430\u0434\u043c\u0438\u043d \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 <\/p>\n<p><strong>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 <\/strong><code>Users<\/code>:<\/p>\n<ul>\n<li>\n<p><code>id<\/code>: int, \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043d\u044b\u0439 &#8212; \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p><code>username<\/code>: text &#8212; \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443.<\/p>\n<\/li>\n<li>\n<p><code>password<\/code>: text &#8212;  \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442).<\/p>\n<\/li>\n<\/ul>\n<h3>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445: <\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u044d\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 SQLite. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446:<\/p>\n<p>\u0441\u043a\u0440\u0438\u043f \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0432 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0437\u0434\u0430\u0432 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0438\u043b <strong><em>createdb.py<\/em><\/strong><\/p>\n<pre><code class=\"python\">import sqlite3  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 conn = sqlite3.connect('database.db')  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 c = conn.cursor()  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Content c.execute('''CREATE TABLE IF NOT EXISTS content (              id INTEGER PRIMARY KEY AUTOINCREMENT,              idblock TEXT,              short_title TEXT,              img TEXT,              altimg TEXT,              title TEXT,              contenttext TEXT,              author TEXT,              timestampdata DATETIME)''')  # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b Users c.execute('''CREATE TABLE IF NOT EXISTS users (              id INTEGER PRIMARY KEY AUTOINCREMENT,              username TEXT,              password TEXT)''')  # \u0417\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 conn.close() <\/code><\/pre>\n<p>\u0434\u0430\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c<\/p>\n<pre><code class=\"bash\">python creatdb.py<\/code><\/pre>\n<p> \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c sqlite <br \/>\u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <\/p>\n<pre><code class=\"bash\">pip install sqlite3<\/code><\/pre>\n<p>\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0430 <\/p>\n<p>\u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/116\/03e\/e16\/11603ee16b539f56c893334a83589766.png\" width=\"339\" height=\"221\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/116\/03e\/e16\/11603ee16b539f56c893334a83589766.png\"\/><\/figure>\n<h4>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0412 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 <\/h4>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u0441\u043a\u0440\u0438\u043f\u0442 <code>createuser.py<\/code>, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438. \u042d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 <code>users<\/code> \u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 SQLite, \u0447\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0437\u0430\u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <strong>hashlib <\/strong> \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 SHA-256 \u0434\u043b\u044f \u043f\u0430\u0440\u043e\u043b\u044f. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u043e\u043b\u044c \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434  <code>createuser.py<\/code> , \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<pre><code class=\"python\">import sqlite3 import hashlib  def create_user(username, password):     # \u0425\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f     hashed_password = hashlib.sha256(password.encode('utf-8')).hexdigest()      # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445     conn = sqlite3.connect('database.db')     c = conn.cursor()      # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     c.execute('INSERT INTO users (username, password) VALUES (?, ?)', (username, hashed_password))      # \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445     conn.commit()     conn.close()  # \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 'admin' \u0438 'your_password' \u043d\u0430 \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c create_user('admin', 'your_password') <\/code><\/pre>\n<p>\u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 admin admin <\/p>\n<p>\u0438 \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0431\u0430\u0437\u0443 \u0442\u043e \u043f\u0430\u0440\u043e\u043b\u044c \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/441\/34b\/9d4\/44134b9d493aa26109b2cafcf7eafeca.png\" width=\"700\" height=\"192\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/441\/34b\/9d4\/44134b9d493aa26109b2cafcf7eafeca.png\"\/><\/figure>\n<h3>\u0428\u0430\u0433 6: \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0411\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 app.py \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0432 \u0430\u0434\u043c\u0438\u043d \u0447\u0430\u0441\u0442\u044c<\/h3>\n<p>\u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u043d\u0435\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434 <\/p>\n<ol>\n<li>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 SQLite.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u0445\u043e\u0434\u0430\/\u0432\u044b\u0445\u043e\u0434\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u044c<\/p>\n<\/li>\n<\/ol>\n<p>\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441 \u043a\u043e\u043c\u043c\u0435\u0442\u0440\u0430\u0440\u0438\u044f\u043c\u0438: <br \/>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 Sqlite \u0438  hashlib \u0431\u0438\u0431\u0438\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <br \/>\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0444\u043e\u0440\u043c\u0443 \u043b\u043e\u0433\u0438\u043d\u0430<\/p>\n<pre><code class=\"python\">from flask import Flask, render_template, redirect, url_for, request, session import sqlite3 # \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c Sqlite \u0432 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442  import hashlib # \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f   app = Flask(__name__) app.secret_key = 'your_secret_key'  # \u043f\u043e\u0434\u0441\u0442\u0432\u0430\u0432\u044c\u0442\u0435 \u0441\u0432\u043e\u0439 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 # \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u0440\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438  # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0411\u0430\u0437\u043e\u0439 \u0414\u0430\u043d\u043d\u044b\u0445 def get_db_connection():     conn = sqlite3.connect('database.db')     conn.row_factory = sqlite3.Row     return conn  @app.route('\/') def home():     return render_template('landing.html')  @app.route('\/adm_login', methods=['GET', 'POST']) def admin_login():     error = None # \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043e\u043a      if request.method == 'POST':         username = request.form['username'] # \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0444\u043e\u0440\u043c\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 name=\"username\"         password = request.form['password'] # \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0444\u043e\u0440\u043c\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 name=\"password\"         hashed_password = hashlib.sha256(password.encode('utf-8')).hexdigest() # \u0448\u0438\u0444\u0440\u0443\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0432 sha-256          # \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0411\u0414         conn = get_db_connection()          # \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e username,         # \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 id, password         user = conn.execute('SELECT * FROM users WHERE username = ?', (username,)).fetchone()         # \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0411\u0414         conn.close()                   # \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0411\u0414         if user and user['password'] == hashed_password:             # \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0435\u0441\u0441\u0438\u044e \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f             session['user_id'] = user['id']             # \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 -> \u0432 \u043d\u0430\u0448\u0443 \u0430\u0434\u0438\u043c\u043d\u043a\u0443             return redirect(url_for('admin_panel'))          else:             error = '\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c'      return render_template('login_adm.html', error=error)  @app.route('\/admin_panel') def admin_panel():     # \u0434\u0435\u043b\u0430\u0435\u043c \u0434\u043e\u043f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0435\u0441\u043b\u0438 \u0441\u0435\u0441\u0441\u0438\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430      if 'user_id' not in session:         return redirect(url_for('admin_login'))     return render_template('admin_panel.html')  if __name__ == '__main__':     app.run(debug=True) <\/code><\/pre>\n<p>\u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c: <\/p>\n<ul>\n<li>\n<p>\u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <strong>secret_key<\/strong> <\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p> Flask, <code>app.secret_key<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<ol>\n<li>\n<p><strong>\u0417\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u041c\u0435\u0436\u0441\u0430\u0439\u0442\u043e\u0432\u043e\u0439 \u041f\u043e\u0434\u0434\u0435\u043b\u043a\u0438 \u0417\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (CSRF):<\/strong> <code>secret_key<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0445 \u043e\u0442 \u043f\u043e\u0434\u0434\u0435\u043b\u043a\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0445. \u042d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u0430\u0442\u0430\u043a CSRF, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0421\u0435\u0441\u0441\u0438\u044f\u043c\u0438:<\/strong> Flask \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <code>secret_key<\/code> \u0434\u043b\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u0441\u0441\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u043a\u0443\u043a\u0438. \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u0441\u0441\u0438\u0438 \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0447\u0442\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0442\u044c\u0438\u043c\u0438 \u043b\u0438\u0446\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u0414\u0430\u043d\u043d\u044b\u0445:<\/strong> <code>secret_key<\/code> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0438\u0445 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u044c. \u042d\u0442\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u0443\u043a\u0438), \u043d\u0435 \u0431\u044b\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u043f\u0440\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0412\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438:<\/h4>\n<ul>\n<li>\n<p><strong>\u0412\u044b\u0431\u043e\u0440 \u041d\u0430\u0434\u0435\u0436\u043d\u043e\u0433\u043e \u041a\u043b\u044e\u0447\u0430:<\/strong> \u0412\u0430\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 <code>secret_key<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e \u0443\u0433\u0430\u0434\u0430\u0442\u044c. \u042d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u0432 \u0441\u0435\u0441\u0441\u0438\u044f\u0445, \u0438 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c:<\/strong> <code>secret_key<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0438 \u043d\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u043b\u0438\u0446\u0430\u043c. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<ul>\n<li>\n<p>\u0437\u0430\u0447\u0435\u043c \u043d\u0430\u043c session<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 Flask <code>session<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e &#171;\u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c&#187; \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445, \u0447\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>session<\/code>:<\/p>\n<ol>\n<li>\n<p><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0421\u0435\u0441\u0441\u0438\u0438 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/strong> \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0431\u0435\u0437\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439\u043d\u044b\u0445 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, <code>session<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0430\u0442\u0443\u0441 \u0432\u0445\u043e\u0434\u0430) \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0448\u0435\u043b \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c:<\/strong> <code>session<\/code> \u0432\u043e Flask \u0448\u0438\u0444\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>secret_key<\/code>, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0445 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u043a ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0420\u0430\u0431\u043e\u0442\u044b:<\/strong> <code>session<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0441\u043b\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0435\u0441\u0441\u0438\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0440\u043e\u043a \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0421\u0435\u0441\u0441\u0438\u0438:<\/strong> \u0421\u0435\u0441\u0441\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u0442\u0435\u043a\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u043f\u0440\u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0447\u0442\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0438 \u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c:<\/strong> <code>session<\/code> \u0432 Flask \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u0432 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u0441\u0441\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/details>\n<ul>\n<li>\n<p>\u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0435\u0441\u0441\u0438\u0438: <\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<p>\u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0435 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 <\/p>\n<p>\u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0443 application <\/p>\n<p>\u0441\u043c\u043e\u0442\u0440\u0438\u043c Cookies \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0435 value \u0443 session<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e9c\/310\/c94\/e9c310c94614d31c9b498f7ea5a3d848.png\" width=\"1182\" height=\"517\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e9c\/310\/c94\/e9c310c94614d31c9b498f7ea5a3d848.png\"\/><\/figure>\n<p>\u0432\u043e\u0442 \u0432\u0430\u043c \u043c\u0438\u043d\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0441\u0441\u0438\u0438 <\/p>\n<pre><code class=\"python\">from itsdangerous import URLSafeTimedSerializer import base64 import json  # \u0412\u0430\u0448 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 Flask secret_key = 'your_secret_key'  # \u0414\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0434\u043b\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f session_cookie = 'YOUR_SESSION_VALUE'  # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 serializer = URLSafeTimedSerializer(secret_key)  # \u0414\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 # \u0420\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 payload = session_cookie.split(\".\")[0]  # \u0414\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0438\u0437 base64 decoded_payload = base64.urlsafe_b64decode(payload + \"==\")  # \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0437 JSON \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c session_data = json.loads(decoded_payload)  print(session_data)<\/code><\/pre>\n<p>\u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 &#8212; \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c user id \u0432 app.py \u0432 \u0441\u0430\u043c\u0443 \u0441\u0435\u0441\u0441\u0438\u044e , \u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3ca\/8ae\/5cf\/3ca8ae5cf26056ce7992e4a91d6fb79c.png\" width=\"234\" height=\"41\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3ca\/8ae\/5cf\/3ca8ae5cf26056ce7992e4a91d6fb79c.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u043b\u0438\u0441\u044c \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0437\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u0432 \u0441\u0430\u043c\u043e\u0439 \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u0438. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0449\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434: \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0441\u0435\u0441\u0441\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0430\u0434\u043c\u0438\u043d\u043a\u0438<\/p>\n<pre><code class=\"python\">@app.route('\/logout') def logout():     # \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u0441\u0435\u0441\u0441\u0438\u0438     session.clear()     # \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432\u0445\u043e\u0434\u0430     return redirect(url_for('home'))<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 app.py<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">from flask import Flask, render_template, redirect, url_for, request, session import sqlite3 import hashlib  app = Flask(__name__) app.secret_key = 'your_secret_key'  # \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447  def get_db_connection():     conn = sqlite3.connect('database.db')     conn.row_factory = sqlite3.Row     return conn  @app.route('\/') def home():     return render_template('landing.html')  @app.route('\/adm_login', methods=['GET', 'POST']) def admin_login():     error = None     if request.method == 'POST':         username = request.form['username']         password = request.form['password']         hashed_password = hashlib.sha256(password.encode('utf-8')).hexdigest()          conn = get_db_connection()         user = conn.execute('SELECT * FROM users WHERE username = ?', (username,)).fetchone()         conn.close()         print(user)          if user and user['password'] == hashed_password:             session['user_id'] = user['id']             print('yes')             return redirect(url_for('admin_panel'))          else:             error = '\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c'      return render_template('login_adm.html', error=error)  @app.route('\/logout') def logout():     # \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u0441\u0435\u0441\u0441\u0438\u0438     session.clear()     # \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432\u0445\u043e\u0434\u0430     return redirect(url_for('home'))  @app.route('\/admin_panel') def admin_panel():     if 'user_id' not in session:         return redirect(url_for('admin_login'))     return render_template('admin_panel.html')  if __name__ == '__main__':     app.run(debug=True) <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448 html \u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u0438 <br \/>\u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c: <\/p>\n<pre><code class=\"xml\">&lt;a href=\"{{ url_for('logout') }}\" class=\"btn btn-outline-secondary\">\u0412\u044b\u0445\u043e\u0434&lt;\/a><\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 admin_panel.html<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"xml\">&lt;!DOCTYPE html> &lt;html lang=\"en\"> &lt;head>     &lt;meta charset=\"UTF-8\">     &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">     &lt;title>\u0410\u0434\u043c\u0438\u043d-\u041f\u0430\u043d\u0435\u043b\u044c&lt;\/title>     &lt;!-- Bootstrap CSS -->     &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.1.3\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\">  &lt;style>         \/* \u0421\u0442\u0438\u043b\u0438 \u0434\u043b\u044f \u0431\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u043d\u044e *\/         #sidebarMenu {             min-height: 100vh; \/* \u0412\u044b\u0441\u043e\u0442\u0430 \u043d\u0430 \u0432\u0441\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0432\u044c\u044e\u043f\u043e\u0440\u0442\u0430 *\/             box-shadow: 0 2px 5px rgba(0,0,0,0.1); \/* \u0422\u0435\u043d\u044c \u0434\u043b\u044f \u0431\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u043d\u044e *\/             z-index: 1000; \/* \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c z-index, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u043d\u044e \u0431\u044b\u043b\u043e \u043f\u043e\u0432\u0435\u0440\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 *\/         }          .sidebar .nav-link {             border-radius: 0; \/* \u0423\u0431\u0438\u0440\u0430\u0435\u043c \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u0443\u0433\u043b\u043e\u0432 *\/             color: #333; \/* \u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 *\/         }          .sidebar .nav-link:hover {             background: #f8f9fa; \/* \u0424\u043e\u043d \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 *\/         }          .sidebar .nav-link.active {             background-color: #007bff; \/* \u0424\u043e\u043d \u0434\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 *\/             color: white; \/* \u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 *\/         }     &lt;\/style> &lt;\/head> &lt;body>  &lt;!-- Header --> &lt;nav class=\"navbar navbar-expand-lg navbar-light bg-light\">     &lt;div class=\"container-fluid\">         &lt;a class=\"navbar-brand\" href=\"#\">\u041b\u043e\u0433\u043e\u0442\u0438\u043f&lt;\/a>         &lt;div class=\"d-flex align-items-center\">             &lt;span class=\"me-3\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0410\u0434\u043c\u0438\u043d&lt;\/span>             &lt;a href=\"{{ url_for('logout') }}\" class=\"btn btn-outline-secondary\">\u0412\u044b\u0445\u043e\u0434&lt;\/a>         &lt;\/div>     &lt;\/div> &lt;\/nav>   &lt;!-- Admin Panel Layout --> &lt;div class=\"container-fluid\">     &lt;div class=\"row\">         &lt;!-- Sidebar Menu -->         &lt;nav id=\"sidebarMenu\" class=\"col-md-3 col-lg-2 d-md-block bg-light sidebar collapse\">             &lt;div class=\"position-sticky pt-3\">                 &lt;ul class=\"nav flex-column\">                     &lt;li class=\"nav-item\">                         &lt;a class=\"nav-link active\" aria-current=\"page\" href=\"#\">                             &lt;span data-feather=\"home\">&lt;\/span>                             \u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440                         &lt;\/a>                     &lt;\/li>                     &lt;!-- More menu items -->                 &lt;\/ul>             &lt;\/div>         &lt;\/nav>          &lt;!-- Main Content -->         &lt;main class=\"col-md-9 ms-sm-auto col-lg-10 px-md-4\">             &lt;div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\">                 &lt;h1 class=\"h2\">\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0410\u0434\u043c\u0438\u043d-\u041f\u0430\u043d\u0435\u043b\u044c&lt;\/h1>             &lt;\/div>              &lt;!-- Content goes here -->         &lt;\/main>     &lt;\/div> &lt;\/div>  &lt;!-- Bootstrap JS --> &lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.1.3\/dist\/js\/bootstrap.bundle.min.js\">&lt;\/script> &lt;\/body> &lt;\/html> <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u041b\u0435\u043d\u0434\u0438\u043d\u0433, \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043b\u043e\u0433\u0438\u043d\u0430 \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0430\u0434\u043c\u0438\u043d\u043a\u0438 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e sign in \u0438 sign out <\/p>\n<h2>\u0428\u0430\u0433 7: \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u044c<\/h2>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u044d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043d\u0430 \u0434\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438:   <\/p>\n<ul>\n<li>\n<p>7.1 &#8212; \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u043c\u0438\u043d\u043a\u0443 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0411\u0414 <\/p>\n<\/li>\n<li>\n<p>7.2 &#8212; \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435  header \u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435 landing page<\/p>\n<\/li>\n<\/ul>\n<h3>7.1 &#8212; \u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u044c \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 <\/h3>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u0438, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d <code>editland.html<\/code> \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u0432 \u043f\u0430\u043f\u043a\u0443 <code>templates<\/code>. \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 <code>admin_panel.html<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 <code>editland.html<\/code> \u0432 <code>admin_panel.html<\/code> \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u043a\u043e\u0434\u0430:<\/p>\n<p>\u0412\u044b\u0432\u043e\u0434 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u043e \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0431\u043b\u043e\u043a\u043e\u0432 \u0438 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 html \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0b9\/d03\/c41\/0b9d03c41ef574586f32244997dd0bae.png\" width=\"850\" height=\"627\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0b9\/d03\/c41\/0b9d03c41ef574586f32244997dd0bae.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041c\u044b \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u0431\u043b\u043e\u043a\u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u043d\u0430 \u043b\u0435\u043d\u0434\u0438\u043d\u0433-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u041f\u0440\u0438\u043c\u0435\u0440 HTML-\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><strong>\u0421\u043b\u0430\u0439\u0434\u0435\u0440\/\u041a\u0430\u0440\u0443\u0441\u0435\u043b\u044c:<\/strong> <code>id = carouselExampleIndicators<\/code><\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u0438\u043d\u0438-\u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0438:<\/strong> <code>id = cards<\/code><\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u0434\u0435\u043b\u044b Featurette:<\/strong> <code>id = featurette1<\/code>, <code>featurette2<\/code>, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435<\/p>\n<\/li>\n<li>\n<p><strong>\u0424\u0443\u0442\u0435\u0440:<\/strong> <code>id = Footerblock<\/code> (\u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u043b\u0435\u043d\u0434\u0438\u043d\u0433-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435)<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/021\/ec9\/c47\/021ec9c4722fb4c1a5c8b1afc0526bc3.png\" width=\"1556\" height=\"189\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/021\/ec9\/c47\/021ec9c4722fb4c1a5c8b1afc0526bc3.png\"\/><\/figure>\n<ul>\n<li>\n<p><strong>\u0412 app.py \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0411\u0414 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0438\u0445 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442<\/strong><\/p>\n<ul>\n<li>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u043a\u043e\u0434 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 <code>\/admin_login<\/code> \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0411\u0414:  <\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre><code class=\"python\">@app.route('\/admin_panel') def admin_panel():     if 'user_id' not in session:         return redirect(url_for('admin_login'))      conn = get_db_connection()     blocks = conn.execute('SELECT * FROM content').fetchall()  # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b content     conn.close()      # \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0411\u0414 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439     blocks_list = [dict(ix) for ix in blocks]     # print(blocks_list) [{\u0441\u0442\u0440\u043e\u043a\u0430 1 \u0438\u0437 \u0431\u0434},{\u0441\u0442\u0440\u043e\u043a\u0430 2 \u0438\u0437 \u0431\u0434},{\u0441\u0442\u0440\u043e\u043a\u0430 3 \u0438\u0437 \u0431\u0434}, \u0441\u0442\u0440\u043e\u043a\u0430 4 \u0438\u0437 \u0431\u0434]       # \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0443 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0432\u0430\u0440\u044c json     # \u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c JSON     json_data = {}     for raw in blocks_list:         # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u0435\u0441\u043b\u0438 \u043a\u043b\u044e\u0447 \u0435\u0449\u0435 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442         if raw['idblock'] not in json_data:             json_data[raw['idblock']] = []          # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u044e\u0447         json_data[raw['idblock']].append({             'id': raw['id'],             'short_title': raw['short_title'],             'img': raw['img'],             'altimg': raw['altimg'],             'title': raw['title'],             'contenttext': raw['contenttext'],             'author': raw['author'],             'timestampdata': raw['timestampdata']         })      # print(json_data)     # \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043d\u0430 json \u043d\u0430 \u0444\u0440\u043e\u043d\u0442 - \u0434\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c admin_panel.html \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043c     return render_template('admin_panel.html', json_data=json_data)<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>output json_data:<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"json\">{   'carouselExampleIndicators': [     {       'id': 1,       'short_title': 'Slider',       'img': 'https:\/\/via.placeholder.com\/1024x500',       'altimg': 'image 1',       'title': 'Title Test 1',       'contenttext': 'some text for slider 1 ',       'author': None,       'timestampdata': None     },     {       'id': 2,       'short_title': 'Slider',       'img': 'https:\/\/via.placeholder.com\/1024x500',       'altimg': 'image 2',       'title': 'Title Test 2',       'contenttext': 'some text for slider 2 ',       'author': None,       'timestampdata': None     }   ],   'cards': [     {       'id': 3,       'short_title': 'miniCards',       'img': 'https:\/\/via.placeholder.com\/150',       'altimg': 'mini img 2',       'title': 'mini card 2',       'contenttext': 'text for mini card 2',       'author': None,       'timestampdata': None     },     {       'id': 4,       'short_title': 'miniCards',       'img': 'https:\/\/via.placeholder.com\/150',       'altimg': 'mini img 1',       'title': 'mini card 1',       'contenttext': 'text for mini card 1',       'author': None,       'timestampdata': None     }   ] }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<ul>\n<li>\n<p>\u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c html \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435 <\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 JSON \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435, \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, <code>json_data<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447\u0438 (<code>j_key<\/code>) \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0431\u043b\u043e\u043a\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#8216;carouselExampleIndicators&#8217;, &#8216;cards&#8217;), \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (<code>j_value<\/code>) &#8212; \u0441\u043f\u0438\u0441\u043a\u0430\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u0434 <strong>editland  &#8212;  <\/strong>\u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0448\u0435 \u0438\u0437 bootstrap <\/p>\n<ul>\n<li>\n<p>\u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u043c\u0435\u0436\u0434\u0443 <br \/><strong>{% <em>\u0442\u0443\u0442 \u043a\u043e\u0434<\/em>  %}<\/strong> <br \/>\u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043c\u044b \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u0434 \u043f\u0438\u0442\u043e\u043d\u0430 \u0432 html \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 <\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre><code class=\"xml\">&lt;main class=\"col-md-9 ms-sm-auto col-lg-10 px-md-4\"> &lt;div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"> &lt;h1 class=\"h2\">\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0410\u0434\u043c\u0438\u043d-\u041f\u0430\u043d\u0435\u043b\u044c&lt;\/h1> &lt;\/div>  &lt;!-- Content goes here -->  &lt;div class=\"d-flex align-items-start\"> &lt;div class=\"nav flex-column nav-pills me-3\" id=\"v-pills-tab\" role=\"tablist\" aria-orientation=\"vertical\"> {% for j_key, j_value in json_data.items() %} &lt;button class=\"nav-link\" id=\"v-pills-{{ j_key }}-tab\" data-bs-toggle=\"pill\"         data-bs-target=\"#v-pills-{{ j_key }}\" type=\"button\" role=\"tab\"         aria-controls=\"v-pills-{{ j_key }}\" aria-selected=\"false\">  {{ j_value[0].short_title }}  &lt;\/button> {% endfor %} &lt;\/div>  &lt;div class=\"tab-content\" id=\"v-pills-tabContent\"> {% for j_key, j_value in json_data.items() %} &lt;div class=\"tab-pane fade\" id=\"v-pills-{{ j_key }}\" role=\"tabpanel\"      aria-labelledby=\"v-pills-{{ j_key }}-tab\"> {% for item in j_value %} &lt;h3>{{ item.short_title }}&lt;\/h3> &lt;img src=\"{{ item.img }}\" alt=\"{{ item.altimg }}\"> &lt;p>{{ item.title }}&lt;\/p> &lt;p>{{ item.contenttext }}&lt;\/p> {% endfor %} &lt;\/div> {% endfor %} &lt;\/div> &lt;\/div>   &lt;\/main><\/code><\/pre>\n<ul>\n<li>\n<p>\u0438 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u0442\u044c <strong>editland<\/strong> \u0432 <strong>admin_panel<\/strong> \u0434\u0435\u043b\u0430\u0435\u043c &#8212; \u043f\u043e\u0434 \u0441\u0435\u043a\u0446\u0438\u0435\u0439 <em>Main Content<\/em>  \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <strong>IF<\/strong> \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0431\u044d\u043a\u0430  \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u0438\u0437 <strong>editland,<\/strong> \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0447\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u0438\u0445 \u043d\u0435\u0442\u0443:  <\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"xml\">&lt;!-- Main Content --> {% if json_data %} {% include 'editland.html' %} {% else %} &lt;main class=\"col-md-9 ms-sm-auto col-lg-10 px-md-4\"> &lt;div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"> &lt;h1 class=\"h2\">\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0410\u0434\u043c\u0438\u043d-\u041f\u0430\u043d\u0435\u043b\u044c&lt;\/h1> &lt;\/div>  &lt;!-- Content goes here --> &lt;div class=\"d-flex align-items-start\"> &lt;p>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043a\u0430 \u043e\u0442\u0441\u0443\u0442\u0432\u0443\u044e\u0442 \u0438\u043b\u0438 \u0438\u0445 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u0411\u0414&lt;\/p> &lt;\/div>   &lt;\/main> {% endif %}<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Include?<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Jinja2, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441 Flask, \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>include<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439. \u042d\u0442\u043e \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0445 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<\/p>\n<h4>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b include:<\/h4>\n<ol>\n<li>\n<p><strong>\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u041a\u043e\u0434\u0430:<\/strong><br \/> \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0441 \u0447\u0430\u0441\u0442\u044f\u043c\u0438 HTML (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0444\u0443\u0442\u0435\u0440, \u0431\u043e\u043a\u043e\u0432\u0443\u044e \u043f\u0430\u043d\u0435\u043b\u044c), \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0428\u0430\u0431\u043b\u043e\u043d\u043e\u0432:<\/strong><br \/> <code>include<\/code> \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u0438\u0431\u043a\u043e\u0441\u0442\u044c:<\/strong><br \/> \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u0438 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/details>\n<p>\u0418\u0442\u043e\u0433 \u043d\u0430\u0448 \u043a\u043e\u0434 admin_panel.html \u0438 editland.html  \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0411\u0414 <\/p>\n<p><strong>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432<\/strong><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<h3>1. \u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f editland.html:<\/h3>\n<ul>\n<li>\n<p><strong>\u0424\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445:<\/strong> \u0412 <code>editland.html<\/code> \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u043e\u0440\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u042d\u0442\u0430 \u0444\u043e\u0440\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043e\u043b\u044f \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong> \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u044b<\/strong> &#8212; \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u043a\u043e\u0434 \u0444\u043e\u0440\u043c\u044b <\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"xml\">&lt;main class=\"col-md-9 ms-sm-auto col-lg-10 px-md-4\"> &lt;div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\"> &lt;h1 class=\"h2\">\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0410\u0434\u043c\u0438\u043d-\u041f\u0430\u043d\u0435\u043b\u044c&lt;\/h1> &lt;\/div>  &lt;!-- Content goes here --> &lt;div class=\"d-flex align-items-start\"> &lt;div class=\"nav flex-column nav-pills me-3\" id=\"v-pills-tab\" role=\"tablist\" aria-orientation=\"vertical\"> {% for j_key, j_value in json_data.items() %} &lt;button class=\"nav-link\" id=\"v-pills-{{ j_key }}-tab\" data-bs-toggle=\"pill\"         data-bs-target=\"#v-pills-{{ j_key }}\" type=\"button\" role=\"tab\"         aria-controls=\"v-pills-{{ j_key }}\" aria-selected=\"false\">  {{ j_value[0].short_title }}  &lt;\/button> {% endfor %} &lt;\/div>         &lt;!-- \u041e\u0411\u041d\u041e\u0412\u041b\u0415\u041d\u041d\u042b\u0419 \u041a\u041e\u0414 - \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u044b -->        &lt;div class=\"tab-content\" id=\"v-pills-tabContent\"> {% for j_key, j_value in json_data.items() %} &lt;div class=\"tab-pane fade\" id=\"v-pills-{{ j_key }}\" role=\"tabpanel\"      aria-labelledby=\"v-pills-{{ j_key }}-tab\" style=\"position: absolute; left: 30%;\"> &lt;!-- \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u043e\u043f \u0441\u0442\u0438\u043b\u044c \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0438\u0441\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432 \u0441\u0442\u043e\u043b\u0431\u0438\u043a \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 --> {% for item in j_value %} &lt;form action=\"update_content\" method=\"post\"> &lt;!-- \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c 1 \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u0431\u043b\u043e\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 POST \u043d\u0430 endpoint update_content -->                            &lt;h3>&lt;input type=\"text\" name=\"short_title\" value=\"{{ item.short_title }}\">&lt;\/h3> &lt;!-- \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u0430 \u0432 \u043c\u0435\u043d\u044e header --> &lt;img src=\".{{ item.img }}\" alt=\"{{ item.altimg }}\"> &lt;!-- \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e --> &lt;input type=\"file\" name=\"img\">  &lt;!-- \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435  --> &lt;p>&lt;input type=\"text\" name=\"title\" value=\"{{ item.title }}\">&lt;\/p> &lt;!-- \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 --> &lt;p>&lt;textarea name=\"contenttext\">{{ item.contenttext }}&lt;\/textarea>&lt;\/p> &lt;!-- \u0442\u0435\u043a\u0441 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 --> &lt;input type=\"hidden\" name=\"id\" value=\"{{ item.id }}\"> &lt;!-- id  \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 - \u043f\u043e\u043b\u0435 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0444\u043e\u0440\u043c\u0435 --> &lt;button type=\"submit\" class=\"btn btn-primary\">\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f&lt;\/button> &lt;\/form> {% endfor %} &lt;\/div> {% endfor %} &lt;\/div> &lt;\/div>  &lt;\/main><\/code><\/pre>\n<p>\u043a\u043e\u0434 \u0432\u044b\u0448\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u0438\u043d \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u0431\u043b\u043e\u043a\u0430 \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 app.py<\/p>\n<h3> \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 \/update_content:<\/h3>\n<ul>\n<li>\n<p><strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u044b:<\/strong> \u0412 <code>app.py<\/code> \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 <code>\/update_content<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u0444\u043e\u0440\u043c\u044b \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/h3>\n<ul>\n<li>\n<p><code>import os<\/code>: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u043f\u0443\u0442\u0435\u0439 \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c.<\/p>\n<\/li>\n<li>\n<p><code>from werkzeug.utils import secure_filename<\/code>: \u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u0451\u043d \u0444\u0430\u0439\u043b\u043e\u0432, \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u044f \u0430\u0442\u0430\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"python\"># \u0432 \u0441\u0430\u043c\u043e\u043c \u0432\u0435\u0440\u0445\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438  import os # \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430  from werkzeug.utils import secure_filename #  \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430  # \u041f\u0443\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 path_to_save_images = os.path.join(app.root_path, 'static', 'imgs')  ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'}  def allowed_file(filename):     return '.' in filename and \\            filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS  @app.route('\/update_content', methods=['POST']) def update_content():      content_id = request.form['id']     short_title = request.form['short_title']     title = request.form['title']     altimg = request.form['altimg']     contenttext = request.form['contenttext']      # \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430     file = request.files['img']      if file and allowed_file(file.filename):         filename = secure_filename(file.filename)         save_path = os.path.join(path_to_save_images, filename)         imgpath = \"\/static\/imgs\/\"+filename         file.save(save_path)         # \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0443\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445      # \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0431\u0430\u0437\u0435     conn = sqlite3.connect('database.db')     cursor = conn.cursor()     if file:         cursor.execute('UPDATE content SET short_title=?, img=?, altimg=?, title=?, contenttext=? WHERE id=?',                    (short_title, imgpath, altimg, title, contenttext, content_id))     else:         cursor.execute('UPDATE content SET short_title=?, altimg=?, title=?, contenttext=? WHERE id=?',                        (short_title, altimg, title, contenttext, content_id))     conn.commit()     conn.close()      return redirect(url_for('admin_panel'))<\/code><\/pre>\n<p>\u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043c\u0435\u0442\u043e\u0434\u0443 POST \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <br \/>\u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b \u0444\u0430\u0439\u043b \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 <\/p>\n<h4>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439:<\/h4>\n<ul>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439:<\/strong> \u0415\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0411\u0414 \u0441 \u043d\u043e\u0432\u044b\u043c \u043f\u0443\u0442\u0435\u043c \u043a \u0444\u0430\u0439\u043b\u0443. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0412\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/h4>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0430\u043f\u043a\u0438 <\/strong><code>\/imgs<\/code>: \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043f\u0430\u043f\u043a\u0430 <code>\/static\/imgs<\/code> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u042d\u0442\u0443 \u043f\u0430\u043f\u043a\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430:<\/h4>\n<ul>\n<li>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u044b, \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0430:<\/strong> \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u044b, \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0430\u0432\u0442\u043e\u0440\u0435 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438. \u042d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438!<\/p>\n<\/li>\n<\/ul>\n<details class=\"spoiler\">\n<summary>\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430 \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f &#8212; \u0430\u0432\u0442\u043e\u0440 \u0438 \u0432\u0440\u0435\u043c\u044f<\/summary>\n<div class=\"spoiler__content\">\n<p>1) \u0432\u043e Flask \u0435\u0441\u0442\u044c Session, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0443\u0436\u0435 \u0432 \u043a\u043e\u0434\u0435 <br \/>\u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0443 {{ session[&#8216;user_id&#8217;] }}<br \/> &lt;input type=&#187;hidden&#187; name=&#187;user_id&#187; value=&#187;{{ session[&#8216;user_id&#8217;] }}&#187;><br \/>2) \u043d\u0430 backend \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0438\u0437 \u0444\u043e\u0440\u043c\u044b <br \/>3) \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e datetime \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <br \/>4)\u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0411\u0414 \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0430\u0432\u0442\u043e\u0440\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f<\/p>\n<\/div>\n<\/details>\n<h3>7.2 &#8212; \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 header \u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435 landing page<\/h3>\n<p>\u043c\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u043c , \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0411\u0414 , \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <\/p>\n<p>\u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043b\u044f endpoint \u043a\u043e\u0440\u043d\u044f \u0441\u0430\u0439\u0442\u0430 \u0432 app.py \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443  \u0432 landing.html<\/p>\n<p>\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0411\u0414 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430 \u0444\u0440\u043e\u043d\u0442 &#8212; \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0438\u0437 \/admin_panel <\/p>\n<pre><code class=\"python\">    conn = get_db_connection()     blocks = conn.execute('SELECT * FROM content').fetchall()  # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b content     conn.close()      # \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0411\u0414 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439     blocks_list = [dict(ix) for ix in blocks]     # print(blocks_list) [{\u0441\u0442\u0440\u043e\u043a\u0430 1 \u0438\u0437 \u0431\u0434},{\u0441\u0442\u0440\u043e\u043a\u0430 2 \u0438\u0437 \u0431\u0434},{\u0441\u0442\u0440\u043e\u043a\u0430 3 \u0438\u0437 \u0431\u0434}, \u0441\u0442\u0440\u043e\u043a\u0430 4 \u0438\u0437 \u0431\u0434]       # \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0443 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0432\u0430\u0440\u044c json     # \u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c JSON     json_data = {}     for raw in blocks_list:         # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u0435\u0441\u043b\u0438 \u043a\u043b\u044e\u0447 \u0435\u0449\u0435 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442         if raw['idblock'] not in json_data:             json_data[raw['idblock']] = []          # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u044e\u0447         json_data[raw['idblock']].append({             'id': raw['id'],             'short_title': raw['short_title'],             'img': raw['img'],             'altimg': raw['altimg'],             'title': raw['title'],             'contenttext': raw['contenttext'],             'author': raw['author'],             'timestampdata': raw['timestampdata']         })<\/code><\/pre>\n<p>\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u043d\u0430\u0448 \u043a\u043e\u0440\u0435\u043d\u044c &#8216;\/&#8217;<\/p>\n<pre><code class=\"python\">@app.route('\/') def home():     conn = get_db_connection()     blocks = conn.execute('SELECT * FROM content').fetchall()  # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b content     conn.close()      # \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0411\u0414 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439     blocks_list = [dict(ix) for ix in blocks]     # print(blocks_list) [{\u0441\u0442\u0440\u043e\u043a\u0430 1 \u0438\u0437 \u0431\u0434},{\u0441\u0442\u0440\u043e\u043a\u0430 2 \u0438\u0437 \u0431\u0434},{\u0441\u0442\u0440\u043e\u043a\u0430 3 \u0438\u0437 \u0431\u0434}, \u0441\u0442\u0440\u043e\u043a\u0430 4 \u0438\u0437 \u0431\u0434]       # \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0443 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u043e\u0434\u0438\u043d \u0441\u043b\u043e\u0432\u0430\u0440\u044c json     # \u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c JSON     json_data = {}     for raw in blocks_list:         # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u0435\u0441\u043b\u0438 \u043a\u043b\u044e\u0447 \u0435\u0449\u0435 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442         if raw['idblock'] not in json_data:             json_data[raw['idblock']] = []          # \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u044e\u0447         json_data[raw['idblock']].append({             'id': raw['id'],             'short_title': raw['short_title'],             'img': raw['img'],             'altimg': raw['altimg'],             'title': raw['title'],             'contenttext': raw['contenttext'],             'author': raw['author'],             'timestampdata': raw['timestampdata']         })     # \u0434\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c json_data \u043d\u0430 \u0444\u0440\u043e\u043d\u0442     return render_template('landing.html', json_data=json_data)<\/code><\/pre>\n<p>\u0438 \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435 \u0434\u043b\u044f landing.html <\/p>\n<p>\u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c id  div-a \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u0438\u044e \u0447\u0430\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430   <\/p>\n<p>\u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e &#8212; \u0432\u044b\u0432\u043e\u0434 header menu <\/p>\n<p>\u0438\u0437 \u044d\u0442\u043e\u0433\u043e <\/p>\n<pre><code class=\"xml\">&lt;!-- Header --> &lt;header> &lt;nav class=\"navbar navbar-expand-lg navbar-light bg-light\"> &lt;div class=\"container-fluid\"> &lt;a class=\"navbar-brand\" href=\"#\">Navbar&lt;\/a> &lt;button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarNav\"         aria-controls=\"navbarNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\"> &lt;span class=\"navbar-toggler-icon\">&lt;\/span> &lt;\/button> &lt;div class=\"collapse navbar-collapse\" id=\"navbarNav\"> &lt;ul class=\"navbar-nav\"> &lt;li class=\"nav-item\"> &lt;a class=\"nav-link\" href=\"#carouselExampleIndicators\">Carousel&lt;\/a> &lt;\/li> &lt;li class=\"nav-item\"> &lt;a class=\"nav-link\" href=\"#cards\">Cards&lt;\/a> &lt;\/li> &lt;li class=\"nav-item\"> &lt;a class=\"nav-link\" href=\"#featurette1\">Featurette 1&lt;\/a> &lt;\/li> &lt;li class=\"nav-item\"> &lt;a class=\"nav-link\" href=\"#featurette2\">Featurette 2&lt;\/a> &lt;\/li> &lt;\/ul> &lt;\/div> &lt;\/div> &lt;\/nav> &lt;\/header><\/code><\/pre>\n<p>\u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043b\u043e\u0432\u0430\u0440\u044f items(): <\/p>\n<ul>\n<li>\n<p>\u0432 \u043d\u0430\u0448\u0435\u043c json keys &#8212; \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c href \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0438\u0445 \u0431\u0443\u0434\u0435\u043c \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c {{ j_key }}<\/p>\n<\/li>\n<li>\n<p>\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e value \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e short_title \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c {{ j_value[0].short_title }}<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"xml\">&lt;!-- Header --> &lt;header> &lt;nav class=\"navbar navbar-expand-lg navbar-light bg-light\"> &lt;div class=\"container-fluid\"> &lt;a class=\"navbar-brand\" href=\"#\">Navbar&lt;\/a> &lt;button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarNav\"         aria-controls=\"navbarNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\"> &lt;span class=\"navbar-toggler-icon\">&lt;\/span> &lt;\/button> &lt;div class=\"collapse navbar-collapse\" id=\"navbarNav\"> &lt;ul class=\"navbar-nav\">                    &lt;!-- \u041e\u0411\u041d\u041e\u0412\u041b\u0415\u041d\u041d\u0410\u042f \u0427\u0410\u0421\u0422\u042c \u041a\u041e\u0414\u0410 --> {% for j_key, j_value in json_data.items() %}                         &lt;li class=\"nav-item\">                             &lt;a class=\"nav-link\" href=\"#{{ j_key }}\">{{ j_value[0].short_title }}&lt;\/a>                         &lt;\/li>                     {% endfor %}                   &lt;!-- \u041e\u0411\u041d\u041e\u0412\u041b\u0415\u041d\u041d\u0410\u042f \u0427\u0410\u0421\u0422\u042c \u041a\u041e\u0414\u0410  \u041a\u041e\u041d\u0415\u0426-->                    &lt;\/ul> &lt;\/div> &lt;\/div> &lt;\/nav> &lt;\/header><\/code><\/pre>\n<p>\u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043b <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/31b\/5ae\/fd3\/31b5aefd391d7e4ab86fbe1761e37b2f.png\" width=\"433\" height=\"183\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/31b\/5ae\/fd3\/31b5aefd391d7e4ab86fbe1761e37b2f.png\"\/><\/figure>\n<p><strong><u>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 slider<\/u><\/strong><\/p>\n<p>\u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 json \u0433\u0434\u0435 <strong>key =  carouselExampleIndicators<\/strong><\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435:<\/p>\n<ul>\n<li>\n<p>\u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043a\u0430\u0440\u0443\u0441\u0435\u043b\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0446\u0438\u043a\u043b\u0435 <code>{% for item in json_data['carouselExampleIndicators'] %}<\/code>. \u0410\u0442\u0440\u0438\u0431\u0443\u0442 <code>data-bs-slide-to<\/code> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>loop.index0<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u0446\u0438\u043a\u043b\u0435 (\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 0). \u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u0430\u0440\u0443\u0441\u0435\u043b\u0438 \u0442\u0430\u043a\u0436\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0446\u0438\u043a\u043b\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u0445 \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438 \u0442\u0435\u043a\u0441\u0442 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 <code>item<\/code> \u0432 <code>json_data['carouselExampleIndicators']<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e <code>json_data['carouselExampleIndicators']<\/code> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"xml\">&lt;!-- Carousel With Indicators --> &lt;div id=\"carouselExampleIndicators\" class=\"carousel slide\" data-bs-ride=\"carousel\">     &lt;!-- Indicators -->     &lt;div class=\"carousel-indicators\">         {% for item in json_data['carouselExampleIndicators'] %}             &lt;button type=\"button\" data-bs-target=\"#carouselExampleIndicators\" data-bs-slide-to=\"{{ loop.index0 }}\"                     class=\"{{ 'active' if loop.first else '' }}\" aria-label=\"Slide {{ loop.index }}\">&lt;\/button>         {% endfor %}     &lt;\/div>      &lt;!-- Carousel items -->     &lt;div class=\"carousel-inner\">         {% for item in json_data['carouselExampleIndicators'] %}             &lt;div class=\"carousel-item {{ 'active' if loop.first else '' }}\">                 &lt;img src=\"{{ item.img }}\" class=\"d-block w-100\" alt=\"{{ item.altimg }}\">                 &lt;div class=\"carousel-caption d-none d-md-block\">                     &lt;h5>{{ item.title }}&lt;\/h5>                     &lt;p>{{ item.contenttext }}&lt;\/p>                     &lt;button class=\"btn btn-primary\">Click Me&lt;\/button>                 &lt;\/div>             &lt;\/div>         {% endfor %}     &lt;\/div>      &lt;!-- Controls -->     &lt;button class=\"carousel-control-prev\" type=\"button\" data-bs-target=\"#carouselExampleIndicators\" data-bs-slide=\"prev\">         &lt;span class=\"carousel-control-prev-icon\" aria-hidden=\"true\">&lt;\/span>         &lt;span class=\"visually-hidden\">Previous&lt;\/span>     &lt;\/button>     &lt;button class=\"carousel-control-next\" type=\"button\" data-bs-target=\"#carouselExampleIndicators\" data-bs-slide=\"next\">         &lt;span class=\"carousel-control-next-icon\" aria-hidden=\"true\">&lt;\/span>         &lt;span class=\"visually-hidden\">Next&lt;\/span>     &lt;\/button> &lt;\/div><\/code><\/pre>\n<p><strong><u>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0431\u043b\u043e\u043a\u0430 Card<\/u><\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0446\u0438\u043a\u043b <code>{% for item in json_data['cards'] %}<\/code> \u0434\u043b\u044f \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 <code>json_data['cards']<\/code>.<\/p>\n<pre><code class=\"xml\">&lt;!-- Cards in grid --> &lt;section id=\"cards\" class=\"container mt-4\">     &lt;div class=\"row\">         {% for item in json_data['cards'] %}             &lt;div class=\"col-md-4\">                 &lt;div class=\"card\">                     &lt;img src=\"{{ item.img }}\" class=\"card-img-top rounded-circle mx-auto mt-3\"                          alt=\"{{ item.altimg }}\" style=\"width: 150px; height: 150px; object-fit: cover;\">                     &lt;div class=\"card-body\">                         &lt;h5 class=\"card-title\">{{ item.title }}&lt;\/h5>                         &lt;p class=\"card-text\">{{ item.contenttext }}&lt;\/p>                         &lt;a href=\"#\" class=\"btn btn-primary\">Go somewhere&lt;\/a>                     &lt;\/div>                 &lt;\/div>             &lt;\/div>         {% endfor %}     &lt;\/div> &lt;\/section><\/code><\/pre>\n<p><strong><u>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 Cards \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u043e\u0439 \u0441\u043b\u0435\u0432\u0430\/\u0441\u043f\u0440\u0430\u0432\u0430<\/u><\/strong> <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435:<\/p>\n<ul>\n<li>\n<p>\u0426\u0438\u043a\u043b <code>{% for count in range(1, 10) %}<\/code> \u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u0447\u0435\u0442\u0447\u0438\u043a <code>count<\/code> \u043e\u0442 1 \u0434\u043e 9 (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044f, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 9 featurette).<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>{% set feature_key = 'feature' ~ count %}<\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 featurette \u0432 <code>json_data<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0411\u043b\u043e\u043a <code>{% if json_data.get(feature_key) %}<\/code> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u043a\u043b\u044e\u0447 <code>feature_key<\/code> \u0432 <code>json_data<\/code>, \u0438 \u0435\u0441\u043b\u0438 \u0434\u0430, \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b featurette.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"xml\">&lt;!-- Horizontal Card with image  and text right --> {% for count in range(1, 10) %}  &lt;!-- \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 10 featurette -->     {% set feature_key = 'featurette' ~ count %}     {% if json_data.get(feature_key) %}         &lt;section id=\"featurette{{ count }}\" class=\"container mt-4\">             &lt;div class=\"row align-items-center\">                 {% if count % 2 == 1 %}                     &lt;!-- \u0414\u043b\u044f \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0445 featurette: \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0432\u0430, \u0442\u0435\u043a\u0441\u0442 \u0441\u043f\u0440\u0430\u0432\u0430 -->                     &lt;div class=\"col-md-6\">                         &lt;img src=\"{{ json_data[feature_key][0].img }}\" class=\"featurette-image img-fluid\" alt=\"{{ json_data[feature_key][0].altimg }}\">                     &lt;\/div>                     &lt;div class=\"col-md-6\">                         &lt;!-- \u0422\u0435\u043a\u0441\u0442 -->                         &lt;h2 class=\"featurette-heading\">{{ json_data[feature_key][0].title }}&lt;\/h2>                         &lt;p class=\"lead\">{{ json_data[feature_key][0].contenttext }}&lt;\/p>                     &lt;\/div>                 {% else %}                     &lt;!-- \u0414\u043b\u044f \u0447\u0435\u0442\u043d\u044b\u0445 featurette: \u0442\u0435\u043a\u0441\u0442 \u0441\u043b\u0435\u0432\u0430, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u0430 -->                     &lt;div class=\"col-md-6\">                         &lt;!-- \u0422\u0435\u043a\u0441\u0442 -->                         &lt;h2 class=\"featurette-heading\">{{ json_data[feature_key][0].title }}&lt;\/h2>                         &lt;p class=\"lead\">{{ json_data[feature_key][0].contenttext }}&lt;\/p>                     &lt;\/div>                     &lt;div class=\"col-md-6\">                         &lt;img src=\"{{ json_data[feature_key][0].img }}\" class=\"featurette-image img-fluid\" alt=\"{{ json_data[feature_key][0].altimg }}\">                     &lt;\/div>                 {% endif %}             &lt;\/div>         &lt;\/section>         &lt;hr class=\"featurette-divider\">     {% endif %} {% endfor %}<\/code><\/pre>\n<p><strong><u>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 footer<\/u><\/strong><\/p>\n<p>\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435: \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 &#8212; \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442\u0443, \u0442\u043e \u0441\u0442\u0430\u0432\u0438\u043c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/p>\n<pre><code class=\"xml\">&lt;!-- Footer --> &lt;footer class=\"footer mt-auto py-3 bg-light\">     &lt;div id=\"Footerblock\" class=\"container\">     {% for item in json_data['Footerblock'] %}         {% if item.contenttext  %}             &lt;span class=\"text-muted\">{{ item.contenttext }}&lt;\/span>         {% else %}             &lt;span class=\"text-muted\">Place sticky footer content here.&lt;\/span>         {% endif %}         {% endfor %}     &lt;\/div> &lt;\/footer><\/code><\/pre>\n<hr\/>\n<h2>\u0418\u0442\u043e\u0433\u0438: <\/h2>\n<p>\u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0412\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u043c\u0438\u043d\u0438 \u0430\u0434\u043c\u0438\u043d\u043a\u043e\u0439, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438 \u0444\u0440\u043e\u043d\u0442\u0430 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 admin panel. <\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u044b \u043d\u0430\u0448\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u043a\u0443 \u0434\u043b\u044f \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0440\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438\u043b\u0438 \u043a\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u043b \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0438 \u043a\u043e\u0433\u0434\u0430 &#8212; \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <\/p>\n<p>\u0437\u043d\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u043a\u0440\u044b\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435: <\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0435\u043b\u0435\u0442\u0430 \u0441\u0430\u0439\u0442\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 bootstrap5 <\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 landing page \u0438 admin \u0447\u0430\u0441\u0442\u0438 <\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0431\u043e\u0442\u0430 \u0441 session \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435 \u0438 \u043d\u0430 \u0431\u044d\u043a\u0435 <\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0411\u0414 sqlite <\/p>\n<\/li>\n<li>\n<p>\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f <\/p>\n<\/li>\n<li>\n<p>\u0434\u0435\u0448\u0438\u0432\u0440\u043e\u0432\u043a\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u0435\u0441\u0441\u0438\u0438 <\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0443 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0430 \u0431\u044d\u043a\u0435<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441 backend \u043d\u0430 frontend  <\/p>\n<\/li>\n<\/ul>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cfa\/842\/36b\/cfa84236b660072ddffbea0b74935659.png\" alt=\"\u0444\u0440\u043e\u043d\u0442 \u0441\u0430\u0439\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435\" title=\"\u0444\u0440\u043e\u043d\u0442 \u0441\u0430\u0439\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435\" width=\"1411\" height=\"1236\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cfa\/842\/36b\/cfa84236b660072ddffbea0b74935659.png\"\/><\/p>\n<div><figcaption>\u0444\u0440\u043e\u043d\u0442 \u0441\u0430\u0439\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435<\/figcaption><\/div>\n<\/figure>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a33\/4c5\/ccc\/a334c5ccc5bf49e84c4da807b3b458c3.png\" alt=\"\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u0435\" title=\"\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u0435\" width=\"1419\" height=\"1134\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a33\/4c5\/ccc\/a334c5ccc5bf49e84c4da807b3b458c3.png\"\/><\/p>\n<div><figcaption>\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d \u043f\u0430\u043d\u0435\u043b\u0435<\/figcaption><\/div>\n<\/figure>\n<p><strong>P.S.<\/strong> \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0438 \u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0430 <br \/>\u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u041d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a &#8212; \u0442\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u044b \u0443\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 freelance \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0430\u0439\u0442 \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 <br \/>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0430\u0439\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0441\u0432\u043e\u0435 ) <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0434 \u0431\u0443\u0434\u0443 \u0432\u0430\u0441 \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 <\/p>\n<hr\/>\n<p><strong><em><u>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/u><\/em><\/strong><\/p>\n<h3>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430<\/h3>\n<pre><code class=\"python\">\/static                  # \u044d\u0442\u0430 \u043f\u0430\u043f\u043a\u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f JS \u0438\u043b\u0438 CSS \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 .......\/images           # \u043f\u0430\u043f\u043a\u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \/templates ....... admin_panel.html  # \u0430\u0434\u043c\u0438\u043d\u043a\u0430 ....... editland.html     # \u0431\u043b\u043e\u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 (\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0432 admin_panel.html) ....... landing.html      # \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043b\u0435\u043d\u0433\u0438\u043d\u0433 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430  ....... login_adm.html    # \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0443 app.py                    # \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 backend database.db               # \u0411\u0430\u0437\u0430 \u0414\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430  createdb.py       # \u0441\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0411\u0414 createuser.py     # \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f decodesession.py  # \u0431\u043e\u043d\u0443\u0441 \u043f\u043e\u0438\u043d\u0442 - \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f session value<\/code><\/pre>\n<h3>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b:<\/h3>\n<p><a href=\"https:\/\/github.com\/MikhailNikitin9\/Flask_Landing-AdminPanel\" rel=\"noopener noreferrer nofollow\">\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c \u0442\u0443\u0442 <\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/784770\/\"> https:\/\/habr.com\/ru\/articles\/784770\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong>\u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438<\/strong>: \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 landing page \u0441 admin panel, \u043e\u0441\u043d\u0430\u0449\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0412\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430 \u0441\u0430\u0439\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u044c. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c &#8212; \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u043d\u0430 Flask \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430.<\/p>\n<p><strong>\u0427\u0442\u043e \u0432\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c<\/strong>:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043a\u0435\u043b\u0435\u0442\u0430 landing page \u043d\u0430 Bootstrap 5.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 admin panel \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u043d\u0430 \u043b\u0435\u043d\u0434\u0438\u043d\u0433\u0435.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0422\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u043d\u0430\u0432\u044b\u043a\u0438<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u041e\u0441\u043d\u043e\u0432\u044b <strong>Python<\/strong>: \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u044f\u0437\u044b\u043a\u0430 \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 <strong>HTML<\/strong>: \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u0435\u0433\u043e\u0432 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439: Flask \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 &#8212; <a href=\"https:\/\/habr.com\/ru\/articles\/783574\/\" rel=\"noopener noreferrer nofollow\">Flask \u0434\u043b\u044f\u00a0\u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445\u00a0\u2014 \u0427\u0430\u0441\u0442\u044c 1\u00a0\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0447\u0442\u0435\u043d\u0438\u044f<\/strong>: \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u00a0<u>30-40 \u043c\u0438\u043d\u0443\u0442<\/u>.<\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Bootstrap 5. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e HTML \u0434\u043b\u044f landing page, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Flask, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0432 \u043d\u0430\u0448 HTML \u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 SQLite \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0438 html \u043d\u0430 bootstrap 5.<br \/>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 Flask \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u043d\u0430\u0448 html \u043d\u0430 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u044b \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0442\u044f\u043d\u0443\u0442\u044c \u0441 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 SQLite<\/p>\n<h2>\u0428\u0430\u0433 1: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Landing Page (\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430)<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f landing page, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 Bootstrap. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d <a href=\"https:\/\/getbootstrap.com\/docs\/5.0\/examples\/carousel\/\" rel=\"noopener noreferrer nofollow\">Carousel<\/a>.<\/p>\n<p><u>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b Landing Page \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 Carousel \u0438\u0437 Bootstrap 5<\/u><\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b landing page, \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c Carousel, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 Bootstrap. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<\/p>\n<p>\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c \u043a\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 inspector \u043a\u043e\u0434\u0430 \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <a href=\"https:\/\/getbootstrap.com\/docs\/5.0\/examples\/carousel\/\" rel=\"noopener noreferrer nofollow\">https:\/\/getbootstrap.com\/docs\/5.0\/examples\/carousel\/<\/a> <\/p>\n<p>\u0438\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 : <br \/>\u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0432 html \u0444\u0430\u0439\u043b \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html> &lt;html lang=\"en\"> &lt;head> &lt;meta charset=\"UTF-8\"> &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"> &lt;title>Bootstrap Page&lt;\/title> &lt;!-- Bootstrap CSS --> &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.1.3\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\">  &lt;style>         .carousel-inner {             max-width: 1024px;             margin: auto;             height: 500px; \/* \u0412\u044b\u0441\u043e\u0442\u0430 \u043a\u0430\u0440\u0443\u0441\u0435\u043b\u0438 *\/         }          .carousel-inner img {             width: 100%;             height: 100%;             object-fit: cover; \/* \u041e\u0431\u0440\u0435\u0437\u043a\u0430 \u0438\u043b\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f *\/         }          .carousel-caption {             text-align: left; \/* \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e *\/             bottom: 30%; \/* \u041f\u0440\u0438\u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0438 \u043a\u043d\u043e\u043f\u043a\u0443 \u0432\u0432\u0435\u0440\u0445 *\/             right: 40%; \/* \u0426\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e *\/             transform: translateX(0%); \/* \u041a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f *\/             background-color: rgba(0, 0, 0, 0.1); \/* \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0444\u043e\u043d \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438 *\/             padding: 10px;         } &lt;\/style>  &lt;\/head> &lt;body> &lt;!-- Header --> &lt;header> &lt;nav class=\"navbar navbar-expand-lg navbar-light bg-light\"> &lt;div class=\"container-fluid\"> &lt;a class=\"navbar-brand\" href=\"#\">Navbar&lt;\/a> &lt;button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarNav\"         aria-controls=\"navbarNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\"> &lt;span class=\"navbar-toggler-icon\">&lt;\/span> &lt;\/button> &lt;div class=\"collapse navbar-collapse\" id=\"navbarNav\"> &lt;ul class=\"navbar-nav\"> &lt;li class=\"nav-item\">                       &lt;!-- \u0432 href \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c id div block \u043a\u0443\u0434\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043a\u0440\u043e\u043b\u043b --> &lt;a class=\"nav-link\" href=\"#carouselExampleIndicators\">Carousel&lt;\/a> &lt;\/li> &lt;li class=\"nav-item\"> &lt;a class=\"nav-link\" href=\"#cards\">Cards&lt;\/a> &lt;\/li> &lt;li class=\"nav-item\"> &lt;a class=\"nav-link\" href=\"#featurette1\">Featurette 1&lt;\/a> &lt;\/li> &lt;li class=\"nav-item\"> &lt;a class=\"nav-link\" href=\"#featurette2\">Featurette 2&lt;\/a> &lt;\/li> &lt;\/ul> &lt;\/div> &lt;\/div> &lt;\/nav> &lt;\/header>  &lt;!-- Carousel With Indicators --> &lt;div id=\"carouselExampleIndicators\" class=\"carousel slide\" data-bs-ride=\"carousel\"> &lt;!-- Indicators --> &lt;div class=\"carousel-indicators\"> &lt;button type=\"button\" data-bs-target=\"#carouselExampleIndicators\" data-bs-slide-to=\"0\" class=\"active\"         aria-current=\"true\" aria-label=\"Slide 1\">&lt;\/button> &lt;button type=\"button\" data-bs-target=\"#carouselExampleIndicators\" data-bs-slide-to=\"1\"         aria-label=\"Slide 2\">&lt;\/button> &lt;button type=\"button\" data-bs-target=\"#carouselExampleIndicators\" data-bs-slide-to=\"2\"         aria-label=\"Slide 3\">&lt;\/button> &lt;\/div>  &lt;!-- Carousel items --> &lt;div class=\"carousel-inner\"> &lt;div class=\"carousel-item active\"> &lt;img src=\"https:\/\/via.placeholder.com\/1024x500\" class=\"d-block w-100\" alt=\"First slide\"> &lt;div class=\"carousel-caption d-none d-md-block\"> &lt;h5>First Slide&lt;\/h5> &lt;p>Description for the first slide.&lt;\/p> &lt;button class=\"btn btn-primary\">Click Me&lt;\/button> &lt;\/div> &lt;\/div> &lt;div class=\"carousel-item\"> &lt;img src=\"https:\/\/via.placeholder.com\/1024x500\" class=\"d-block w-100\" alt=\"Second slide\"> &lt;div class=\"carousel-caption d-none d-md-block\"> &lt;h5>Second Slide&lt;\/h5> &lt;p>Description for the second slide.&lt;\/p> &lt;button class=\"btn btn-primary\">Click Me&lt;\/button> &lt;\/div> &lt;\/div> &lt;div class=\"carousel-item\"> &lt;img src=\"https:\/\/via.placeholder.com\/1024x500\" class=\"d-block w-100\" alt=\"Third slide\"> &lt;div class=\"carousel-caption d-none d-md-block\"> &lt;h5>Third Slide&lt;\/h5> &lt;p>Description for the third slide.&lt;\/p> &lt;button class=\"btn btn-primary\">Click Me&lt;\/button> &lt;\/div> &lt;\/div> &lt;\/div>  &lt;!-- Controls --> &lt;button class=\"carousel-control-prev\" type=\"button\" data-bs-target=\"#carouselExampleIndicators\"         data-bs-slide=\"prev\"> &lt;span class=\"carousel-control-prev-icon\" aria-hidden=\"true\">&lt;\/span> &lt;span class=\"visually-hidden\">Previous&lt;\/span> &lt;\/button> &lt;button class=\"carousel-control-next\" type=\"button\" data-bs-target=\"#carouselExampleIndicators\"         data-bs-slide=\"next\"> &lt;span class=\"carousel-control-next-icon\" aria-hidden=\"true\">&lt;\/span> &lt;span class=\"visually-hidden\">Next&lt;\/span> &lt;\/button> &lt;\/div>   &lt;!-- Cards in grid --> &lt;section id=\"cards\" class=\"container mt-4\"> &lt;div class=\"row\"> &lt;!-- Card 1 --> &lt;div class=\"col-md-4\"> &lt;div class=\"card\"> &lt;img src=\"https:\/\/via.placeholder.com\/150\" class=\"card-img-top rounded-circle mx-auto mt-3\"      alt=\"Card image 1\" style=\"width: 150px; height: 150px; object-fit: cover;\"> &lt;div class=\"card-body\"> &lt;h5 class=\"card-title\">Card Title 1&lt;\/h5> &lt;p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.&lt;\/p> &lt;a href=\"#\" class=\"btn btn-primary\">Go somewhere&lt;\/a> &lt;\/div> &lt;\/div> &lt;\/div>  &lt;!-- Card 2 --> &lt;div class=\"col-md-4\"> &lt;div class=\"card\"> &lt;img src=\"https:\/\/via.placeholder.com\/150\" class=\"card-img-top rounded-circle mx-auto mt-3\"      alt=\"Card image 2\" style=\"width: 150px; height: 150px; object-fit: cover;\"> &lt;div class=\"card-body\"> &lt;h5 class=\"card-title\">Card Title 2&lt;\/h5> &lt;p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.&lt;\/p> &lt;a href=\"#\" class=\"btn btn-primary\">Go somewhere&lt;\/a> &lt;\/div> &lt;\/div> &lt;\/div>  &lt;!-- Card 3 --> &lt;div class=\"col-md-4\"> &lt;div class=\"card\"> &lt;img src=\"https:\/\/via.placeholder.com\/150\" class=\"card-img-top rounded-circle mx-auto mt-3\"      alt=\"Card image 3\" style=\"width: 150px; height: 150px; object-fit: cover;\"> &lt;div class=\"card-body\"> &lt;h5 class=\"card-title\">Card Title 3&lt;\/h5> &lt;p class=\"card-text\">Some quick example text to build on the card title and make up the bulk of the card's content.&lt;\/p> &lt;a href=\"#\" class=\"btn btn-primary\">Go somewhere&lt;\/a> &lt;\/div> &lt;\/div> &lt;\/div> &lt;\/div> &lt;\/section>  &lt;!-- Horizontal Card with image left and text right --> &lt;section id=\"featurette1\" class=\"container mt-4\"> &lt;div class=\"row align-items-center\"> &lt;div class=\"col-md-6\"> &lt;img src=\"https:\/\/via.placeholder.com\/500\" class=\"featurette-image img-fluid\" alt=\"Placeholder Image\"> &lt;\/div> &lt;div class=\"col-md-6\"> &lt;!-- Text --> &lt;h2 class=\"featurette-heading\">\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0430&lt;\/h2> &lt;p class=\"lead\">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec elementum leo. Cras tincidunt magna ut aliquam tincidunt. Nunc lacinia turpis ac neque porta, a fermentum neque facilisis. Curabitur in felis nec ipsum sollicitudin fermentum. Sed ultrices, nunc vel mollis dapibus, lacus risus fermentum massa, id condimentum justo sem eget leo. Aenean efficitur, sapien in sodales cursus, ligula magna cursus lorem, a elementum nulla orci nec nunc.&lt;\/p> &lt;\/div> &lt;\/div> &lt;\/section>   &lt;hr class=\"featurette-divider\">  &lt;!-- Horizontal Card with image right and text left --> &lt;section id=\"featurette2\" class=\"container mt-4\"> &lt;div class=\"row align-items-center\"> &lt;div class=\"col-md-6\"> &lt;!-- Text --> &lt;h2 class=\"featurette-heading\">\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0430&lt;\/h2> &lt;p class=\"lead\">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec elementum leo. Cras tincidunt magna ut aliquam tincidunt. Nunc lacinia turpis ac neque porta, a fermentum neque facilisis. Curabitur in felis nec ipsum sollicitudin fermentum. Sed ultrices, nunc vel mollis dapibus, lacus risus fermentum massa, id condimentum justo sem eget leo. Aenean efficitur, sapien in sodales cursus, ligula magna cursus lorem, a elementum nulla orci nec nunc.&lt;\/p> &lt;\/div> &lt;div class=\"col-md-6\"> &lt;img src=\"https:\/\/via.placeholder.com\/500\" class=\"featurette-image img-fluid\" alt=\"...\"> &lt;\/div> &lt;\/div> &lt;\/section>  &lt;hr class=\"featurette-divider\">  &lt;!-- Repeat of the first horizontal card --> &lt;section id=\"featurette3\" class=\"container mt-4\"> &lt;div class=\"row align-items-center\"> &lt;div class=\"col-md-6\"> &lt;img src=\"https:\/\/via.placeholder.com\/500\" class=\"featurette-image img-fluid\" alt=\"...\"> &lt;\/div> &lt;div class=\"col-md-6\"> &lt;!-- Text --> &lt;h2 class=\"featurette-heading\">\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0430&lt;\/h2> &lt;p class=\"lead\">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec elementum leo. Cras tincidunt magna ut aliquam tincidunt. Nunc lacinia turpis ac neque porta, a fermentum neque facilisis. Curabitur in felis nec ipsum sollicitudin<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-364652","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/364652","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=364652"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/364652\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=364652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=364652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=364652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}