Open utterances-bot opened 2 years ago
You should use time.monotonic() instead of time.time(). As when the system time would change during the request (eg user changed time or NTP time sync was applie) this request 'stopwatch' would give an incorrect result. time.monotic() is guaranteed to reflect the CPU time ticks and thus won't be affected by (clock) time changes.
TypeError: init() missing 1 required positional argument: 'get_response'
@alxvallejo hard to debug without seeing your implementation, but this may be of help: https://copyprogramming.com/howto/typeerror-init-missing-1-required-positional-argument-get-response
accessing the body on lime 29 fails with:
*** django.http.request.RawPostDataException: You cannot access body after reading from request's data stream
accessing the body on lime 29 fails with:
*** django.http.request.RawPostDataException: You cannot access body after reading from request's data stream
Are you using this in conjunction with an API framework like DRF or Ninja?
I'm using this in conjunction with Ninja, is there any other configurations that are necessary?
Log requests and responses with Django Middleware
Write custom Django Middleware to log requests fields and respective responses in the log file
https://zeroes.dev/p/django-middleware-to-log-requests/