simple middleware to add request context to container. It s probably awfully leaking memory, because no gc is done.
«request» scope now works as expected in a "normal" request. If something interrupts the request, nothing will clean up the instanciated services and there _will_ be a memory leak. Maybe django integration (or other framework integrations) should provide a garbage collector thread implementation that will release memory used by dead scope namespaces.
move django imports into actual execution so import is not a problem even with missing optional dependency.