I would probably put this into the `.django` module, like `modulestore()` itself, so that there aren't django dependencies elsewhere inside the `xmodule.modulestore` code.