Capture and log all Python warnings
Capture and log all Python warnings

- Capture all Python warnings so that they can shown as part of logging system
  on console and in log file.

- Also capture deprecation warnings into logging system if debug mode is
  enabled. Current versions of Python disable deprecation warnings by default.
  Django 1.11 also follows this approach now.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>

Reviewed-by: Johannes Keyser <187051b70230423a457adbc3e507f9e4fff08d4b@posteo.de>

vignanl/Plinth,vignanl/Plinth,vignanl/Plinth,vignanl/Plinth,vignanl/Plinth