{"id":375460,"date":"2024-05-21T06:25:06","date_gmt":"2024-05-21T06:25:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=375460"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=375460","title":{"rendered":"<span>\u0424\u0430\u043d\u0442\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/1h\/q6\/uw\/1hq6uwd4hkdcwcjppmpzhb272pa.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/1h\/q6\/uw\/1hq6uwd4hkdcwcjppmpzhb272pa.png\"\/><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u043e\u0434\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c \u043c\u0438\u043a\u0440\u043e-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u0434\u043b\u044f Python \u2014 Flask. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0432\u043e\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437\u0443\u0447\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f flask, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u043c \u0435\u0433\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043c\u0438\u0440\u0430.<\/p>\n<p>  Flask \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f, \u0438\u0431\u043e \u043e\u043d \u0431\u044b\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439, \u0431\u044b\u0441\u0442\u0440\u044b\u0439, \u043b\u0451\u0433\u043a\u0438\u0439 \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f, \u0438 \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u043b\u0441\u044f \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u041c\u044b \u0437\u0430\u0442\u0440\u043e\u043d\u0435\u043c \u0432\u0441\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u043a\u043e\u0434\u0430. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a\u043e\u0439 \u0442\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u2014 \u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0443\u044e \u0441\u0442\u0435\u043d\u0443, \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0442\u0443\u0434\u0430 \u0437\u0430\u0439\u0442\u0438, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0441\u0442\u044b \u043d\u0430 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0441\u0442\u0435\u043d\u0435.<\/p>\n<p>  \u0410 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0431\u0435\u0437\u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u044b\u0439, \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043b\u0435\u0433\u043a\u0438\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<a name=\"habracut\"><\/a><\/p>\n<p>  \u041d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u044f \u043d\u0430\u0437\u0432\u0430\u043b Open Wall. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0445\u043e\u0442\u0438\u0442\u0435, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0439\u0442\u0435.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043e \u0447\u0435\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0437\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c, \u0432\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0442\u044c \u0441\u0430\u043c \u044f\u0437\u044b\u043a python, \u044f\u0437\u044b\u043a \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 HTML \u0438 CSS. \u0411\u0435\u0437 \u044d\u0442\u0438\u0445 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0432\u044b \u043c\u0430\u043b\u043e \u0447\u0442\u043e \u043f\u043e\u0439\u043c\u0435\u0442\u0435.<\/p>\n<p>  \u041f\u043e \u043c\u043e\u0435\u043c\u0443 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0443, Open Wall \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430:<\/p>\n<ul>\n<li>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/li>\n<li>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u043e\u0432 \u043d\u0430 \u043e\u0431\u0449\u0435\u0439 \u0441\u0442\u0435\u043d\u0435<\/li>\n<li>\u041f\u0440\u043e\u0444\u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/li>\n<\/ul>\n<p>  Open Wall \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u2014 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u044f \u0443\u043b\u0443\u0447\u0448\u0443 \u0435\u0433\u043e, \u0438 \u0441\u0434\u0435\u043b\u0430\u044e \u043d\u043e\u0432\u044b\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043d\u0430 \u0442\u0435\u043c\u0443 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 flask-admin.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u2014 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 <a href=\"https:\/\/alexeevdeveloper-openwall-f7c7.twc1.net\/\">\u0441\u0430\u043c \u0441\u0430\u0439\u0442<\/a> \u0438\u043b\u0438 \u0432 \u0435\u0433\u043e <a href=\"https:\/\/github.com\/AlexeevDeveloper\/openwall\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a>.<\/p>\n<p>  \u0417\u0430 \u0434\u0438\u0437\u0430\u0439\u043d \u0441\u0430\u0439\u0442\u0430 \u043d\u0435 \u0440\u0443\u0433\u0430\u0439\u0442\u0435, \u0432\u044b \u0432\u043e\u043b\u044c\u043d\u044b \u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u043a \u0445\u043e\u0442\u0438\u0442\u0435, \u044f \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u043b\u0435\u0433\u043a\u0438\u0439, \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u0430\u0439\u0442.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430. \u0422\u043e\u0433\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u043c \u0448\u0430\u0433\u0430\u043c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445. \u0412\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0434\u043b\u044f Linux.<\/p>\n<pre><code class=\"bash\">python3 -m venv venv &amp;&amp; source venv\/bin\/activate &amp;&amp; pip3 install flask gunicorn flask_login flask_sqlalchemy &amp;&amp; pip3 freeze > requirements.txt <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043c\u044b: \u0430) \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0435\u0433\u043e; \u0431) \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 \u0441\u0430\u043c flask \u0438 gunicorn \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0435\u0433\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435; \u0432) \u00ab\u0437\u0430\u043c\u043e\u0440\u043e\u0437\u0438\u043b\u0438\u00bb \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443:<\/p>\n<ul>\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e templates, \u0442\u0430\u043c \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u044b.<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e static\/css. static \u2014 \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 style.css \u0432 \u043f\u0430\u043f\u043a\u0435 css.<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 app.py, \u0433\u0434\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434.<\/li>\n<\/ul>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u0430\u043c\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"python\">from flask import Flask, render_template  app = Flask(__name__)   @app.route('\/') def index(): return render_template('index.html')   if __name__ == '__main__': app.run(debug=True) <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<ul>\n<li>from flask import Flask, render_template. \u042d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043c\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Flask \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0430 Jinja2-\u0448\u0430\u0431\u043b\u043e\u043d\u0430. \u041e \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435.<\/li>\n<li>app = Flask(__name__). \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/users\/app\/\" class=\"user_link\">app<\/a>.route(&#8216;\/&#8217;). \u042d\u0442\u043e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0430 \u043f\u0443\u0442\u0438 \u0441\u0430\u0439\u0442\u0430 \u2014 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043a\u043e\u0440\u0435\u043d\u044c, \/. \u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u0434\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0433\u0434\u0435 \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d.<\/li>\n<li>if __name__ == &#8216;__main__&#8217;. \u042d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u0434, \u0435\u0441\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e (\u043d\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f).<\/li>\n<li>app.run(debug=True). \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0434\u0435\u0431\u0430\u0433\u043e\u043c. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c host, port.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u0428\u0430\u0431\u043b\u043e\u043d\u044b<\/font><\/h2>\n<p>  \u0412 Flask \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440 Jinja. \u042d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c HTML-\u0448\u0430\u0431\u043b\u043e\u043d\u044b. \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d base.html:<\/p>\n<pre><code class=\"html\">&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>Document&lt;\/title> &lt;\/head> &lt;body> {% block content %} {% endblock %} &lt;\/body> &lt;\/html> <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0441 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u043c\u0438 \u2014 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0446\u0438\u043a\u043b for:<\/p>\n<pre><code class=\"plaintext\">{% for item in items %} {{ item }} {% endfor %} <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u2014 \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/font><\/h2>\n<p>  Flask \u2014 \u044d\u0442\u043e \u043c\u0438\u043a\u0440\u043e\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u0430\u044f, \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c sqlite3. \u041d\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u2014 Flask SQLAlchemy. \u042d\u0442\u043e ORM \u043c\u043e\u0434\u0443\u043b\u044c, \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0411\u0414 \u2014 \u043e\u0442 sqlite \u0434\u043e MySQL. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c sqlite.<\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0411\u0414:<\/p>\n<pre><code class=\"python\">from datetime import datetime from flask import Flask, render_template, url_for, request, redirect, flash, get_flashed_messages from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager, UserMixin, current_user, login_user, logout_user, login_required from werkzeug.security import generate_password_hash, check_password_hash from sqlalchemy import desc  app = Flask(__name__) login = LoginManager(app) login.login_view = 'login' app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:\/\/\/wall.db' app.config['SECRET_KEY'] = '\u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447' db = SQLAlchemy(app)   @login.user_loader def load_user(id): return db.session.get(User, int(id))   @app.route('\/logout') def logout():     logout_user()     return redirect(url_for('index'))   class Post(db.Model): __tablename__ = 'posts' id = db.Column(db.Integer(), primary_key=True) title = db.Column(db.String(255), nullable=False) content = db.Column(db.Text(), nullable=False) created_on = db.Column(db.DateTime(), default=datetime.utcnow) author = db.Column(db.Integer(), nullable=False)  def __repr__(self): return \"&lt;{}:{}>\".format(self.id,  self.title[:10])   class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(63), index=True, unique=True) password_hash = db.Column(db.String(127))  def set_password(self, password): self.password_hash = generate_password_hash(password)  def check_password(self, password): return check_password_hash(self.password_hash, password)  def __repr__(self): return '&lt;{}:{}>'.format(self.id, self.username[:10]) <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043a\u043e\u0434 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<ul>\n<li>\u041c\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c datetime \u2014 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0432 \u0411\u0414.<\/li>\n<li>\u041c\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f Flask \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 Flask, render_template, url_for (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 URL \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430), request \u2014 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0444\u043e\u0440\u043c, redirect \u2014 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043d\u0430 URL \u043d\u0430 \u0441\u0430\u0439\u0442\u0435, flash \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0445 flash-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439), get_flashed_messages \u2014 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c flash-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435.<\/li>\n<li>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f flask_login \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438. Flask Login \u2014 \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u0445\u043e\u0434\u0430 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438. \u041c\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c LoginManager \u2014 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0432\u0445\u043e\u0434\u0430\u043c\u0438, UserMixin \u2014 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, current_user \u2014 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0435\u0433\u043e \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0435\u0433\u043e ID, \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0432\u043e\u0448\u0435\u043b \u043b\u0438 \u044e\u0437\u0435\u0440 \u0432 \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442. login_user \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, logout_user \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0438 login_required \u2014 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043b\u043e\u0433\u0438\u043d.<\/li>\n<li>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u2014 \u0438\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0443\u043b\u044f Werkzeug, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0434\u0432\u0443\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u2014 generate_password_hash \u0438 check_password_hash. \u0412 \u043b\u044e\u0431\u044b\u0445 \u0411\u0414 \u043f\u0430\u0440\u043e\u043b\u0438 \u0445\u0440\u0430\u043d\u044f\u0442 \u0432 \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0430\u0436\u0435 \u0441 \u0441\u043e\u043b\u044c\u044e \u2014 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0431\u0443\u043a\u0432, \u0438\u0431\u043e \u0435\u0441\u043b\u0438 \u0432\u0437\u043b\u043e\u043c\u0430\u044e\u0442 \u0411\u0414, \u0442\u043e \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u0438. \u0410 \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u043e\u043b\u0438 \u0442\u044f\u0436\u0435\u043b\u043e \u0432\u0437\u043b\u043e\u043c\u0430\u0442\u044c \u2014 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. \u041c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u044e \u2014 \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0445\u0435\u0448 \u043e\u0434\u043d\u043e\u0439 \u0444\u0440\u0430\u0437\u044b \u0438 \u0445\u0435\u0448 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442, \u043d\u043e \u0444\u0440\u0430\u0437\u044b \u0440\u0430\u0437\u043d\u044b\u0435. \u041d\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0438 \u043e\u0447\u0435\u043d\u044c \u0442\u0440\u0443\u0434\u043d\u043e, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c\u043e.<\/li>\n<li>\u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u2014 \u044d\u0442\u043e desc \u0438\u0437 sqlalchemy. \u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u044b \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0438\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430:<\/p>\n<ul>\n<li>app = Flask(__name__). \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/li>\n<li>login = LoginManager(app). LoginManager \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u043e\u0433\u0438\u043d\u0430\u043c\u0438, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c<\/li>\n<li>\u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u0434\u043b\u044f \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041e \u043f\u0443\u0442\u0438 login \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043d\u0438\u0436\u0435<\/li>\n<li>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0437\u0430\u0434\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 SQLALCHEMY_DATABASE_URI \u2014 \u044d\u0442\u043e \u043f\u0443\u0442\u044c \u0434\u043e \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<li>\u041f\u043e\u0441\u043b\u0435 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447. \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/li>\n<li>\u0418 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 SQLAlchemy.<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430:<\/p>\n<ul>\n<li>\u041f\u0435\u0440\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u2014 load_user, \u0441 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u043c <a href=\"https:\/\/habr.com\/ru\/users\/login\/\" class=\"user_link\">login<\/a>.user_loader. \u042d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u0411\u0414 \u043f\u043e \u0435\u0433\u043e ID<\/li>\n<li>\u0412\u0442\u043e\u0440\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u2014 logout. \u042d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e logout_user (\u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430) \u0438\u0437 flask_login, \u0438 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/li>\n<\/ul>\n<p>  \u041d\u0430\u0441\u0442\u0430\u043b\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u044d\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0441\u0442\u0430:<\/p>\n<ul>\n<li>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 Post, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044f \u0435\u0433\u043e \u043e\u0442 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 db.Model.<\/li>\n<li>\u041c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 posts.<\/li>\n<li>\u041c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c id \u2014 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f, \u0442\u043e \u0435\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/li>\n<li>\u0414\u0430\u043b\u0435\u0435 \u2014 title, \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u043e\u0439 255 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e (nullable).<\/li>\n<li>\u041f\u043e\u0441\u043b\u0435 \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 content \u2014 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u0438. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 nullable).<\/li>\n<li>\u041f\u0440\u0435\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u0434\u0430\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430, \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u043f\u043e UTC, \u043a\u043e\u0433\u0434\u0430 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u043e\u0441\u0442.<\/li>\n<li>\u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e author, \u043a\u0443\u0434\u0430 \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c ID \u0430\u0432\u0442\u043e\u0440\u0430 (\u0442\u043e \u0435\u0441\u0442\u044c ID \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, current_user.id).<\/li>\n<li>\u041e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f __repr__. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/li>\n<\/ul>\n<p>  \u0418 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<ul>\n<li>\u041a\u0440\u043e\u043c\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f db.Model, \u043c\u044b \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 UserMixin, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Flask Login.<\/li>\n<li>\u0422\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0441\u0442\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c id, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f<\/li>\n<li>\u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u2014 63.<\/li>\n<li>\u0418 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0445\u0435\u0448\u0430 \u043f\u0430\u0440\u043e\u043b\u044f \u2014 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u043e\u0439, \u043d\u0435\u0442, \u043d\u0435 127, \u0430 128 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.<\/li>\n<li>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0432\u0435 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 set_password \u0438 check_password. \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u0445\u0435\u0448, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u0430\u0440\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0430\u043d \u043d\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0438\u0437 \u0431\u0434. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c werkzeug.<\/li>\n<li>\u0418 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e __repr__, \u043a\u0430\u043a \u0438 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/li>\n<\/ul>\n<p>  \u0412\u043e\u0442 \u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043f\u043e\u0437\u0430\u0434\u0438. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0443\u0436\u0435 \u043e\u0441\u043d\u043e\u0432\u0443, \u0441\u043a\u0435\u043b\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u2014 \u0441\u0430\u043c\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0441\u0430\u0439\u0442\u0430, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0411\u0414.<\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0443\u0442\u0435\u0439 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/font><\/h2>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0435\u043c c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 index. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441\u0430\u0439\u0442\u0430.<\/p>\n<pre><code class=\"python\">@app.route('\/') @app.route('\/index') def index(): posts = Post.query.order_by(desc(Post.created_on)).all()  return render_template('index.html', posts=posts) <\/code><\/pre>\n<p>  \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 index \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u0434\u0432\u0430 \u043f\u0443\u0442\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u2014 \/ \u0438 \/index. \u041f\u043e\u0441\u043b\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0442\u043e\u0432, \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043c\u043e\u0434\u0435\u043b\u0438 Post, \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u043c \u0432\u044b\u0434\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0441\u0442\u044b, \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0434\u0430\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0435\u043d\u0434\u0435\u0440 \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0442\u043e\u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0430\u043c \u0448\u0430\u0431\u043b\u043e\u043d index.html \u0438 base.html. \u0421\u0430\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 templates. base.html \u2014 \u044d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d, \u043e\u0442 \u043d\u0435\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f \u0443\u0436\u0435 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435. \u0412 \u043d\u0435\u043c \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u0444\u043e\u0440\u043c\u0443 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0431\u043b\u043e\u043a\u0438. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0432\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043d \u0443 \u043c\u0435\u043d\u044f:<\/p>\n<pre><code class=\"html\">&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>Open Wall&lt;\/title> &lt;link rel=\"stylesheet\" href=\"{{ url_for('static', filename='css\/style.css') }}\"> &lt;\/head> &lt;body>  &lt;div class=\"wrapper\"> &lt;div class=\"header\"> &lt;h1>&lt;a href=\"\/\" style='color: white; text-decoration: none;'>Open Wall - \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0430\u044f \u0441\u0442\u0435\u043d\u0430&lt;\/a>&lt;\/h1> &lt;a href=\"https:\/\/github.com\/AlexeevDeveloper\/openwall\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439&lt;\/a> &lt;a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/812413\/\">\u0421\u0442\u0430\u0442\u044c\u044f&lt;\/a> {% if not current_user.is_authenticated %} &lt;a href=\"\/login\">\u0412\u043e\u0439\u0442\u0438&lt;\/a> &lt;a href=\"\/reg\">\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f&lt;\/a> {% else %} &lt;a href=\"\/new\">\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0441\u0442&lt;\/a> {% endif %} &lt;\/div>  &lt;div class=\"content\"> {% block content %} {% endblock %} &lt;\/div>  &lt;div class=\"footer\"> \u0412\u0441\u0435 \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0437\u0434\u0435\u0441\u044c - \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430. \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043d\u0430 Open Wall! &lt;\/div> &lt;\/div>  &lt;\/body> &lt;\/html> <\/code><\/pre>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 HTML, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u0442\u044c. \u041a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438, \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0441 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u043c\u0438 \u2014 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0430 Jinja, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u2014 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0432 head-\u0431\u043b\u043e\u043a\u0435, \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 link, \u0433\u0434\u0435 \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c CSS \u0441\u0442\u0438\u043b\u0438, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 {{ url_for(&#8216;static&#8217;, filename=&#8217;css\/style.css&#8217;) }}. \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0443\u0442\u044c, \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u0447\u0435\u0440\u0435\u0437 url_for (\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0437 Flask). \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u0434\u043e \u0441\u0442\u0438\u043b\u0435\u0439, \u043b\u0435\u0436\u0430\u0442 \u043e\u043d\u0438 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 static. \u0412\u0442\u043e\u0440\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430 \u2014 css\/style.css.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0438\u043b\u0438 (\u044f \u043d\u0435 \u0441\u0442\u0430\u043b \u0441\u044e\u0434\u0430 \u0438\u0445 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c, \u0438\u0431\u043e \u044d\u0442\u043e \u0437\u0430\u043d\u044f\u043b\u043e \u0431\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430) \u2014 \u0442\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043f\u043e <a href=\"https:\/\/github.com\/AlexeevDeveloper\/openwall\/blob\/main\/static\/css\/style.css\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p>  \u041d\u0438\u0436\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0442\u0438\u043f\u0430 if-else, \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440. \u041f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u043c\u044b \u0443\u0437\u043d\u0430\u0435\u043c, \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d \u0438\u043b\u0438 \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u043c\u044b \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e, \u0430 \u0438\u043d\u0430\u0447\u0435 \u2014 \u043e\u0434\u043d\u0443 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u0430. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043c\u044b \u0434\u0430\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0443 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0430\u0441\u044c.<\/p>\n<p>  \u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u2014 \u044d\u0442\u043e \u0431\u043b\u043e\u043a \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. \u0427\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u043b\u043e\u043a, \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0443\u0434\u0430 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0444\u0430\u0439\u043b index.html:<\/p>\n<pre><code class=\"html\">{% extends 'base.html' %}  {% block content %} {% for post in posts %} &lt;div class=\"posts\"> &lt;div class=\"post\"> &lt;div class=\"header\"> &lt;h2>{{ post.title }}&lt;\/h2> &lt;\/div> {{ post.content }} &lt;hr> &lt;a href=\"\/profile\/{{ post.author }}\">\u0410\u0432\u0442\u043e\u0440: {{ post.author }} \u0414\u0430\u0442\u0430: {{ post.created_on }} &lt;\/div> &lt;\/div> {% endfor %} {% endblock %} <\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\u041a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 extends &#8216;base.html&#8217; \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d.<\/li>\n<li>\u041f\u043e\u0441\u043b\u0435 \u043c\u044b \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u043b\u043e\u043a content \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0442\u043e\u0432.<\/li>\n<li>\u0414\u0430\u043b\u044c\u0448\u0435, \u0432 \u0441\u0430\u043c\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0446\u0438\u043a\u043b, \u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 posts (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438) \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u043c: \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0430 (\u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435) \u0438 \u0434\u0430\u0442\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430.<\/li>\n<li>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043c\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u043c, \u0447\u0442\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0438 \u0446\u0438\u043a\u043b \u0438 \u0431\u043b\u043e\u043a.<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/_k\/mq\/dr\/_kmqdr-mbz_bgsr1aott1a8hlbi.png\" data-src=\"https:\/\/habrastorage.org\/webt\/_k\/mq\/dr\/_kmqdr-mbz_bgsr1aott1a8hlbi.png\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"python\">@app.route('\/reg', methods=['GET', 'POST']) def reg(): if current_user.is_authenticated: return redirect(url_for('index'))  if request.method == 'POST': username = request.form['username'] password = request.form['password'] password2 = request.form['password2']  if password != password2: flash('\u041f\u0430\u0440\u043e\u043b\u0438 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442') return render_template('reg.html')  if len(username) > 63: flash('\u0414\u043b\u0438\u043d\u0430 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 63 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432') return render_template('reg.html')  try: user = User(username=username) user.set_password(password) db.session.add(user) db.session.commit() except Exception as e: flash(f'\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: {e}') return render_template('reg.html') else: login_user(user) return redirect('index')  return render_template('reg.html') <\/code><\/pre>\n<p>  \u041c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u2014 \u044d\u0442\u043e \/reg. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 METHODS, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u2014 GET \u0438 POST.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u0415\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u2014 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e POST, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e. \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c username, \u043f\u0430\u0440\u043e\u043b\u044c \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f \u0438\u0437 \u0444\u043e\u0440\u043c\u044b, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043b\u0438\u043d\u0443 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u043e\u0441\u043b\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0430 \u043f\u0440\u0438 \u043f\u0440\u043e\u0432\u0430\u043b\u0435 \u0438\u043b\u0438 \u043f\u0440\u0438 GET-\u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u2014 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d reg.html:<\/p>\n<pre><code class=\"html\">{% extends 'base.html' %}  {% block content %} &lt;h2>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f&lt;\/h2>  &lt;form method=\"POST\">  {% for msg in get_flashed_messages() %} &lt;div class=\"error\"> {{ msg }} &lt;\/div> {% endfor %}  \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: &lt;input type=\"text\" name='username' placeholder=\"\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\">&lt;br> \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c: &lt;input type=\"password\" name='password' placeholder=\"\u041f\u0430\u0440\u043e\u043b\u044c\">&lt;br> \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c: &lt;input type=\"password\" name='password2' placeholder=\"\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c\">&lt;br> &lt;br> &lt;input type=\"submit\" class='btn'> &lt;br> &lt;\/form> {% endblock %} <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e get_flashed_messages \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f flash-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/z3\/i4\/gs\/z3i4gse59ginfke1vxxufeawvau.png\" data-src=\"https:\/\/habrastorage.org\/webt\/z3\/i4\/gs\/z3i4gse59ginfke1vxxufeawvau.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/cp\/4t\/xa\/cp4txasrclnjxcq21zn75wpdfko.png\" data-src=\"https:\/\/habrastorage.org\/webt\/cp\/4t\/xa\/cp4txasrclnjxcq21zn75wpdfko.png\"\/><\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043b\u043e\u0433\u0438\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"python\">@app.route('\/login', methods=['GET', 'POST']) def login(): if current_user.is_authenticated: return redirect(url_for('index'))  if request.method == 'POST': user = db.session.query(User).filter(User.username == request.form['username']).first()  if user is not None: if not user.check_password(request.form['password']): flash('\u041f\u0430\u0440\u043e\u043b\u044c \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439') return render_template('login.html')  login_user(user) return redirect(url_for('index')) else: flash('\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\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.html') <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u0442\u0438\u043f\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d \u043b\u0438 \u0443\u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 \u0442\u0430\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0415\u0441\u043b\u0438 \u043e\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0445\u0435\u0448 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 (\u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439, \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u043e\u0431 \u044d\u0442\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435). \u0415\u0441\u043b\u0438 \u0445\u0435\u0448\u0438 \u0441\u043e\u0432\u043f\u0430\u043b\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<p>  \u0428\u0430\u0431\u043b\u043e\u043d \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043b\u043e\u0433\u0438\u043d\u0430:<\/p>\n<pre><code class=\"html\">{% extends 'base.html' %}  {% block content %} &lt;h2>\u0412\u0445\u043e\u0434 \u0432 \u0430\u043a\u043a\u0430\u0443\u043d\u0442&lt;\/h2>  &lt;form method=\"POST\">  {% for msg in get_flashed_messages() %} &lt;div class=\"error\"> {{ msg }} &lt;\/div> {% endfor %}  \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: &lt;input type=\"text\" name='username' placeholder=\"\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\">&lt;br> \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c: &lt;input type=\"password\" name='password' placeholder=\"\u041f\u0430\u0440\u043e\u043b\u044c\">&lt;br> &lt;br> &lt;input type=\"submit\" class='btn'> &lt;br> &lt;\/form> {% endblock %} <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0438 \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438. \u0420\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u0431\u0435\u0437 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u043e\u043b\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/au\/mx\/kr\/aumxkrznz4nfouuhpkfhbwbb9oe.png\" data-src=\"https:\/\/habrastorage.org\/webt\/au\/mx\/kr\/aumxkrznz4nfouuhpkfhbwbb9oe.png\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u0434\u043e\u0445\u043d\u0435\u043c, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f:<\/p>\n<pre><code class=\"python\">@app.route('\/profile\/&lt;username>') def profile(username: str): user = db.session.query(User).filter(User.username == username.first()  if user is None: return redirect('index')  posts = db.session.query(Post).filter(Post.author == username).order_by(desc(Post.created_on)).all()  return render_template('profile.html', username=username, posts=posts) <\/code><\/pre>\n<p>  \u0412 \u043f\u0443\u0442\u0438 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043b\u044d\u0448\u0430 \u0441\u043b\u043e\u0432\u043e username. \u042d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043f\u043e\u0441\u043b\u0435 \/profile\/. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u042d\u0442\u043e\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0438 \u043f\u0440\u0438 \u043b\u043e\u0433\u0438\u043d\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u043f\u043e\u0441\u0442\u044b \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e \u0434\u0430\u0442\u0435, \u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c username \u0438 posts \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e render_template. \u0410 \u0432\u043e\u0442 \u0441\u0430\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0444\u0438\u043b\u044f:<\/p>\n<pre><code class=\"html\">{% extends 'base.html' %}  {% block content %} &lt;h2>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c: {{ username }}&lt;\/h2> {% if current_user.username == username %} &lt;a href=\"\/logout\">\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430&lt;\/a> {% endif %} &lt;h3 style='text-align: center;'>\u041f\u043e\u0441\u0442\u044b&lt;\/h3> {% for post in posts %} {% if post.author == username %} &lt;div class=\"posts\"> &lt;div class=\"post\"> &lt;div class=\"header\"> &lt;h2>{{ post.title }}&lt;\/h2> &lt;\/div> {{ post.content }} &lt;hr> \u0414\u0430\u0442\u0430: {{ post.created_on }} &lt;\/div> &lt;\/div> {% endif %} {% endfor %} {% endblock %} <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0444\u0438\u0447\u0443 \u2014 \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u0436\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430, \u0442\u043e \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u043e\u0444\u0438\u043b\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/n5\/qw\/am\/n5qwamqa9ljjt6bztcata24bwgs.png\" data-src=\"https:\/\/habrastorage.org\/webt\/n5\/qw\/am\/n5qwamqa9ljjt6bztcata24bwgs.png\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ap\/b3\/9o\/apb39oad8s86lvfbwhws9p4ibrc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ap\/b3\/9o\/apb39oad8s86lvfbwhws9p4ibrc.png\"\/><\/p>\n<p>  \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430.<\/p>\n<pre><code class=\"python\">@login_required @app.route('\/new', methods=['GET', 'POST']) def new_post(): if not current_user.is_authenticated: return redirect('login')  if request.method == 'POST': title = request.form['title'] content =  request.form['content']  if len(title) > 0 and len(title) &lt; 256 and len(content) > 0: post = Post(title=title, content=content, author=current_user.username)  try: db.session.add(post) db.session.commit() except Exception as e: flash(f'\u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445: {e}') else: return redirect('index') else: flash('\u041e\u0448\u0438\u0431\u043a\u0430, \u0434\u043b\u0438\u043d\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u043f\u043e\u0441\u0442\u0430 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 - 255.') return render_template('newpost.html')  return render_template('newpost.html') <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043a\u0430\u043a \u0440\u0430\u0437 \u043c\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 login_required. \u0418 \u0442\u0430\u043a\u0436\u0435 \u043c\u044b, \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u043e\u0431\u0445\u043e\u0434\u0430 \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u2014 \u0442\u043e \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043b\u043e\u0433\u0438\u043d\u0430.<\/p>\n<p>  \u041f\u043e\u0442\u043e\u043c \u043c\u044b \u0442\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0438 \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438, \u0435\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 POST \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043f\u043e\u0441\u0442\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u0411\u0414.<\/p>\n<p>  \u0412\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d newpost.html:<\/p>\n<pre><code class=\"html\">{% extends 'base.html' %}  {% block content %} &lt;h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438&lt;\/h2>  &lt;form method=\"POST\"> {% for msg in get_flashed_messages() %} &lt;div class=\"error\"> {{ msg }} &lt;\/div> {% endfor %}  \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u0442\u0430\u0442\u044c\u0438 &lt;input type=\"text\" name='title' placeholder=\"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a\">&lt;br> \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 &lt;textarea name=\"content\" id=\"\">&lt;\/textarea> &lt;br> &lt;input type=\"submit\" class='btn'> &lt;br> &lt;\/form> {% endblock %} <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/--\/ck\/wk\/--ckwkpbblqprtujluuiy-akp4s.png\" data-src=\"https:\/\/habrastorage.org\/webt\/--\/ck\/wk\/--ckwkpbblqprtujluuiy-akp4s.png\"\/><\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f<\/font><\/h2>\n<p>  \u0412 \u0444\u0430\u0439\u043b app.py (\u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f), \u0432 \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u043d\u0435\u0446, \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440:<\/p>\n<pre><code class=\"python\">if __name__ == '__main__': app.run(debug=True, port=5000) <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e (\u043d\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f), \u0442\u043e \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0434\u0435\u0431\u0430\u0433\u043e\u043c \u0438 \u043f\u043e\u0440\u0442\u043e\u043c \u043d\u0430 5000.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b create_db.py, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">from app import app, db  with app.app_context(): db.create_all() <\/code><\/pre>\n<p>  \u041c\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c app \u0438 db \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (app) \u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 with \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 create_all \u0438\u0437 db.<\/p>\n<p>  \u0418 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0444\u0430\u0439\u043b \u2014 main.py, \u043e\u043d \u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440, \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e gunicorn (\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u043b\u0430\u0441\u043a-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435) \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0441\u0442\u0435\u043d\u0443:<\/p>\n<pre><code class=\"python\">from app import app   if __name__ == '__main__': app.run(debug=False) <\/code><\/pre>\n<p>  \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 bash-\u0441\u043a\u0440\u0438\u043f\u0442 deploy.sh, \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash  pip3 install -r requirements.txt  python3 create_db.py  echo \"END\" <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0411\u0414.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0430\u0439\u0442 \u2014 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0432\u0435\u0441\u0442\u0438 \u0434\u0432\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (\u043d\u0430 \u0432\u044b\u0431\u043e\u0440):<\/p>\n<ul>\n<li>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 python3 app.py.<\/li>\n<li>\u041f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d \u0441\u0435\u0440\u0432\u0435\u0440 \u2014 gunicorn main:app &#8212;timeout 60.<\/li>\n<\/ul>\n<p>  \u0418 \u0432\u043e\u0442, \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e. \u041c\u044b \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u043c\u043e\u043b\u043e\u0434\u0446\u044b. \u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0438\u043d\u0443\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0430\u0439\u0442 \u0434\u0440\u0443\u0433\u0443\u2026 \u0421\u0442\u043e\u043f, \u0442\u0430\u043a \u043c\u044b \u0436\u0435 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u0445\u043e\u0441\u0442\u0435?<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<ul>\n<li>1 \u2014 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440, \u0441\u0430\u043c\u043e\u043c\u0443 \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c.<\/li>\n<li>2 \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 netlify \u0438\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0435\u0439<\/li>\n<\/ul>\n<p>  \u041e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442. \u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0443\u0442\u043e\u0440\u043d\u044b\u0439, \u0430 2, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0438\u0437 \u0420\u0424 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.<\/p>\n<p>  \u041d\u043e \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 Cloud Apps \u043e\u0442 Timeweb Cloud. \u042d\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0435\u0433\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u0431\u044b\u0442\u044c.<\/p>\n<p>  \u0414\u0443\u043c\u0430\u044e \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043b\u043e\u0441\u0442\u044c \u043e\u0442 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438\u043b\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u043e\u0439 \u0440\u0443\u0442\u0438\u043d\u044b \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b, \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b\u0441\u044f. \u0418 \u0442\u0430\u043a \u043f\u043e \u043a\u0440\u0443\u0433\u0443.<\/p>\n<p>  \u0418\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u0435\u043d\u044c \u2014 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438, \u0438 \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0437\u0430 \u0442\u0435\u0431\u044f\u2026 \u0416\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u0438 \u043d\u0435\u0434\u043e\u0440\u043e\u0433\u043e, \u0438 \u0441 \u043b\u043e\u0433\u0430\u043c\u0438, \u0438 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. \u0418 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u0438 \u0431\u0435\u043a\u0435\u043d\u0434, \u0438 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434.<\/p>\n<p>  \u0415\u0441\u0442\u044c Netlify, Vercel \u2014 \u043d\u043e \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u0438\u0437-\u0437\u0430 \u0433\u0435\u043e\u043f\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430, \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043d\u0430\u0448\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435!<\/p>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u2014 frontend, backend \u0438 docker. Cloud Apps \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u2014 \u00ab\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0442\u0440\u043e\u0439\u043a\u0430\u00bb JS-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a (vue, react, angular) \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439 nodeJS, \u0431\u0435\u043a\u0435\u043d\u0434 \u2014 \u043e\u0442 PHP \u0438 NodeJS \u0434\u043e Java, Python, Go, Elixir \u0438 .NET, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0435\u0440\u0435\u0437 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c backend, python (Flask).<\/p>\n<p>  \u041f\u043b\u044e\u0441\u044b Cloud Apps:<\/p>\n<ul>\n<li>\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043b\u043e\u0433\u0430\u043c.<\/li>\n<li>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/li>\n<li>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u0430 \u0432\u0435\u0440\u0441\u0438\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/li>\n<li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u2014 \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0434\u043e\u043a\u0435\u0440-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0434\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0431\u0435\u043a\u0435\u043d\u0434\u0430.<\/li>\n<li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0438\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432.<\/li>\n<li>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/li>\n<li>\u0410\u0432\u0442\u043e\u0434\u0435\u043f\u043b\u043e\u0439.<\/li>\n<li>\u0411\u044b\u0441\u0442\u0440\u043e\u0442\u0430 \u0438 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/li>\n<li>\u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0437\u0430\u0442\u0440\u0430\u0442.<\/li>\n<li>\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c.<\/li>\n<\/ul>\n<p>  \u041c\u0438\u043d\u0443\u0441\u044b, \u044d\u0442\u043e \u0438 \u0442\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0433\u0434\u0435 \u043d\u0430\u0434\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Cloud Apps?<\/font><\/h2>\n<p>  \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, Apps \u2014 \u044d\u0442\u043e \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u0434\u0430 \u0438 \u0430\u0432\u0442\u043e\u0434\u0435\u043f\u043b\u043e\u044f \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 Timeweb.<\/p>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u043d \u0442\u0430\u043a:<\/p>\n<ul>\n<li>\u0428\u0430\u0433 1. \u0412\u044b \u0437\u0430\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u0435\u0440\u0432\u0438\u0441 \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 GitHub, GitLab \u0438\u043b\u0438 Bitbucket \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<\/li>\n<li>\u0428\u0430\u0433 2. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441: \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c \u041f\u041e, \u00ab\u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442\u00bb \u0432\u0430\u0448 \u043a\u043e\u0434 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0441\u0442\u0430\u0432\u0438\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u043e\u0434 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0435\u0433\u043e.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043e\u0434\u043e\u043c, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e: \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u043a\u0438 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u0421\u0435\u0440\u0432\u0438\u0441 Apps \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0430\u0432\u0442\u043e\u0434\u0435\u043f\u043b\u043e\u0439, \u0432\u044b\u043a\u0430\u0442\u0438\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d-\u0441\u0440\u0435\u0434\u0443.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u2014 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u0441 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u044b\u043b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0434\u0435\u043f\u043b\u043e\u0439.<\/p>\n<p>  \u041a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u043e\u043c\u0435\u043d \u0441 SSL Let&#8217;s Encrypt, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0432\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0435\u043f\u043b\u043e\u0439. Apps \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043a\u043e\u0434 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430, API-\u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0442.\u043f.<\/p>\n<p>  \u0414\u043b\u044f \u0431\u0435\u043a\u0435\u043d\u0434\u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 nginx, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435.<\/p>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0441 frontend-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u043d\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 backend-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u2014 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0422\u0430\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0434\u0430\u044e\u0442\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0433\u0434\u0435 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u0441\u0435\u0440\u0432\u0438\u0441 Apps, \u043a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u0431\u044d\u043a\u0435\u043d\u0434-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0451 \u0437\u0430 \u0432\u0430\u0441:<\/p>\n<ul>\n<li>\u00ab\u041f\u043e\u0434\u0442\u044f\u043d\u0435\u0442\u00bb \u043a\u043e\u0434 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f;<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u041f\u041e;<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442 Nginx;<\/li>\n<li>\u0412\u044b\u043f\u0443\u0441\u0442\u0438\u0442 SSL-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442;<\/li>\n<li>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p>  \u0410 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u2014 \u0435\u0441\u043b\u0438 \u0432\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0439 \u043e\u043f\u0446\u0438\u044e \u0430\u0432\u0442\u043e\u0434\u0435\u043f\u043b\u043e\u044f.<\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Cloud Apps<\/font><\/h2>\n<p>  \u0412\u0440\u0435\u043c\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u0443\u044e \u0441\u0442\u0435\u043d\u0443. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c Cloud App \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0430\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u2014 \u0438 \u044d\u0442\u043e\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043c\u043e\u0436\u0435\u0442\u044c \u0431\u044b\u0442\u044c \u043d\u0430 \u0432\u0430\u0448\u0435\u043c GitHub (\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f GitLab \u0438 BitBucket) \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435, \u043b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e URL. \u041c\u044b \u0441\u043e\u0432\u0435\u0442\u0443\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u0442.\u043a. \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443, \u0438 \u0437\u0430\u043f\u0443\u0448\u0438\u0442\u044c \u0432\u0441\u0435 \u0432 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0432\u0435\u0434\u044c \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u0438\u0445, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0432\u0442\u043e\u0440\u043e\u0433\u043e.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0442\u043e \u0441\u043e\u0432\u0435\u0442\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/timeweb.cloud\/docs\/apps\/connecting-repositories\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043f\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432<\/a>. \u0422\u0430\u043c \u0432\u0441\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/timeweb.cloud\/services\/vds-vps\">Timeweb Cloud<\/a> \u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043b\u0438 \u0432\u043e\u0439\u0442\u0438 \u0432 \u0430\u043a\u043a\u0430\u0443\u043d\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/w1\/sq\/d3\/w1sqd3ss6nyzmez79agreuokyuc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/w1\/sq\/d3\/w1sqd3ss6nyzmez79agreuokyuc.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u043f\u043e\u043f\u0430\u0434\u0435\u0442\u0435 \u0432 \u0432\u0430\u0448 \u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u0430\u0431\u0438\u043d\u0435\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ql\/2e\/ao\/ql2eaoxk5mruuc6oamwooxsdv5a.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ql\/2e\/ao\/ql2eaoxk5mruuc6oamwooxsdv5a.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u00abApps\u00bb:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ap\/bk\/gf\/apbkgfd6emnrwwajqmsm6bsra-g.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ap\/bk\/gf\/apbkgfd6emnrwwajqmsm6bsra-g.png\"\/><\/p>\n<p>  \u0417\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Cloud Apps. \u0423\u043a\u0430\u0436\u0438\u0442\u0435 URL \u0432\u0430\u0448\u0435\u0433\u043e GIT-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2014 \u043d\u0430\u0448 \u0441\u0430\u0439\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/bg\/xy\/tx\/bgxytxuxv2mswcpp7jxw0m8nfdi.png\" data-src=\"https:\/\/habrastorage.org\/webt\/bg\/xy\/tx\/bgxytxuxv2mswcpp7jxw0m8nfdi.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c bash deploy.sh, \u0430 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c gunicorn main:app &#8212;timeout 60:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ao\/q3\/pc\/aoq3pc0_unx9cq2mlouhiukydxk.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ao\/q3\/pc\/aoq3pc0_unx9cq2mlouhiukydxk.png\"\/><\/p>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e! \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/alexeevdeveloper-openwall-f7c7.twc1.net\/\">\u0441\u0430\u0439\u0442<\/a> \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0443\u044e \u0441\u0442\u0435\u043d\u0443!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/_u\/t6\/b7\/_ut6b7jmdsubxljxrpmbpwvcat4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/_u\/t6\/b7\/_ut6b7jmdsubxljxrpmbpwvcat4.png\"\/><\/p>\n<h2><font color=\"#1c22be\">\u276f<\/font> <font color=\"#454cee\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/font><\/h2>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b. \u0411\u044b\u0441\u0442\u0440\u043e \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u0439\u0442-\u0432\u0438\u0437\u0438\u0442\u043a\u0443, \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0438\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u2014 \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u043b\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u2014 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443.<\/p>\n<h4><font color=\"#454cee\">\u0421\u0441\u044b\u043b\u043a\u0438<\/font><\/h4>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/alexeevdeveloper-openwall-f7c7.twc1.net\/index\">\u0421\u0430\u0439\u0442<\/a><\/li>\n<li><a href=\"https:\/\/timeweb.cloud\/my\/apps\/create\">\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/AlexeevDeveloper\/openwall\/tree\/main\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/a><\/li>\n<\/ul>\n<p>  \u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f. \u041c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Flask \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e. \u0411\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0437\u0430 \u0434\u0435\u043d\u044c \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 +1 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0432\u0430\u0448\u0435 \u043f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u043d\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043e\u0434\u0443 \u2014 \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0445 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0443.<\/p>\n<blockquote><p><i>\u0414\u0443\u0440\u043e\u0432, \u0432\u0435\u0440\u043d\u0438 \u0441\u0442\u0435\u043d\u0443!<\/i><\/p><\/blockquote>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<h4><font color=\"#454cee\">\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0437\u0430\u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u044d\u0442\u043e:<\/font><\/p>\n<ul>\n<li>\u27a4 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/804865\/\">\u0427\u0438\u0441\u043b\u0430 \u0438 \u0431\u0430\u0439\u0442\u044b: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0432 Linux?<\/a><\/li>\n<li>\u27a4 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/815209\/\">\u0420\u0435\u0432\u0435\u0440\u0441-\u0438\u043d\u0436\u0438\u043d\u0438\u0440\u0438\u043d\u0433 \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 .NET-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/a><\/li>\n<li>\u27a4 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/814767\/\">Wasm \u043d\u0430 \u0432\u0435\u0441\u044c \u0441\u0442\u0435\u043a \u2014 \u0434\u0432\u0438\u0436\u0435\u043c\u0441\u044f \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Leptos, Rust \u0438 Spin<\/a><\/li>\n<li>\u27a4 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/811167\/\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0443\u0437\u044b\u043a\u0438 \u0432 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 Udio, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043e\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430<\/a><\/li>\n<li>\u27a4 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/815287\/\">Halo 2: \u0441\u0438\u043a\u0432\u0435\u043b, \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0442\u0430\u0432\u0448\u0438\u0439 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u043e\u043c<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<blockquote><p><a href=\"https:\/\/t.me\/timewebru\"><b>\u041d\u043e\u0432\u043e\u0441\u0442\u0438, \u043e\u0431\u0437\u043e\u0440\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u044b \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Timeweb.Cloud \u2014 \u0432 \u043d\u0430\u0448\u0435\u043c Telegram-\u043a\u0430\u043d\u0430\u043b\u0435<\/b><\/a> <b>\u21a9<\/b><\/p><\/blockquote>\n<p>  <a href=\"https:\/\/timeweb.cloud\/?i=106909\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/b5\/pj\/of\/b5pjofdoxth14ro-rjsrn7sbmiy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/b5\/pj\/of\/b5pjofdoxth14ro-rjsrn7sbmiy.png\"\/><\/a><\/h4>\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\/812413\/\"> https:\/\/habr.com\/ru\/articles\/812413\/<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/1h\/q6\/uw\/1hq6uwd4hkdcwcjppmpzhb272pa.png\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/1h\/q6\/uw\/1hq6uwd4hkdcwcjppmpzhb272pa.png\"\/><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u043e\u0434\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c \u043c\u0438\u043a\u0440\u043e-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u0434\u043b\u044f Python \u2014 Flask. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0432\u043e\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437\u0443\u0447\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f flask, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u043c \u0435\u0433\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043c\u0438\u0440\u0430.<\/p>\n<p>  Flask \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f, \u0438\u0431\u043e \u043e\u043d \u0431\u044b\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439, \u0431\u044b\u0441\u0442\u0440\u044b\u0439, \u043b\u0451\u0433\u043a\u0438\u0439 \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f, \u0438 \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u043b\u0441\u044f \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u041c\u044b \u0437\u0430\u0442\u0440\u043e\u043d\u0435\u043c \u0432\u0441\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u043a\u043e\u0434\u0430. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a\u043e\u0439 \u0442\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u2014 \u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0443\u044e \u0441\u0442\u0435\u043d\u0443, \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0442\u0443\u0434\u0430 \u0437\u0430\u0439\u0442\u0438, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0441\u0442\u044b \u043d\u0430 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0441\u0442\u0435\u043d\u0435.<\/p>\n<p>  \u0410 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0431\u0435\u0437\u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u044b\u0439, \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043b\u0435\u0433\u043a\u0438\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\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-375460","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/375460","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=375460"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/375460\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=375460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=375460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=375460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}