Adding middleware and settings for rpc4django