mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00

* django1.11: (152 commits) request.raw_post_data -> request.body (django 1.6) Upgrading pgbouncer to 1.15.0. Finishing off Postgresql 13 upgrade. Upgrading to Postgresql 13. Ubuntu 20.04 Fixing supervisor path issues Upgrading setuptools Fixing flask Handling over capacity for twitter. Max length for image_urls. Properly filtering newsletter feeds. Fixing issue with text importer on feed-less urls. Removing dependency, fixing encoding issue for pages. Fixing DB Monitor. Updating User Agent for all fetchers. Ignoring VSCode. Fixing DB Monitor. Updating User Agent for all fetchers. Ignoring VSCode. Fixing Statistics by fixing how timezones are handled. ...
23 lines
758 B
Python
23 lines
758 B
Python
from django.conf import settings
|
|
from utils import log as logging
|
|
|
|
class DumpRequestMiddleware:
|
|
def process_request(self, request):
|
|
if settings.DEBUG:
|
|
request_data = request.POST or request.GET
|
|
request_items = request_data.items()
|
|
if request_items:
|
|
logging.debug(" ---> ~FC%s ~SN~FC%s ~SN~BC~FK%s~BK~FC" % (request.method, request.path, dict(request_items)))
|
|
else:
|
|
logging.debug(" ---> ~FC%s ~SN~FC%s" % (request.method, request.path))
|
|
|
|
def __init__(self, get_response=None):
|
|
self.get_response = get_response
|
|
|
|
def __call__(self, request):
|
|
|
|
self.process_request(request)
|
|
response = self.get_response(request)
|
|
|
|
return response
|
|
|