better django middleware support for versioning