{"id":172243,"date":"2013-03-11T11:33:05","date_gmt":"2013-03-11T07:33:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=172243"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=172243","title":{"rendered":"<span class=\"post_title\">\u00ab\u0411\u0430\u0440 \u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb \u043a 8 \u043c\u0430\u0440\u0442\u0430 \u043d\u0430 Python \u0438 Pyramid<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041a\u0430\u043a \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u0435\u0432\u0443\u0448\u0435\u043a \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u043c \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043a\u043e\u043c \u0432\u0435\u0441\u043d\u044b? \u0412 \u044d\u0442\u043e\u043c \u0433\u043e\u0434\u0443 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0435, \u0447\u0435\u043c-\u0442\u043e \u0443\u0434\u0438\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043f\u043e\u0434\u0430\u0440\u043a\u0430\u043c \u0438 \u0446\u0432\u0435\u0442\u0430\u043c. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u00ab\u0411\u0430\u0440 \u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0435 \u0437\u0430 \u043e\u0434\u0438\u043d \u0434\u0435\u043d\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/www.python.org\/\">Python<\/a> \u0438 <a href=\"http:\/\/www.pylonsproject.org\/projects\/pyramid\/about\">Pyramid<\/a>.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/2fc\/22c\/13d\/2fc22c13dfa748841314d898e0b2443e.png\"\/><\/p>\n<p>  \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u043a\u0442\u043e-\u0442\u043e \u0440\u0435\u0448\u0438\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u00ab\u0411\u0430\u0440 \u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb \u0434\u043b\u044f \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u0442\u043e-\u0442\u043e \u043e\u0442\u043a\u0440\u043e\u0435\u0442 \u0434\u043b\u044f \u0441\u0435\u0431\u044f Pyramid \u2014 \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u0435\u0431-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 <a href=\"https:\/\/github.com\/rgmih\/wishbar\">GitHub<\/a> \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0432\u043e\u0438\u0445 \u0446\u0435\u043b\u044f\u0445.<\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041f\u043e \u0445\u043e\u0434\u0443 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0442 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0431\u0449\u0435\u043c \u0438 Pyramid \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e Pyramid \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h4>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u0430\u0440\u0442\u0430, \u0437\u0430 \u043d\u0435\u0434\u0435\u043b\u044e \u0434\u043e \u041c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u043e\u0433\u043e \u0436\u0435\u043d\u0441\u043a\u043e\u0433\u043e \u0434\u043d\u044f \u043c\u0443\u0436\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432\u0430 \u0441\u043e\u0431\u0440\u0430\u043b\u0430\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u2014 \u043a\u0430\u043a \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0432\u0443\u0448\u0435\u043a \u0441 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u043c \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043a\u043e\u043c \u0432\u0435\u0441\u043d\u044b. \u0412 \u0445\u043e\u0434\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u0440\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0434\u0435\u044f \u2014 \u0432 \u044d\u0442\u043e\u0442 \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u0447\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0438\u0445 \u0436\u0435\u043b\u0430\u043d\u0438\u044f. \u0410 \u0435\u0441\u043b\u0438 \u0438 \u043d\u0435 \u0432\u0441\u0435 (\u0430 \u043c\u044b \u0437\u0434\u0440\u0430\u0432\u043e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u0438 \u0441\u0438\u043b\u044b), \u0442\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u0441\u0430\u043c\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0442 \u00ab\u0431\u0430\u0440\u0430 \u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb.<\/p>\n<p>  \u00ab\u0411\u0430\u0440 \u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb \u2014 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0435\u0432\u0443\u0448\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0435\u0439 \u043f\u043e \u0434\u0443\u0448\u0435, \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0441\u043e\u0431\u044b\u0435 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0438 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437. \u042d\u0442\u043e\u0442 \u0437\u0430\u043a\u0430\u0437 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u00ab\u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb \u0434\u0435\u0432\u0443\u0448\u043a\u0435. \u041c\u0435\u043d\u044e \u0431\u0430\u0440\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0442\u0430\u043a\u0438\u0435 \u00ab\u0436\u0435\u043b\u0430\u043d\u0438\u044f\u00bb, \u043a\u0430\u043a \u00ab\u041a\u0443\u0441\u043e\u0447\u0435\u043a \u0442\u043e\u0440\u0442\u0438\u043a\u0430\u00bb \u0438\u043b\u0438 \u00ab\u041a\u043b\u0443\u0431\u043d\u0438\u043a\u0430 \u0441 \u043c\u043e\u0440\u043e\u0436\u0435\u043d\u044b\u043c\u00bb \u2014 \u0434\u0435\u0441\u0435\u0440\u0442\u044b, \u0444\u0440\u0443\u043a\u0442\u044b, \u043d\u0430\u043f\u0438\u0442\u043a\u0438. \u041c\u0435\u043d\u044e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0441 \u044e\u043c\u043e\u0440\u043e\u043c. \u0417\u0430\u043a\u0430\u0437\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u2014 \u043d\u0435\u043b\u044c\u0437\u044f \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0435\u0432\u0443\u0448\u043a\u0443 \u0436\u0434\u0430\u0442\u044c.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u2014 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<ol>\n<li>\u0414\u0435\u0432\u0443\u0448\u043a\u0430: \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u00ab\u0436\u0435\u043b\u0430\u043d\u0438\u044f\u00bb, \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0441\u043e\u0431\u044b\u0435 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 \u0442\u0435\u043a\u0441\u0442\u0430, \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0437\u0430\u043a\u0430\u0437, \u0432\u043e\u0441\u0445\u0438\u0449\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a\u0438\u0435 \u0440\u0435\u0431\u044f\u0442\u0430 \u043c\u043e\u043b\u043e\u0434\u0446\u044b. \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443.<\/li>\n<li>\u041e\u0444\u0438\u0446\u0438\u0430\u043d\u0442 (\u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a-\u043c\u0443\u0436\u0447\u0438\u043d\u0430): \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u043d\u043e\u043c \u0437\u0430\u043a\u0430\u0437\u0435, \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0434\u0435\u0432\u0443\u0448\u043a\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u00ab\u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb, \u043f\u0440\u0438\u043d\u0435\u0441\u0442\u0438 \u00ab\u0436\u0435\u043b\u0430\u043d\u0438\u044f\u00bb \u0434\u0435\u0432\u0443\u0448\u043a\u0435 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043c\u0435\u0441\u0442\u043e.<\/li>\n<\/ol>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0444\u0438\u0446\u0438\u0430\u043d\u0442 \u0437\u043d\u0430\u043b, \u043a\u043e\u043c\u0443 \u043d\u0435\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043a\u0430\u0437, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0438\u043c\u044f \u0434\u0435\u0432\u0443\u0448\u043a\u0438. \u0417\u043d\u0430\u0447\u0438\u0442, \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u0435\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u0434 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043a\u0430\u0437\u0430. \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u0430: \u0430) \u043c\u044b \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0437\u043b\u043e\u0434\u0435\u0435\u0432 \u043d\u0435\u0442; \u0431) \u0432\u0440\u044f\u0434 \u043b\u0438 \u0434\u0435\u0432\u0443\u0448\u043a\u0438 \u0445\u043e\u0442\u044f\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0444\u043e\u0440\u043c\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0442\u0430\u043a\u043e\u0439 \u0434\u0435\u043d\u044c. \u0417\u043d\u0430\u044f \u0438\u043c\u044f, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043d\u0435\u0439 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u043e \u0438\u043c\u0435\u043d\u0438, \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430. \u0414\u043b\u044f \u043f\u0443\u0449\u0435\u0439 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0438 \u0437\u0430\u043a\u0430\u0437\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c IP-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<p>  \u041e\u043f\u043e\u0432\u0435\u0449\u0430\u0442\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043d\u0442\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 Google Talk \u2014 \u0441\u0432\u043e\u0439 jabber-\u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043d\u0435 \u043f\u0440\u0438\u0436\u0438\u043b\u0441\u044f, google-\u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b \u0435\u0441\u0442\u044c \u0443 \u043c\u043d\u043e\u0433\u0438\u0445, IM \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Google Talk \u043d\u0430 Python \u0447\u0435\u0440\u0435\u0437 <a href=\"http:\/\/xmpppy.sourceforge.net\/\">xmpppy<\/a> \u2014 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432 \u043e\u0444\u0438\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430 \u043f\u043e\u043b\u0438\u0432 \u0446\u0432\u0435\u0442\u043e\u0432 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435-\u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435.<\/p>\n<h4>\u0412\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h4>\n<p>  <\/p>\n<blockquote><p>\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 Python \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p><\/blockquote>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041d\u0430\u0437\u043e\u0432\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 wishbar (\u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0432\u0441\u0435 \u043f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0434\u0430\u043d\u044b \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430). \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0444\u0430\u0439\u043b <code>server.py<\/code>):<\/p>\n<pre><code class=\"python\">from wsgiref.simple_server import make_server from pyramid.config import Configurator  def create_app():     config = Configurator()     app = config.make_wsgi_app()     return app  if __name__ == '__main__':     app = create_app()     server = make_server('0.0.0.0', 8080, app)     server.serve_forever() <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 HTTP-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Web_Server_Gateway_Interface\">WSGI<\/a> \u2014 \u043c\u043e\u0434\u0443\u043b\u044c <a href=\"http:\/\/docs.python.org\/2\/library\/wsgiref.html#module-wsgiref.simple_server\">wsgiref.simple_server<\/a> \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Python. \u0415\u0433\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0442\u0430\u043a \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u041f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u043f\u043e\u043a\u0430. \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a Pyramid-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u2014 \u0432 \u0431\u043e\u0435\u0432\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p><\/blockquote>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"http:\/\/localhost:8080\/\">http:\/\/localhost:8080\/<\/a>. \u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e 404 Not found.<\/p>\n<p>  \u0412 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0441\u0442\u0438\u043b\u0438, \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 js, css, img \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c view-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0432\u0438\u0434\u044b, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f; \u0430\u043d\u0433\u043b. views) \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0442\u0430\u0442\u0438\u043a\u0438.<\/p>\n<pre><code class=\"python\">def create_app():     config = Configurator()      path = os.path.abspath(__file__)     root = path[:path.rindex(&quot;\/&quot;)]          config.add_static_view(&quot;css&quot;, &quot;{0}\/css&quot;.format(root))     config.add_static_view(&quot;js&quot;, &quot;{0}\/js&quot;.format(root))     config.add_static_view(&quot;img&quot;, &quot;{0}\/img&quot;.format(root))          app = config.make_wsgi_app()     return app <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a URL \u0432\u0438\u0434\u0430 <code>\/css\/*<\/code>, <code>\/js\/*<\/code>, <code>\/img\/*<\/code> \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439.  <\/p>\n<blockquote><p>\u041a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0435\u043c\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 Pyramid \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c view-\u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430\u0439\u0442\u0438 \u043d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f, \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442 \u0441\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c \u043e\u0448\u0438\u0431\u043a\u0438. \u0412 Pyramid \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c view-\u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0414\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u0442\u0430\u0442\u0438\u043a\u0438 \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <a href=\"http:\/\/www.kemeneur.com\/clients\/pylons\/docs\/pyramid\/api\/configuration.html#pyramid.configuration.Configurator.add_static_view\">add_static_view<\/a> \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"http:\/\/docs.pylonsproject.org\/projects\/pyramid\/en\/latest\/api\/static.html#pyramid.static.static_view\">pyramid.static.static_view<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a URL, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435.<\/p><\/blockquote>\n<p>  \u0417\u0430\u0439\u043c\u0435\u043c\u0441\u044f HTML. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u00abhello world\u00bb. \u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442.<\/p>\n<pre><code class=\"python\">config = Configurator() config.add_route(&quot;index_route&quot;,&quot;\/&quot;) <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041c\u0430\u0440\u0448\u0440\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c URL (\u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440). \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u2014 \u044d\u0442\u043e \u0438\u043c\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430. \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0439 URL \u043f\u043e\u0434\u043f\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u0434 \u0448\u0430\u0431\u043b\u043e\u043d \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f view-\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u0441 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u043c.<\/p>\n<p>  \u0421\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043c \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 view-\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c traversal \u2014 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0438\u0441\u043a\u0430 view-\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u0412 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u041e traversal \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 <a href=\"http:\/\/docs.pylonsproject.org\/projects\/pyramid\/en\/latest\/narr\/traversal.html\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p><\/blockquote>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c view-\u0444\u0443\u043d\u043a\u0446\u0438\u0439 <code>views.py<\/code>, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u043a\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 <code>index_route<\/code>:<\/p>\n<pre><code class=\"python\">@view_config(route_name=&quot;index_route&quot;) def index(request):     return render_to_response('pt\/index.pt', { 'name' : 'world' }, request) <\/code><\/pre>\n<p>  \u0438 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d <code>pt\/index.html<\/code> \u0432 \u043f\u0430\u043f\u043a\u0435 <code>pt<\/code>:<\/p>\n<pre><code class=\"html\">&lt;!doctype html&gt; &lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;       xmlns:tal=&quot;http:\/\/xml.zope.org\/namespaces\/tal&quot;\t       xmlns:metal=&quot;http:\/\/xml.zope.org\/namespaces\/metal&quot;&gt;     &lt;head&gt;         &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=utf-8&quot; \/&gt;         &lt;title&gt;wishbar&lt;\/title&gt;     &lt;\/head&gt;     &lt;body&gt;         Hello, ${name}!\t     &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p><code>render_to_response<\/code> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 <code>request<\/code> \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0443 <code>pt\/index.pt<\/code>, \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435.<\/p><\/blockquote>\n<p>  \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0432 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u041c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c, \u043d\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 <code>create_app<\/code> \u00ab\u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb <code>views.py<\/code> \u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438.<\/p>\n<pre><code class=\"python\">config = Configurator() config.add_route(&quot;index_route&quot;,&quot;\/&quot;) config.scan(&quot;views&quot;) <\/code><\/pre>\n<p>  \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u0440\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u2014 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u0438\u043c\u0435\u043d\u0438, \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043c\u0435\u043d\u044e \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430. \u0412\u0441\u0435 \u0442\u0440\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0432 \u0442\u0435\u043b\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u0436\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442. \u0412 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0435 Pyramid \u0438\u0434\u0435\u0442 \u0434\u0432\u0438\u0436\u043e\u043a \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 <a href=\"http:\/\/chameleon.readthedocs.org\/en\/latest\/\">Chameleon<\/a>, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043d\u0430 \u043d\u0435\u043c. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d <code>pt\/base.pt<\/code> \u0438 \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0445 \u0442\u0440\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u2014 <code>pt\/login.pt<\/code>, <code>pt\/index.pt<\/code> (\u0438\u0437\u043c\u0435\u043d\u0438\u043c \u00abhello world\u00bb), <code>pt\/confirm.pt<\/code>. \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <code>base.pt<\/code>, \u043a\u0430\u043a \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u044f\u0434\u043e\u043c \u0441 <code>server.py<\/code> \u0444\u0430\u0439\u043b <code>subscribers.py<\/code> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre><code class=\"python\">from pyramid.renderers import get_renderer from pyramid.events import BeforeRender, subscriber  @subscriber(BeforeRender) def add_base_template(event):     base = get_renderer('pt\/base.pt').implementation()     event.update({'base': base}) <\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 <code>subscribers.py<\/code> \u0432 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>create_app<\/code>.<\/p>\n<pre><code class=\"python\">config = Configurator() config.add_route(&quot;index_route&quot;,&quot;\/&quot;) config.scan(&quot;subscribers&quot;) <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p><a href=\"http:\/\/docs.pylonsproject.org\/projects\/pyramid\/en\/1.0-branch\/api\/events.html#pyramid.events.subscriber\">@subscriber<\/a> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>add_base_template<\/code> \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 <a href=\"http:\/\/docs.pylonsproject.org\/projects\/pyramid\/en\/1.0-branch\/narr\/events.html\">\u0441\u043e\u0431\u044b\u0442\u0438\u0439 Pyramid<\/a> \u0442\u0438\u043f\u0430 <code>BeforeRender<\/code>. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 <a href=\"http:\/\/docs.pylonsproject.org\/projects\/pyramid\/en\/latest\/api\/events.html#pyramid.events.BeforeRender\">BeforeRender<\/a> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0434 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0430. \u0412 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0431\u043e\u0440 <a href=\"http:\/\/docs.pylonsproject.org\/projects\/pyramid\/en\/latest\/glossary.html#term-renderer-globals\">renderer globals<\/a> \u2014 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u044d\u0442\u043e\u0442 \u043d\u0430\u0431\u043e\u0440 \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <code>base.pt<\/code> \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u0435\u043c <code>base<\/code>.<\/p><\/blockquote>\n<p>  \u0412 <code>pt\/base.pt<\/code> \u043e\u0431\u044a\u044f\u0432\u0438\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u043b\u043e\u0442\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"html\">&lt;div id=&quot;content&quot;&gt;     &lt;tal:block metal:define-slot=&quot;content&quot;&gt;     &lt;\/tal:block&gt; &lt;\/div&gt; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 <code>login.pt<\/code>, <code>index.pt<\/code> \u0438 <code>confirm.pt<\/code> \u043c\u043e\u0436\u043d\u043e \u00ab\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f\u00bb \u043e\u0442 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430:<\/p>\n<pre><code class=\"html\">&lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;       xmlns:tal=&quot;http:\/\/xml.zope.org\/namespaces\/tal&quot;       xmlns:metal=&quot;http:\/\/xml.zope.org\/namespaces\/metal&quot;       metal:use-macro=&quot;base&quot;&gt;     &lt;tal:block metal:fill-slot=&quot;content&quot;&gt;         Hello, ${name}!     &lt;\/tal:block&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>  \u041a\u0430\u0440\u043a\u0430\u0441 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0433\u043e\u0442\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439. \u0412\u043e view-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u2014 \u0437\u043d\u0430\u0435\u043c \u043b\u0438 \u043c\u044b \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0438\u043b\u0438 \u044d\u0442\u043e \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442. \u041f\u0443\u0441\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0434\u0435\u0432\u0443\u0448\u043a\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u043c\u044f, \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u0439 cookie \u0441 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 cookie \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u2014 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0438\u043c\u044f \u0438 \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0436\u0435\u043b\u0430\u043d\u0438\u0439. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0434\u0435\u0432\u0443\u0448\u043a\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u0444\u043e\u0440\u043c\u043e\u0439 \u0432\u0432\u043e\u0434\u0430 \u0438\u043c\u0435\u043d\u0438.<\/p>\n<pre><code class=\"python\">if 'username' in request.cookies:     pass   else:     return render_to_response('pt\/login.pt', {}, request) <\/code><\/pre>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043d\u0430\u0434 \u0432\u0435\u0440\u0441\u0442\u043a\u043e\u0439 \u0438 \u0441\u0442\u0438\u043b\u044f\u043c\u0438. \u0412 \u043f\u043e\u043c\u043e\u0449\u044c \u0432\u043e\u0437\u044c\u043c\u0435\u043c <a href=\"http:\/\/www.zurb.com\/blog_uploads\/0000\/0617\/buttons-03.html\">awesome-\u043a\u043d\u043e\u043f\u043a\u0438<\/a>.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/b3d\/2cf\/98e\/b3d2cf98ec65d78c0a265f9c87f686ef.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 awesome-\u043a\u043d\u043e\u043f\u043a\u0438 \u044d\u0442\u043e \u043d\u0435 \u043a\u043d\u043e\u043f\u043a\u0438, \u0430 \u0441\u0441\u044b\u043b\u043a\u0438, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e <a href=\"http:\/\/jquery.com\/\">jQuery<\/a> \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0444\u043e\u0440\u043c\u044b \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443. \u0414\u0430\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u043d\u0430 URL <code>\/login\/<\/code> \u0432 \u0444\u043e\u0440\u043c\u0435 POST-\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u0412 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0438\u043c\u044f \u0434\u0435\u0432\u0443\u0448\u043a\u0438 \u0432 \u0444\u043e\u0440\u043c\u0435 cookie \u0441 \u043a\u043b\u044e\u0447\u043e\u043c <code>username<\/code> \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c 302 Found \u043d\u0430 \u043a\u043e\u0440\u0435\u043d\u044c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">config.add_route(&quot;index_route&quot;,&quot;\/&quot;) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">@view_config(route_name=&quot;login_route&quot;) def login(request):     username = request.params['username']     response = Response()     response.set_cookie('username', value=username, max_age=86400)     return HTTPFound(location = &quot;\/&quot;, headers=response.headers)      <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041a\u0430\u043a \u0438 \u0432 \u043b\u044e\u0431\u043e\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b \u0437\u0430\u043d\u043e\u0432\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c POST-\u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0444\u043e\u0440\u043c\u044b. \u0422\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043d\u0430 POST-\u0437\u0430\u043f\u0440\u043e\u0441.<\/p><\/blockquote>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c-\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0443\u0436\u0435 cookie \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0434\u0435\u0432\u0443\u0448\u043a\u0438. \u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0443 <code>index_route<\/code> \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u00ab\u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb. \u0417\u0430\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0436\u0435\u043b\u0430\u043d\u0438\u0439 \u0432 \u0444\u043e\u0440\u043c\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 Python \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0435\u0433\u043e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0434\u0435\u0432\u0443\u0448\u043a\u0438.<\/p>\n<pre><code class=\"python\">if 'username' in request.cookies:     username = request.cookies['username']     response = render_to_response(&quot;pt\/index.pt&quot;, { &quot;username&quot; : username, &quot;wishbar&quot; : WISHBAR }, request)     return response <\/code><\/pre>\n<p>  \u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u0436\u0435\u043b\u0430\u043d\u0438\u0439 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435.<\/p>\n<pre><code class=\"html\">&lt;div class=&quot;table&quot;&gt; &lt;tal:block repeat=&quot;wish wishbar&quot;&gt;     &lt;label for=&quot;${wish.name}&quot;&gt;         &lt;div&gt;&lt;input id=&quot;${wish.name}&quot; name=&quot;wish-${wish.name}&quot; type=&quot;checkbox&quot;&gt;&lt;\/input&gt;&lt;div class=&quot;checkbox&quot;&gt;&lt;\/div&gt;&lt;\/div&gt;         &lt;div&gt;         &lt;div class=&quot;title&quot;&gt;${wish.title}&lt;\/div&gt;             &lt;div class=&quot;description&quot;&gt;${wish.description}&lt;\/div&gt;         &lt;\/div&gt;     &lt;\/label&gt; &lt;\/tal:block&gt; &lt;\/div&gt; <\/code><\/pre>\n<p>  \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/1ce\/2fe\/8f2\/1ce2fe8f23fa575eca6f3d667f667f91.png\"\/><\/p>\n<blockquote><p>\u0414\u043b\u044f \u0441\u0442\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u043b\u0430\u0433\u043e\u0432 \u0431\u044b\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d <a href=\"http:\/\/www.maratz.com\/blog\/archives\/2006\/06\/11\/fancy-checkboxes-and-radio-buttons\/\">\u043c\u0435\u0442\u043e\u0434<\/a> \u0441 \u043f\u043e\u0434\u043c\u0435\u043d\u043e\u0439 input \u043d\u0430 div \u0438 \u0438\u0445 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 JavaScript. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438 \u0430\u0432\u0442\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u044c\u0438, \u043d\u043e \u044d\u0442\u043e\u0433\u043e \u044f \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u043b. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0434\u0435\u0432\u0443\u0448\u043a\u0438 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439.<\/p><\/blockquote>\n<p>  \u0412\u043d\u0438\u0437\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u00ab\u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb \u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0444\u043e\u0440\u043c\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 URL \u0432 \u0444\u043e\u0440\u043c\u0435 POST-\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0412 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 view-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0442\u0438\u043f\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 POST \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0437\u0430\u043a\u0430\u0437\u0430 \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 <code>\/confirm\/id-\u0437\u0430\u043a\u0430\u0437\u0430<\/code>.<\/p>\n<pre><code class=\"python\">if request.method == &quot;POST&quot;:     username = request.cookies['username']     wishlist = []     for key,value in request.POST.items():         if key.startswith(&quot;wish-&quot;):             wishlist.append(NAME2WISH[key[5:]])              special = request.params[&quot;special&quot;]     bequick = request.params[&quot;bequick&quot;]     order = Order(username,request.remote_addr,wishlist,special,bequick)     ORDERS[order.id] = order     return HTTPFound(location = &quot;\/confirm\/{}&quot;.format(order.id)) <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a <code>\/confirm\/*<\/code>.<\/p>\n<pre><code class=\"python\">config.add_route(&quot;confirm_route&quot;,&quot;\/confirm\/{order}&quot;) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">@view_config(route_name=&quot;confirm_route&quot;) def confirm(request):     order_id = request.matchdict['order']     if order_id in ORDERS.iterkeys():         order = ORDERS.pop(order_id)         notify(order)         return render_to_response('pt\/confirm.pt', { &quot;order&quot; : order }, request)     else:         return HTTPFound(location = &quot;\/&quot;) <\/code><\/pre>\n<p>  \u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u00ab\u043f\u043e\u0436\u0435\u043b\u0430\u0442\u044c\u00bb \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0449\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/1d0\/2b5\/9b2\/1d02b59b28f27dd9a41ff7e9d0df2463.png\"\/><\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>notify<\/code> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043d\u0442\u043e\u0432 \u043e \u0437\u0430\u043a\u0430\u0437\u0435. \u041e \u043d\u0435\u0439 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435. \u0410 \u043f\u043e\u043a\u0430 \u2014 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c \u0441 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e: \u043d\u0430\u0434\u043e \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u00ab\u0432\u044b\u0439\u0442\u0438\u00bb \u0438 \u00ab\u0432\u043e\u0439\u0442\u0438\u00bb \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b\u0431\u043e\u0440\u0430 \u0436\u0435\u043b\u0430\u043d\u0438\u0439 \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 URL <code>\/logout\/<\/code>. \u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e view-\u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>logout<\/code>. \u0412 \u043d\u0435\u0439 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c cookie \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e.<\/p>\n<pre><code class=\"python\">config.add_route(&quot;logout_route&quot;,&quot;\/logout\/&quot;) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">@view_config(route_name=&quot;logout_route&quot;) def logout(request):     response = Response()     response.set_cookie('username', value=None)     return HTTPFound(location = &quot;\/&quot;, headers=response.headers) <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0437\u0430\u043a\u0430\u0437\u043e\u0432.<\/p>\n<h4>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u043a\u0430\u0437\u043e\u0432<\/h4>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u00ab\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u0432\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0434\u043e \u043e\u043f\u043e\u0432\u0435\u0449\u0430\u0442\u044c \u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0445 \u0437\u0430\u043a\u0430\u0437\u0430\u0445. \u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c\u0441\u044f, \u043a\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0442 \u0437\u0430\u043a\u0430\u0437, \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Google Talk. \u0421 <a href=\"http:\/\/en.wikipedia.org\/wiki\/XMPP\">XMPP<\/a> \u0438\u0437 Python \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <a href=\"http:\/\/xmpppy.sourceforge.net\/\">xmpppy<\/a>. \u041f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>notify<\/code> \u0432 <code>notify.py<\/code>.<\/p>\n<pre><code class=\"python\">USERNAME = 'username' # @gmail.com PASSWORD = 'password'  class User():     def __init__(self,uri,name):         self.uri = uri         self.name= name  USERS = {     &quot;user@gmail.com&quot; : User(&quot;user@gmail.com&quot;,u&quot;\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f&quot;) }  def notify(order):     cnx = xmpp.Client('gmail.com')     cnx.connect( server=('talk.google.com',5223) )      cnx.auth(USERNAME,PASSWORD,'botty')         message = order.username + &quot; (&quot; + order.remote_addr + &quot;): &quot;     if order.donothing:         message += u&quot;\u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c&quot;     else:         message += order.wishstr     if order.bequick:         message += u&quot;, \u0431\u044b\u0441\u0442\u0440\u043e-\u0431\u044b\u0441\u0442\u0440\u043e&quot;     for user in USERS.itervalues():         cnx.send(xmpp.Message(user.uri, message, typ='chat')) <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0437\u0430\u043a\u0430\u0437, <code>notify<\/code> \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0437\u0430\u043a\u0430\u0437\u0435 \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 <code>USERS<\/code>.<\/p>\n<p>  \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u043e\u0432\u0435\u0449\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u00ab\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u0432\u00bb. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u00ab\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u00bb \u043c\u043e\u0433 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u00ab\u0431\u0430\u0440\u0430 \u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb \u2014 \u0442\u043e\u0433\u0434\u0430 \u0432\u0441\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u0448\u043b\u043e \u0431\u044b \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043e \u0432\u0437\u044f\u0442\u0438\u0438 \u0438\u043c \u0437\u0430\u043a\u0430\u0437\u0430 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0430\u0436\u0435 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 gtalk-\u0431\u043e\u0442, \u043a\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0434\u0430\u043b\u0435\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>notify.py<\/code>. \u0411\u043e\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u043b \u0438\u0445 \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443 <code>USERS<\/code>.<\/p>\n<p>  \u041d\u043e \u043f\u0440\u0438 \u043f\u0440\u043e\u0433\u043e\u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0434\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u0432. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u0435\u0440\u0438\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u044b\u043b\u043e \u0432\u044b\u044f\u0441\u043d\u0435\u043d\u043e, \u0447\u0442\u043e \u0432 Google Talk \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0437\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u2014 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0431\u043e\u043b\u0435\u0435 10 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430 100 \u0441\u0435\u043a\u0443\u043d\u0434 Google Talk \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442. \u041e \u0447\u0435\u043c \u043c\u043d\u043e\u044e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043b\u0438\u0448\u044c <a href=\"http:\/\/stackoverflow.com\/questions\/1843837\/what-is-the-throttling-rate-that-gtalk-applies-to-xmpp-messages\">\u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u043d\u0430 StackOverflow<\/a> \u0431\u0435\u0437 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0446\u0438\u0444\u0440.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442 \u0438\u0434\u0435\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u043e\u0442\u0430 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u043c\u0430\u043b\u043e, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043a\u043e\u043c\u043d\u0430\u0442\u0443 \u043d\u0430 <a href=\"http:\/\/partychapp.appspot.com\/\">partych.at<\/a>, \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432 \u043d\u0435\u0435 \u0432\u0441\u0435\u0445 \u043e\u0444\u0438\u0446\u0438\u0430\u043d\u0442\u043e\u0432 \u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0431\u0430\u0440\u0430 \u0436\u0435\u043b\u0430\u043d\u0438\u0439. \u0412 \u0441\u043f\u0438\u0441\u043a\u0435 <code>USERS<\/code> \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u043a\u043e\u043c\u043d\u0430\u0442\u044b. \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043a\u0442\u043e-\u0442\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b \u0437\u0430\u043a\u0430\u0437, \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0432 \u043a\u043e\u043c\u043d\u0430\u0442\u0443, \u0433\u0434\u0435 \u0435\u0433\u043e \u0432\u0438\u0434\u0435\u043b\u0438 \u0432\u0441\u0435 \u0438 \u043c\u043e\u0433\u043b\u0438 \u0442\u0443\u0442 \u0436\u0435 \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c\u0441\u044f \u043e\u0431 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435.<\/p>\n<h4>\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0433\u043e\u0442\u043e\u0432\u043e, \u0432\u0441\u0442\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0435 \u0435\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Ubuntu. \u042f \u0432\u0431\u0438\u043b \u0432 \u043f\u043e\u0438\u0441\u043a \u0437\u0430\u043f\u0440\u043e\u0441 \u00abPyramid setup.py\u00bb \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b <a href=\"http:\/\/docs.pylonsproject.org\/projects\/pyramid\/en\/latest\/narr\/project.html\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442<\/a>, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043d\u0435 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Pyramid-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.  <\/p>\n<blockquote><p>\u042f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043e \u0432\u044b\u043d\u0435\u0441 \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u043a\u043e\u043d\u0435\u0446 \u0441\u0442\u0430\u0442\u044c\u0438. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043a\u043e\u0434\u0430 \u0438 \u043d\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c\u0443 \u0434\u043b\u044f Pyramid \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e. \u0427\u0442\u043e \u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u043b.<\/p><\/blockquote>\n<p>  \u0423\u0442\u0438\u043b\u0438\u0442\u0430 <code>pcreate<\/code> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u0438\u043f\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0444\u0430\u0439\u043b <code>setup.py<\/code> \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0436\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u044b\u0448\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 <code>pcreate -s starter wishbar<\/code>.  <\/p>\n<blockquote><p><code>pcreate<\/code> \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 scaffolds (\u043a\u0430\u0440\u043a\u0430\u0441\u044b) \u0434\u043b\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, alchemy \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/www.sqlalchemy.org\/\">sqlalchemy<\/a>.<\/p><\/blockquote>\n<p>  \u041a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u0435\u043c Pyramid-\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0435 <code>wishbar<\/code>. \u0427\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043b\u0435\u0436\u0430\u0442\u044c \u0432 \u043f\u0430\u043a\u0435\u0442\u0430\u0445. \u0412 \u043c\u043e\u0435\u043c \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0435 \u0444\u0430\u0439\u043b\u044b \u043b\u0435\u0436\u0430\u043b\u0438 \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0442\u0440\u0443\u0434\u0430 \u2014 \u0443\u0431\u0440\u0430\u043d \u043b\u0438\u0448\u043d\u0438\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b <code>import<\/code> \u0434\u043b\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432\u044b\u0437\u043e\u0432 <code>create_app<\/code> \u0438\u0437 <code>server.py<\/code> \u0432 <code>__init__.py<\/code>.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u044b\u043b \u0432\u044b\u043b\u043e\u0436\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/rgmih\/wishbar\">GitHub<\/a>, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0442\u0440\u0443\u0434\u0430:<\/p>\n<pre><code class=\"bash\">cd ~ mkdir wishbar cd wishbar git init git remote add origin &quot;https:\/\/github.com\/rgmih\/wishbar.git&quot; git pull origin master sudo python .\/setup.py develop pserve production.ini <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434 WSGI-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c <a href=\"http:\/\/docs.pylonsproject.org\/projects\/waitress\/en\/latest\/\">Waitress<\/a> \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 7777.<\/p><\/blockquote>\n<p>  <\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0414\u0435\u0432\u0443\u0448\u043a\u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u044b. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0434\u0430\u0436\u0435 \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u0432\u0430\u0443-\u044d\u0444\u0444\u0435\u043a\u0442.<\/p>\n<p>  \u00ab\u0411\u0430\u0440 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb \u0431\u044b\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d 7\u0433\u043e \u043c\u0430\u0440\u0442\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0441\u0442\u0440\u043e\u0436\u0430\u0439\u0448\u0435\u0439 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0441\u0442\u0438. \u0423\u0442\u0440\u043e\u043c \u0432 \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u0447\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u044b \u0438 \u043e\u0444\u0438\u0446\u0438\u0430\u043d\u0442\u044b \u0431\u044b\u043b\u0438 \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u0431\u043e\u0435\u0432\u044b\u0445 \u043f\u043e\u0441\u0442\u0430\u0445 \u0438 \u043d\u0435\u043f\u0440\u0438\u043d\u0443\u0436\u0434\u0435\u043d\u043d\u043e \u0442\u0440\u0435\u043f\u0430\u043b\u0438\u0441\u044c \u0432 \u0447\u0430\u0442\u0435. \u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043a\u0430\u0437 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b \u043e\u043a\u043e\u043b\u043e 9 \u0443\u0442\u0440\u0430 \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u00ab\u044f \u0432 \u0448\u043e\u043a\u0435\u00bb \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u043e\u0441\u043e\u0431\u044b\u0445 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0434\u043d\u044f. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0435\u0433\u043e \u043c\u044b \u043d\u0435 \u0443\u0447\u043b\u0438 \u0432 \u043d\u0430\u0448\u0435\u0439 \u00ab\u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0439\u00bb \u0441\u0445\u0435\u043c\u0435 \u2014 \u0447\u0442\u043e \u0432 \u0437\u0434\u0430\u043d\u0438\u0438 \u043b\u044f\u0436\u0435\u0442 \u0448\u043b\u044e\u0437 \u0438 \u0432\u0441\u0435 \u043e\u0444\u0438\u0441\u044b \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u0431\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e \u0437\u0430\u043a\u0430\u0437\u0430\u0445 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0447\u0430\u0442, \u0434\u0430 \u0438 \u0441\u0430\u043c \u0447\u0430\u0442 \u0441\u0442\u0430\u043b \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043d\u0442\u043e\u0432. \u0411\u043b\u0430\u0433\u043e, \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0437\u0430 \u0434\u0435\u0441\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442 \u0434\u043e \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0431\u0430\u043d\u043a\u0435\u0442\u0430, \u0438 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u043e\u0441\u0442\u0440\u0430\u0434\u0430\u043b.<\/p>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u043f\u043e\u0434 Python 2.7. \u041d\u043e \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043f\u043e\u0434 Python 3 \u0432\u0441\u0435 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u0437\u043c\u043d\u0435\u043d\u0438\u0439. \u041c\u043d\u043e\u0433\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043d\u0435 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0432 \u0441\u0438\u043b\u0443 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u2014 \u043d\u0435\u0442 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0434\u0440. \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c: <a href=\"http:\/\/www.python.org\/\">Python 2.7.2<\/a>, <a href=\"http:\/\/www.pylonsproject.org\/projects\/pyramid\/about\">Pyramid 1.4<\/a>, <a href=\"http:\/\/xmpppy.sourceforge.net\/\">xmpppy 0.5.0rc1<\/a>, <a href=\"http:\/\/lesscss.org\/\">LESS 1.3.0<\/a>, <a href=\"http:\/\/jquery.com\/\">jQuery 1.9.1<\/a>. \u042f \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u043d\u0430 Python. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u0435\u043d \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u043a\u0435 \u0438 \u0441\u043e\u0432\u0435\u0442\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u043c\u043d\u0435 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u0438 \u0441\u0432\u043e\u0438 \u043d\u0430\u0432\u044b\u043a\u0438 \u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. <\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/rgmih\/wishbar\">GitHub<\/a>. \t\t\t \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/172243\/\"> http:\/\/habrahabr.ru\/post\/172243\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041a\u0430\u043a \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u0435\u0432\u0443\u0448\u0435\u043a \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u043c \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043a\u043e\u043c \u0432\u0435\u0441\u043d\u044b? \u0412 \u044d\u0442\u043e\u043c \u0433\u043e\u0434\u0443 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0435, \u0447\u0435\u043c-\u0442\u043e \u0443\u0434\u0438\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043f\u043e\u0434\u0430\u0440\u043a\u0430\u043c \u0438 \u0446\u0432\u0435\u0442\u0430\u043c. \u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u00ab\u0411\u0430\u0440 \u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0435 \u0437\u0430 \u043e\u0434\u0438\u043d \u0434\u0435\u043d\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"http:\/\/www.python.org\/\">Python<\/a> \u0438 <a href=\"http:\/\/www.pylonsproject.org\/projects\/pyramid\/about\">Pyramid<\/a>.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/2fc\/22c\/13d\/2fc22c13dfa748841314d898e0b2443e.png\"\/><\/p>\n<p>  \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u043a\u0442\u043e-\u0442\u043e \u0440\u0435\u0448\u0438\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u00ab\u0411\u0430\u0440 \u0436\u0435\u043b\u0430\u043d\u0438\u0439\u00bb \u0434\u043b\u044f \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u0442\u043e-\u0442\u043e \u043e\u0442\u043a\u0440\u043e\u0435\u0442 \u0434\u043b\u044f \u0441\u0435\u0431\u044f Pyramid \u2014 \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0432\u0435\u0431-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 <a href=\"https:\/\/github.com\/rgmih\/wishbar\">GitHub<\/a> \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0432\u043e\u0438\u0445 \u0446\u0435\u043b\u044f\u0445.<\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041f\u043e \u0445\u043e\u0434\u0443 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0442 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0431\u0449\u0435\u043c \u0438 Pyramid \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e Pyramid \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.  <\/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-172243","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/172243","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=172243"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/172243\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=172243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=172243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=172243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}