Try to factor out all Django dependencies.