{"id":189858,"date":"2013-08-12T20:37:02","date_gmt":"2013-08-12T16:37:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=189858"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=189858","title":{"rendered":"<span class=\"post_title\">Django thottling<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041a\u0430\u043a-\u0442\u043e \u0440\u0430\u0437 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0443\u0436\u043e\u0435 django-app, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c, \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e. \u0418, \u0447\u0442\u043e \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439 \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0430\u0432\u0442\u043e\u0440 \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u0441\u043f\u0430\u043c\u0435\u0440\u043e\u0432, \u0438\u043b\u0438 \u043e\u0442 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c F5 \u043d\u0430 \u0442\u044f\u0436\u0435\u043b\u043e\u0439 \u0444\u043e\u0440\u043c\u0435. \u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438 \u0444\u043e\u0440\u043a\u0430\u0442\u044c \u0443 \u043c\u0435\u043d\u044f \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043d\u0435 \u0431\u044b\u043b\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c middleware, \u0440\u0435\u0436\u0443\u0449\u0438\u0439 \u043a\u0438\u0441\u043b\u043e\u0440\u043e\u0434 \u043d\u0435\u0445\u043e\u0440\u043e\u0448\u0438\u043c \u043b\u044e\u0434\u044f\u043c.  <\/p>\n<h5>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b<\/h5>\n<p>  <\/p>\n<ul>\n<li>maintenance \u0440\u0435\u0436\u0438\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c view \u0432 \u0446\u0435\u043b\u043e\u043c, \u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 http \u043c\u0435\u0442\u043e\u0434\u044b<\/li>\n<li>\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b \u0441\u0430\u0439\u0442\u0430, \u0434\u043b\u044f PATCH, POST \u0438 \u0442.\u0434.<\/li>\n<li>\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b \u0434\u043b\u044f view \u0432 \u0446\u0435\u043b\u043e\u043c, \u0438\u043b\u0438 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 http-\u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/li>\n<\/ul>\n<p>  \u041f\u0440\u043e\u0449\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0430:  <\/p>\n<pre><code class=\"python\">DJANGO_THROTTLING = {     'all': 1000,     'post': 'callable:helpers.trash.my_callback',     'congestion': 'forum.views.congestion',      'django.contrib.admin.options.change_view': {         'post': False,         'all': None,         'uri': '\/admin\/forum\/post\/23\/',     }, } <\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c\u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h4>\n<p>  <\/p>\n<pre><code class=\"bash\">git clone http:\/\/github.com\/night-crawler\/django-throttling.git cd django-throttling python setup.py install <\/code><\/pre>\n<h5>Global throttling<\/h5>\n<p>  \u041a\u043e\u043d\u0444\u0438\u0433 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u0435\u043a\u0446\u0438\u0439, \u0441\u0430\u043c\u0430\u044f \u0432\u0435\u0440\u0445\u043d\u044f\u044f \u2014 fallback, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u0432 \u0446\u0435\u043b\u043e\u043c, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430.<\/p>\n<pre><code class=\"python\">DJANGO_THROTTLING = {     'all': 1000,     'post': 10000,     'congestion': 'forum.views.congestion', } <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0432 1 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, post \u2014 \u0437\u0430\u043f\u0440\u043e\u0441 \u0440\u0430\u0437 \u0432 10 \u0441\u0435\u043a\u0443\u043d\u0434.<br \/>  <b>congestion<\/b> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c uri, \u0438\u043b\u0438 \u0432\u044c\u044e\u0445\u043e\u0439. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0432\u044c\u044e\u0445\u0430, \u0436\u0438\u0432\u0443\u0449\u0430\u044f \u043f\u043e \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u0443:<\/p>\n<pre><code class=\"python\">def congestion(request, congestion_bundle):     user = request.user     progress = int(float(congestion_bundle['delta']) \/ congestion_bundle['timeout'] * 100)     c = Context({'user': user, 'congestion_bundle': congestion_bundle, 'progress': progress})     return render_to_response(get_theme_template(user, 'congestion.html'), c,         context_instance=RequestContext(request)     ) <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u044e\u0437\u0435\u0440\u0443, \u0447\u0442\u043e \u043e\u043d \u0448\u0430\u043b\u0438\u0442 \u0438, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u0442\u044c N \u0441\u0435\u043a\u0443\u043d\u0434. \u0412\u044c\u044e\u0445\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u043d\u0430\u0431\u0434\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0441 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0431\u0430\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0440\u0435\u043b\u043e\u0430\u0434\u0438\u0442 \u0444\u043e\u0440\u043c\u0443. \u0412 <b>congestion_bundle<\/b> \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u044c\u044e\u0445\u0430 \u0438 \u0432\u0435\u0441\u044c \u043d\u0430\u0431\u043e\u0440 \u0435\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0434\u0430\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u044e\u0437\u0435\u0440\u0443 \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0435.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c POST \u043d\u0430 \u0432\u0441\u0435\u043c \u0441\u0430\u0439\u0442\u0435. \u0422\u043e\u0433\u0434\u0430 \u044e\u0437\u0435\u0440 \u0443\u0432\u0438\u0434\u0438\u0442 HttpResponseBadRequest:  <\/p>\n<pre><code class=\"python\">DJANGO_THROTTLING = {     'all': 1000,     'post': False,     'congestion': 'forum.views.congestion', } <\/code><\/pre>\n<p>  \u0410 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c POST \u0432\u043e\u0442 \u0442\u0430\u043a, \u0442\u043e\u0433\u0434\u0430 \u044e\u0437\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u0440\u0435\u043d\u044c:<\/p>\n<pre><code class=\"python\">DJANGO_THROTTLING = {     'all': 1000,     'post': '\/',     'congestion': 'forum.views.congestion', } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043b\u044f maintenance-mode:  <\/p>\n<pre><code class=\"python\">DJANGO_THROTTLING = {     'all': 1000,     'post': 'forum.views.maintenance',     'congestion': 'forum.views.congestion', }  # forum.views.maintenance def maintenance(request, maintenance_bundle):     return HttpPreResponse(maintenance_bundle) <\/code><\/pre>\n<p>  \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044c\u044e\u0445\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043f\u0438\u043a\u0430 \u0432 \u0444\u043e\u0440\u0443\u043c\u0435, \u0438\u043b\u0438 \u0434\u043b\u044f \u0435\u0449\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0447\u0430\u0441\u0442\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f. \u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430:  <\/p>\n<pre><code class=\"python\">DJANGO_THROTTLING = {     'all': 1000,     'post': 'callable:helpers.trash.my_callback', # \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 callable:     'congestion': 'forum.views.congestion', }  # helpers.trash.my_callback' def my_callback(request, view_func, view_args, view_kwargs):     return 'some_strange_key_123', 10000 <\/code><\/pre>\n<p>  \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043a\u043e\u0440\u0442\u0435\u0436 \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 \u0438 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430. \u0422\u0430\u0439\u043c\u0430\u0443\u0442\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u043d\u043e\u0432\u0430 \u0431\u044b\u0442\u044c int(), False, view, \u0438\u043b\u0438 uri. <\/p>\n<h5>Local throttling<\/h5>\n<p>  \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0438\u043c\u0435\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441. \u041e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435\u043c \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 &#8216;uri&#8217;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0442\u0440\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c throttle check \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043d\u0435\u0433\u043e.<\/p>\n<pre><code class=\"python\">DJANGO_THROTTLING = {     'all': 1000,     'post': 'callable:helpers.trash.my_callback',     'congestion': 'forum.views.congestion',      'django.contrib.admin.options.change_view': {         'post': False,         'all': None,         'uri': '\/admin\/forum\/post\/23\/',         # 'post': 'callable:helpers.trash.my_callback',         # 'all': 4000,     }, } <\/code><\/pre>\n<p>  \u041f\u0443\u043f\u0443\u0442\u043d\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a:<\/p>\n<ol>\n<li><b>DJANGO_THROTTLING_ENABLED<\/b>: \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0442\u0440\u043e\u0442\u0442\u043b\u0438\u043d\u0433, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d.<\/li>\n<li><b>DJANGO_THROTTLING_CACHE_EXPIRE<\/b>: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0438 \u0432 \u043a\u044d\u0448\u0435. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 60*60. <\/li>\n<li><b>DJANGO_THROTTLING_CACHE_PREFIX<\/b>: \u043a\u044d\u0448-\u043f\u0440\u0435\u0444\u0438\u043a\u0441, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u00abTHROTTLING\u00bb<\/li>\n<li><b>THROTTLING_CACHE_KEY_PATTERNS<\/b>: \u0442\u0443\u0442 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u044e\u0447\u0430. \u0412\u0441\u0435\u0433\u043e \u0435\u0441\u0442\u044c 4 \u0440\u0430\u0437\u043d\u043e\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0438: view_method, view, site_method, site. \u041c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c. <\/li>\n<\/ol>\n<p>  \u041d\u0430 <a href=\"https:\/\/github.com\/night-crawler\/django-throttling\">github&#8217;\u0435<\/a> \u0435\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430 \u00ab\u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c\u00bb.    \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\/189858\/\"> http:\/\/habrahabr.ru\/post\/189858\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041a\u0430\u043a-\u0442\u043e \u0440\u0430\u0437 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0443\u0436\u043e\u0435 django-app, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c, \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e. \u0418, \u0447\u0442\u043e \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439 \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0430\u0432\u0442\u043e\u0440 \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u0441\u043f\u0430\u043c\u0435\u0440\u043e\u0432, \u0438\u043b\u0438 \u043e\u0442 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c F5 \u043d\u0430 \u0442\u044f\u0436\u0435\u043b\u043e\u0439 \u0444\u043e\u0440\u043c\u0435. \u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438 \u0444\u043e\u0440\u043a\u0430\u0442\u044c \u0443 \u043c\u0435\u043d\u044f \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043d\u0435 \u0431\u044b\u043b\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c middleware, \u0440\u0435\u0436\u0443\u0449\u0438\u0439 \u043a\u0438\u0441\u043b\u043e\u0440\u043e\u0434 \u043d\u0435\u0445\u043e\u0440\u043e\u0448\u0438\u043c \u043b\u044e\u0434\u044f\u043c.  <\/p>\n<h5>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b<\/h5>\n<p>  <\/p>\n<ul>\n<li>maintenance \u0440\u0435\u0436\u0438\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c view \u0432 \u0446\u0435\u043b\u043e\u043c, \u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 http \u043c\u0435\u0442\u043e\u0434\u044b<\/li>\n<li>\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b \u0441\u0430\u0439\u0442\u0430, \u0434\u043b\u044f PATCH, POST \u0438 \u0442.\u0434.<\/li>\n<li>\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b \u0434\u043b\u044f view \u0432 \u0446\u0435\u043b\u043e\u043c, \u0438\u043b\u0438 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 http-\u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/li>\n<\/ul>\n<p>  \u041f\u0440\u043e\u0449\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0430:  <\/p>\n<pre><code class=\"python\">DJANGO_THROTTLING = {     'all': 1000,     'post': 'callable:helpers.trash.my_callback',     'congestion': 'forum.views.congestion',      'django.contrib.admin.options.change_view': {         'post': False,         'all': None,         'uri': '\/admin\/forum\/post\/23\/',     }, } <\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c\u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.  <\/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-189858","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/189858","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=189858"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/189858\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=189858"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=189858"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=189858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}