{"id":167165,"date":"2013-01-26T13:21:03","date_gmt":"2013-01-26T09:21:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=167165"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=167165","title":{"rendered":"<span class=\"post_title\">\u0421\u0432\u044f\u0437\u043a\u0430 ExtJS+Django+Apache+SVN deploy (\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 CRUD \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043d\u0430 Django)<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h4>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0445\u043e\u0447\u0443 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u0441\u0442\u043e\u043b\u044c \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u0441\u0451 \u044d\u0442\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043e. \u0414\u0443\u043c\u0430\u044e \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. <i>\u0425\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043d\u0435 \u0441\u0442\u0430\u043d\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0430\u043c \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0449\u0438, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/i> \u0422\u0430\u043a\u0436\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043d\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043e\u043f\u044f\u0442\u044c \u0436\u0435, \u044d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 PDC \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c tci.lan, \u0432\u0441\u0435 \u0438\u043c\u0435\u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b, \u0432 \u0432\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u0430\u043c. \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434, \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043e\u043d \u0441\u043f\u0440\u044f\u0442\u0430\u043d \u0432 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430\u0445.<a name=\"habracut\"><\/a><\/p>\n<h5>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h5>\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0432\u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430: <i>\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0443\u044e \u0411\u0414 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438<\/i> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043c\u043d\u0435 \u0434\u0430\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0438 \u0442.\u043f. \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0442\u043e\u0436\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u2014 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435\u0445 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (\u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e).<\/p>\n<h5>\u0412\u044b\u0431\u043e\u0440 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b<\/h5>\n<p>\u0412 \u0432\u044b\u0431\u043e\u0440\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u044f \u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043b\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0439 \u0438, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0435\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043e\u0444\u0442\u0430 (\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u043a\u043e\u0432, \u0432\u0430\u0439\u043d\u0430, \u0444\u043b\u0435\u0448\u0430, \u0441\u0438\u043b\u044c\u0432\u0435\u0440\u043b\u0430\u0439\u0442\u0430 \u0438 \u0442.\u043f.). \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 CentOS, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0436\u0435 \u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e.<br \/>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 GUI \u0432\u044b\u0431\u0440\u0430\u043b ExtJS. \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0431\u044b\u043b \u0440\u0435\u043b\u0438\u0437 4.2b. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u044d\u043a\u044d\u043d\u0434\u0430, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c (\u043e\u043d \u0441\u043a\u043e\u0440\u0435\u0435 API-\u0441\u0435\u0440\u0432\u0435\u0440), \u0432\u044b\u0431\u0440\u0430\u043b Django, \u0432 \u0432\u0438\u0434\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u0441 \u043d\u0438\u043c \u0443\u0436\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0438 \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0431\u043b\u0438\u0436\u0435.<br \/>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 IDE \u0432\u044b\u0431\u0440\u0430\u043b PyCharm \u2014 \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 IDE \u0434\u043b\u044f Python.<\/p>\n<h5>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h5>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 ExtJS \u0438 Django:  <\/p>\n<ul>\n<li>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 Apache \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0445\u043e\u0441\u0442\u043e\u043c \u0438 \u0445\u044d\u043d\u0434\u043b\u0435\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438.<\/li>\n<li>SVN-\u0441\u0435\u0440\u0432\u0435\u0440. \u041e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0432\u0435\u0440\u0441\u0438\u0439 \u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f commit&#8217;\u0430.<\/li>\n<li>CRUD \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Django. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f, \u0447\u0442\u0435\u043d\u0438\u044f, \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a API.<\/li>\n<li>PyCharm \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c SVN&#8217;\u043e\u043c \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0442\u043b\u0430\u0434\u043a\u0438.<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 Sencha Architect 2. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 ExtJS.<\/li>\n<\/ul>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e-\u043f\u043e\u0440\u044f\u0434\u043a\u0443<\/h4>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 Apache<\/h5>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0451\u043c \u0441 Apache. \u0411\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0442\u043e \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 (\u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u0434\u043b\u044f \u0442\u0435\u0445, \u0443 \u043a\u043e\u0433\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0445\u043e\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430).<br \/>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>\/etc\/httpd\/conf\/vhosts\/db.tci.lan.conf<\/code> \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"apache\">&lt;VirtualHost *:80&gt;   ServerAdmin lufton@gmail.com   ServerName  www.db.tci.lan   ServerAlias db.tci.lan    DirectoryIndex index.html index.php   DocumentRoot \/home\/lufton\/public_html\/db.tci.lan\/public   WSGIScriptAlias \/ \/home\/lufton\/public_html\/db.tci.lan\/public\/db\/mod.wsgi   Alias \/js\/app.js &quot;\/home\/lufton\/public_html\/db.tci.lan\/public\/db\/app.js&quot;   Alias \/css &quot;\/home\/lufton\/public_html\/db.tci.lan\/public\/db\/css&quot;   &lt;Location &quot;\/css&quot;&gt;     SetHandler None     Allow from all   &lt;\/Location&gt;   Alias \/js &quot;\/home\/lufton\/public_html\/db.tci.lan\/public\/db\/js&quot;   &lt;Location &quot;\/js&quot;&gt;     SetHandler None     Allow from all   &lt;\/Location&gt;   Alias \/img &quot;\/home\/lufton\/public_html\/db.tci.lan\/public\/db\/img&quot;   &lt;Location &quot;\/img&quot;&gt;     SetHandler None     Allow from all   &lt;\/Location&gt;   Alias \/media &quot;\/usr\/lib\/python2.6\/site-packages\/django\/contrib\/admin\/media&quot;   &lt;Location &quot;\/media&quot;&gt;     SetHandler None     Allow from all   &lt;\/Location&gt;   &lt;Location &quot;\/svnmanager&quot;&gt;     SetHandler None     Allow from all   &lt;\/Location&gt;   LogLevel warn   ErrorLog  \/home\/lufton\/public_html\/db.tci.lan\/log\/error.log   CustomLog \/home\/lufton\/public_html\/db.tci.lan\/log\/access.log combined &lt;\/VirtualHost&gt; LoadModule python_module modules\/mod_python.so &lt;Directory \/home\/lufton\/public_html\/db.tci.lan\/&gt;   Options Indexes FollowSymLinks MultiViews   AllowOverride None   Order allow,deny   allow from all   AddHandler mod_python .py   PythonHandler mod_python.publisher | .py   AddHandler mod_python .psp .psp_   PythonHandler mod_python.psp | .psp .psp_   PythonDebug On &lt;\/Directory&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u0440\u043d\u0435\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432 <code>*.py<\/code> Python&#8217;\u043e\u043c \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 5 alias&#8217;\u043e\u0432 (<code>\/js\/app.js<\/code>, <code>\/img<\/code>, <code>\/css<\/code>, <code>\/js<\/code>, <code>\/media<\/code>) \u0434\u043b\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 ExtJS \u0438 Django Admin. \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c Python&#8217;\u0430.<br \/>  \u0417\u0434\u0435\u0441\u044c lufton \u2014 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, db.tci.lan \u2014 \u0430\u0434\u0440\u0435\u0441 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e\u0431\u044b \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 <code>\/etc\/httpd\/conf\/vhosts\/<\/code> \u0438\u043d\u043a\u043b\u044e\u0434\u0438\u043b\u0438\u0441\u044c \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0430, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <code>\/etc\/httpd\/conf\/httpd.conf<\/code> \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435\/\u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443:  <\/p>\n<pre><code class=\"apache\">Include \/etc\/httpd\/conf\/vhosts\/*.conf <\/code><\/pre>\n<p>  \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0442\u0430\u043a\u0436\u0435, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d <a href=\"http:\/\/code.google.com\/p\/modwsgi\/\">mod_wsgi<\/a> \u0438 \u043e\u043d \u0432 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438\u043d\u043b\u044e\u0434\u0438\u0442\u0441\u044f.<br \/>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0442\u0430\u043a\u0436\u0435 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432\u0438\u0434\u0430:<br \/>  <img decoding=\"async\" src=\"http:\/\/farm9.staticflickr.com\/8515\/8394047405_afce642893_b.jpg\"\/><br \/>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Apache \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430.<\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Subversion<\/h5>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>db<\/code> \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043f\u043e \u043f\u0443\u0442\u0438 <code>\/srv\/svn\/repos\/db<\/code>. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u043d \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c SVN \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e commit&#8217;\u0430 HEAD-\u0444\u0430\u0439\u043b\u044b \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0447\u0435\u043a\u0430\u0443\u0442\u0438\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u043c<br \/>  <code>svn checkout http:\/\/127.0.0.1\/svn\/db \/home\/lufton\/public_html\/db.tci.lan\/public\/db<\/code><br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0438\u0437 <br \/>  <code>\/srv\/svn\/repos\/db\/hooks\/post-commit.tmpl<\/code><br \/>  \u0432<br \/>  <code>\/srv\/svn\/repos\/db\/hooks\/post-commit<\/code><br \/>  \u0412\u043c\u0435\u0441\u0442\u043e <code>mailer.py commit &quot;$REPOS&quot; &quot;$REV&quot; \/path\/to\/mailer.conf<\/code> \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:  <\/p>\n<pre><code>cd \/home\/lufton\/public_html\/db.tci.lan\/public\/db \/usr\/bin\/svn update # python manage.py syncdb # \/etc\/init.d\/httpd restart <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e commit&#8217;\u0430 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u043f\u0430\u043f\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0447\u0442\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442 \u043a\u043e\u043b-\u0432\u043e \u0432\u0430\u0448\u0438\u0445 <s>\u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439<\/s> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.<\/p>\n<h5>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e CRUD \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430<\/h5>\n<p>\u0412 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043f\u0440\u0435\u0434\u0432\u0435\u0449\u0430\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441 \u0437\u0430\u043f\u0438\u0441\u044f\u043c\u0438 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0431\u044b\u0442\u044c \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0430 \u0434\u043e \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0431\u044b\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d. \u041c\u043e\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u044f\u0435\u0442:  <\/p>\n<ul>\n<li>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435, \u0432\u044b\u0431\u043e\u0440\u043a\u0443, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435) \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438.<\/li>\n<li>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0432 JSON-\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 (\u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0432 response).<\/li>\n<li>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 start \u0438 limit.<\/li>\n<li>\u0424\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 =).<\/li>\n<li>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c \u043f\u043e\u043b\u0435\u0439.<\/li>\n<li>\u0424\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043f\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 query (\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044e).<\/li>\n<li>\u0412\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (\u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u043b\u044f\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0438).<\/li>\n<li>\u0412\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u043f\u043e\u043b\u044f \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 (OneToOne, ForeignKey).<\/li>\n<\/ul>\n<h6>\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 Model<\/h6>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0451\u043c \u043f\u043e\u0436\u0430\u043b\u0443\u0439 \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043e\u0442 Model. \u041a\u0430\u0436\u0434\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0443\u043c\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0435\u0431\u044f \u0432 \u0432\u0438\u0434\u0435 JSON-\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u044f \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u043e\u0442 Python&#8217;\u0430 \u0434\u0430\u043b\u0451\u043a, \u0442\u0430\u043a \u0447\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u0438\u0437\u044f\u0449\u043d\u043e\u0435, \u043d\u043e \u0432\u0441\u0451 \u0436\u0435, \u0440\u0430\u0431\u043e\u0447\u0435\u0435.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u0435\u043a\u0441\u0442 \u043a\u043b\u0430\u0441\u0441\u0430:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">class CoolModel ( Model ): \tclass Meta: \t\tabstract = True \t\tapp_label = &quot;db&quot; \tdef __init__ ( self, *args, **kwargs ): \t\tsuper(CoolModel, self).__init__(*args, **kwargs) \t\tself.__initial = self._dict \tdef toDict ( self, properties = &quot;*&quot; ): \t\tdef getValue ( field, properties = &quot;*&quot; ): \t\t\tvalue = getattr(self, field.name) \t\t\tif isinstance(field, ForeignKey): \t\t\t\tif field.name in properties: \t\t\t\t\treturn value.toDict(properties[field.name]) \t\t\telif isinstance(value, datetime.date) or isinstance(value, datetime.datetime): \t\t\t\treturn value.isoformat() \t\t\telif isinstance(field, CommaSeparatedIntegerField) and isinstance(value, basestring): \t\t\t\treturn json.loads(value) \t\t\telif isinstance(value, Decimal): \t\t\t\treturn float(value) \t\t\telif isinstance(field, ImageField): \t\t\t\treturn value.url if value else None \t\t\telif isinstance(field, NullBooleanField): \t\t\t\treturn None if value not in (True, False) else 1 if value else 0 \t\t\telse: \t\t\t\treturn value  \t\tresult = {} \t\tfields = {} \t\tfor field in self._meta.fields: \t\t\tfields[field.name] = field \t\t\tif isinstance(field, ForeignKey): \t\t\t\tidAttr = &quot;%s_id&quot; % field.name \t\t\t\tresult[idAttr] = getattr(self, idAttr) \t\t\telse: \t\t\t\tresult[field.name] = getValue(field, properties) \t\tif isinstance(properties, dict): \t\t\tfor k, v in properties.iteritems(): \t\t\t\tif hasattr(self, k): \t\t\t\t\tvalue = getattr(self, k) \t\t\t\t\tif isinstance(value, CoolModel): \t\t\t\t\t\tresult[k] = value.toDict(v) \t\t\t\t\telif value.__class__.__name__ == &quot;RelatedManager&quot;: \t\t\t\t\t\tresult[k] = toJSON(value.all(), v) \t\t\t\t\telif value is None: \t\t\t\t\t\tresult[k] = {} if k in fields and isinstance(fields[k], ForeignKey) else None \t\t\t\t\telse: \t\t\t\t\t\tresult[k] = value \t\treturn result  \t@property \tdef diff ( self ): \t\td1 = self.__initial \t\td2 = self._dict \t\tdiffs = [(k, (v, d2[k])) for k, v in d1.items() if v != d2[k]] \t\treturn dict(diffs)  \t@property \tdef original ( self ): \t\ttry: \t\t\treturn self.__class__.objects.get(id = self.id) \t\texcept self.__class__.DoesNotExist: \t\t\treturn None  \t@property \tdef hasChanged ( self ): \t\treturn bool(self.diff)  \t@property \tdef changedFields ( self ): \t\treturn self.diff.keys()  \tdef getFieldDiff ( self, field_name ): \t\treturn self.diff.get(field_name, None)  \tdef save ( self, *args, **kwargs ): \t\tsuper(CoolModel, self).save(*args, **kwargs) \t\tself.__initial = self._dict  \t@property \tdef _dict ( self ): \t\treturn model_to_dict(self, fields = [field.name for field in self._meta.fields]) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u043f\u0438\u0441\u0430\u043b\u0441\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 toDict \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0434\u043e\u043f\u0438\u043b\u0438\u0442\u044c \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0447\u0442\u043e \u0432\u044b, \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u043f\u043e\u043d\u044f\u043b\u0438 \u043a\u0430\u043a \u043e\u043d \u0443\u0441\u0442\u0440\u043e\u0435\u043d. \u0415\u0441\u043b\u0438 \u0432 \u043a\u0440\u0430\u0442\u0446\u0435, \u0442\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043f\u043e\u043b\u0435-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u044b (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430, \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 <s>\u043c\u043e\u0436\u043d\u043e<\/s> \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0441\u0435\u0440\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u043e\u0433\u043e \u0438\u043b\u0438 \u0438\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430\/\u043a\u043b\u0430\u0441\u0441\u0430). \u0417\u0430\u0442\u0435\u043c \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u044b \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432. \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u0441\u043f\u0438\u0441\u043e\u043a, \u0430 \u0445\u044d\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0432\u0438\u0434\u0430:  <\/p>\n<pre><code class=\"javascript\">{ \taddress: { \t\tcountry: null, \t\tstate: { \t\t\ttype: null, \t\t\tfullTitle: null \t\t}, \t\tdistrict: null, \t\tcity: { \t\t\ttype: null, \t\t\tfullTitle: null \t\t}, \t\tstreetType: null, \t\tfullAddress: null \t}, \ttype: null } <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u0445\u044d\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432: address \u0438 type. \u041a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043f\u043e\u043c\u0438\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e\u043b\u0435\u0439 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432: contry, state, district, city, streetType, fullAddress \u0434\u043b\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 address. null \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u043e\u0434\u0435\u043b\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u0430\u043a\u043e\u0439 \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 properties \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0438 \u0432\u044b\u0431\u043e\u0440\u043e\u043a.<\/p>\n<h6>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e handler&#8217;\u0430<\/h6>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c \u043a\u0430\u043a \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432 <code>urls.py<\/code> \u0434\u043e\u0431\u0430\u0432\u0438\u043c urlpattern:  <\/p>\n<pre><code class=\"python\">url(r'^(?P&lt;view&gt;[^\/]*)\/.*$', 'db.views.page') <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0435\u0442\u043e\u0434 <code>page<\/code> \u0432 \u0444\u0430\u0439\u043b <code>views.py<\/code>.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041c\u0435\u0442\u043e\u0434 page<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def page ( req, view ): \tmodels = { \t    &quot;countries&quot;: Country, \t    &quot;statetypes&quot;: StateType, \t    &quot;states&quot;: State, \t    &quot;districts&quot;: District, \t    &quot;cities&quot;: City, \t    &quot;people&quot;: Person \t    #... \t} \tmodelClass = models[view] if view in models else None \tif view in models: \t\tmethod = req.method \t\tproperties = json.loads(req.GET.get(&quot;properties&quot;, &quot;{}&quot;)) \t\tif method == &quot;GET&quot;: \t\t\tid = req.GET.get(&quot;id&quot;, None) \t\t\tif id: \t\t\t\treturn read(req, modelClass, filters = {&quot;id&quot;: id}, properties = properties) \t\t\telse: \t\t\t\tquery = req.GET.get(&quot;query&quot;, None) \t\t\t\tstart = int(req.GET.get(&quot;start&quot;, 0)) \t\t\t\tlimit = int(req.GET.get(&quot;limit&quot;, -1)) \t\t\t\tif limit &lt; 0: limit = None \t\t\t\tf = json.loads(req.GET.get(&quot;filter&quot;, &quot;[]&quot;)) \t\t\t\ts = json.loads(req.GET.get(&quot;sort&quot;, &quot;[]&quot;)) \t\t\t\tq = None \t\t\t\tfilters = {} \t\t\t\tfor filter in f: filters[filter[&quot;property&quot;]] = filter[&quot;value&quot;] \t\t\t\tqueryProperties = { \t\t\t\t    &quot;countries&quot;: &quot;title__icontains&quot;, \t\t\t\t    &quot;states&quot;: &quot;title__icontains&quot;, \t\t\t\t    &quot;districts&quot;: &quot;title__icontains&quot;, \t\t\t\t    &quot;cities&quot;: &quot;title__icontains&quot;, \t\t\t\t    &quot;people&quot;: [&quot;lastName__icontains&quot;, &quot;firstName__icontains&quot;, &quot;middleName__icontains&quot;] \t\t\t\t    #... \t\t\t\t} \t\t\t\tif view in queryProperties and query: \t\t\t\t\tif isinstance(queryProperties[view], list): \t\t\t\t\t\tfor p in queryProperties[view]: \t\t\t\t\t\t\tq = q | Q(**{p: query}) if q else Q(**{p: query}) \t\t\t\t\telse: \t\t\t\t\t\tq = q | Q(**{queryProperties[view]: query}) if q else Q(**{queryProperties[view]: query}) \t\t\t\tsorters = [&quot;%s%s&quot; % (&quot;&quot; if k == &quot;ASC&quot; else &quot;-&quot;, v) for k, v in s] \t\t\t\treturn read(req, modelClass, start, limit, filters, q, sorters, properties) \t\telif method == &quot;POST&quot;: \t\t\titems = json.loads(req.raw_post_data) \t\t\treturn create(req, modelClass, items, properties) \t\telif method == &quot;PUT&quot;: \t\t\titems = json.loads(req.raw_post_data) \t\t\treturn update(req, modelClass, items, properties) \t\telif method == &quot;DELETE&quot;: \t\t\titems = json.loads(req.raw_post_data) \t\t\treturn delete(req, modelClass, items) \telif view in globals(): \t\tif not view in [&quot;signin&quot;]: \t\t\tif not req.user.is_authenticated: \t\t\t\treturn JsonResponse({ \t\t\t\t\t&quot;success&quot;: False, \t\t\t\t\t&quot;message&quot;: u&quot;\u0412\u044b \u043d\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b!&quot; \t\t\t\t}) \t\t\telse: \t\t\t\tif not req.user.is_superuser: \t\t\t\t\treturn JsonResponse({ \t\t\t\t\t\t&quot;success&quot;: False, \t\t\t\t\t\t&quot;message&quot;: u&quot;\u0412\u044b \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0435\u0441\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c!&quot; \t\t\t\t\t}) \t\treturn globals()[view](req) \telse: \t\treturn JsonResponse({ \t\t\t&quot;success&quot;: False, \t\t\t&quot;message&quot;: u&quot;\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (%s) \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e!&quot; % view \t\t}) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043b\u043e\u0432\u0430\u0440\u044c <code>models<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u044b, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447 \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 API, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u043a\u043b\u0430\u0441\u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>queryProperties<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u044b, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447 \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 API, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u0438\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u043a\u0438\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 (\u0441 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f\u043c\u0438 \u0442\u0438\u043f\u0430 &quot;__in&quot;, &quot;__gt&quot;, &quot;__icontains&quot; \u0438 \u0442.\u0434.). \u0412\u044b\u0431\u043e\u0440\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c query \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044f\u043c (\u0444\u0438\u043b\u044c\u0440\u044b \u043e\u0431\u044a\u0435\u0434\u0435\u043d\u044f\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c OR).<br \/>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b create, read, update \u0438 delete.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u043e\u0442 \u043a\u043e\u0434 \u044d\u0442\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432:<\/b><\/p>\n<div class=\"spoiler_text\">@transaction.commit_manually<br \/>  def create ( req, modelClass, items, properties = None ):<br \/>   results = []<br \/>   try:<br \/>   for item in items:<br \/>   model = modelClass()<br \/>   for k, v in item.iteritems():<br \/>   if hasattr(model, k):<br \/>   setattr(model, k, v)<br \/>   model.save()<br \/>   results.append(toJSON(model, properties))<br \/>   transaction.commit()<br \/>   return JsonResponse({<br \/>   \u00absuccess\u00bb: True,<br \/>   \u00abitems\u00bb: results<br \/>   })<br \/>   except Exception, e:<br \/>   transaction.rollback()<br \/>   return JsonResponse({<br \/>   \u00absuccess\u00bb: False,<br \/>   \u00abmessage\u00bb: e.message<br \/>   })<\/p>\n<p>  def read ( req, modelClass, start = 0, limit = None, filters = None, q = None, sorters = None, properties = None ):<br \/>   try:<br \/>   query = modelClass.objects.all()<br \/>   if filters:<br \/>   query = query.filter(**filters)<br \/>   if q:<br \/>   query = query.filter(q)<br \/>   if sorters:<br \/>   query = query.order_by(sorters)<br \/>   count = query.count()<br \/>   results = toJSON(query[start:(start+limit) if limit else None], properties)<br \/>   return JsonResponse({<br \/>   \u00absuccess\u00bb: True,<br \/>   \u00abitems\u00bb: results,<br \/>   \u00abtotal\u00bb: count<br \/>   })<br \/>   except Exception, e:<br \/>   return JsonResponse({<br \/>   \u00absuccess\u00bb: False,<br \/>   \u00abmessage\u00bb: e.message<br \/>   })<\/p>\n<p>  @transaction.commit_manually<br \/>  def update ( req, modelClass, items, properties = None ):<br \/>   results = []<br \/>   try:<br \/>   for item in items:<br \/>   try:<br \/>   model = modelClass.objects.get(id = item[\u00abid\u00bb])<br \/>   for k, v in item.iteritems():<br \/>   if hasattr(model, k):<br \/>   setattr(model, k, v)<br \/>   model.save()<br \/>   results.append(toJSON(model, properties))<br \/>   except modelClass.DoesNotExist:<br \/>   pass<br \/>   transaction.commit()<br \/>   return JsonResponse({<br \/>   \u00absuccess\u00bb: True,<br \/>   \u00abitems\u00bb: results<br \/>   })<br \/>   except Exception, e:<br \/>   transaction.rollback()<br \/>   return JsonResponse({<br \/>   \u00absuccess\u00bb: False,<br \/>   \u00abmessage\u00bb: e.message<br \/>   })<\/p>\n<p>  @transaction.commit_manually<br \/>  def delete ( req, modelClass, items ):<br \/>   try:<br \/>   for item in items:<br \/>   modelClass.objects.get(id = item[\u00abid\u00bb]).delete()<br \/>   transaction.commit()<br \/>   return JsonResponse({<br \/>   \u00absuccess\u00bb: True<br \/>   })<br \/>   except Exception, e:<br \/>   transaction.rollback()<br \/>   return JsonResponse({<br \/>   \u00absuccess\u00bb: False,<br \/>   \u00abmessage\u00bb: e.message<br \/>   })  <\/div>\n<\/div>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435, \u0432\u044b\u0431\u043e\u0440\u043a\u0443, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 response \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435\/\u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 PyCharm<\/h5>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u043d\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 PyCharm \u043d\u0435\u0442. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0447\u0435\u043a\u0430\u0443\u0442\u0438\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440:<br \/>  <code>svn checkout http:\/\/db.tci.lan\/svn\/db ~\/Projects\/db<\/code><br \/>  \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432 PyCharm \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 Django. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0442\u0438 \u043f\u0430\u043f\u043a\u0443 <code>~\/Projects\/db<\/code> (\u0442\u0443\u0442 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0443 <code>db<\/code> \u0432 \u043f\u0430\u043f\u043a\u0435 <code>~\/Projects\/db<\/code>). \u041f\u0443\u0442\u044c \u043a <code>settings.py<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c <code>~\/Projects\/db\/settings.py<\/code>. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0444\u0430\u0439\u043b\u044b \u0432 SVN, \u0441\u043e\u0437\u0434\u0430\u0451\u043c CRUD, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u044b\u0448\u0435.<br \/>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>mod.wsgi<\/code>, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u043b\u0438 Apache. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0435\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u043c:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">import os, sys sys.path.append('\/home\/lufton\/public_html\/db.tci.lan\/public') sys.path.append('C:\/Documents and Settings\/lufton.TCI\/Projects') os.environ['DJANGO_SETTINGS_MODULE'] = 'db.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c <code>sys.path.append<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0438 \u043d\u0430 Windows, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0435\u0449\u0451 \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u0436\u0434\u044b\u0439 commit \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u0432\u0430\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0432\u0435\u0440\u0441\u0438\u0439, \u043d\u043e \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0442\u0443\u043f\u044f\u0442 \u0432 \u0441\u0438\u043b\u0443.<br \/>  \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Django \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 IP-\u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Sencha Architect 2<\/h5>\n<p>\u0412 Sencha Architect \u0435\u0441\u0442\u044c \u0446\u0435\u043b\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439, \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043d\u0435 \u0432\u044b\u0437\u0432\u0430\u043b\u0430 \u043e\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0438\u0439.<br \/>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0430\u043f\u043a\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432 <code>~\/Projects\/db<\/code>. \u0412 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 Application \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <code>appFolder: 'js\/app'<\/code>.\u0422\u0435\u043f\u0435\u0440\u044c, \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438, <s>\u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b <code>~\/Projects\/db\/app.js<\/code> \u0432 <code>~\/Projects\/db\/js\/app.js<\/code><\/s> \u0432\u0430\u043c \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>app.js<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0441\u0432\u043e\u0439 alias \u0438 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u043d\u043e \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043a <code>\/js\/app.js<\/code>.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 ExtJS \u0438 Django. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 SA. \u041f\u043e\u0441\u043b\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e Publish \u0432 SA, \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0434\u0435\u043b\u0435\u0439\/\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\/\u0432\u0438\u0434\u043e\u0432\/\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0432 SVN<s>, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441 Application&#8217;\u043e\u043c, \u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 <code>app.js<\/code> \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u044b\u0448\u0435<\/s>. \u0417\u0430\u043a\u043e\u043c\u043c\u0438\u0442\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0439\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \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\/167165\/\"> http:\/\/habrahabr.ru\/post\/167165\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h4>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0445\u043e\u0447\u0443 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u0441\u0442\u043e\u043b\u044c \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u0441\u0451 \u044d\u0442\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043e. \u0414\u0443\u043c\u0430\u044e \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. <i>\u0425\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043d\u0435 \u0441\u0442\u0430\u043d\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0430\u043c \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0449\u0438, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/i> \u0422\u0430\u043a\u0436\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043d\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043e\u043f\u044f\u0442\u044c \u0436\u0435, \u044d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 PDC \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c tci.lan, \u0432\u0441\u0435 \u0438\u043c\u0435\u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b, \u0432 \u0432\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u0430\u043c. \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434, \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u043e\u043d \u0441\u043f\u0440\u044f\u0442\u0430\u043d \u0432 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430\u0445.<\/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-167165","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/167165","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=167165"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/167165\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=167165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=167165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=167165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}