development.middleware: Issue warning instead of raising exception
Raising an exception depending on `settings.DEBUG` turned out to be a bad idea, as it breaks tests. We could try to detect Django's test mode and surpress the exception, but that might not be reliable either. So the best thing to do in that case is to issue a warning through Python's logging system.
Showing with 3 additions and 2 deletions