summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@oscaro.com>2015-02-22 21:18:12 +0100
committerAymeric Augustin <aymeric.augustin@oscaro.com>2015-02-23 19:55:10 +0100
commitb9c619abc101688fbbfa981525175f831d359483 (patch)
tree5107f1ee6b71afee6af9dba46a0fc4cb37575719 /tests/admin_scripts
parent952ce778c66d2cc01969f0e6ee4edd16becf2e66 (diff)
Prevented makemigrations from writing in sys.path[0].
There's no reason to assume that sys.path[0] is an appropriate location for generating code. Specifically that doesn't work with extend_sys_path which puts the additional directories at the end of sys.path. In order to create a new migrations module, instead of using an arbitrary entry from sys.path, import as much as possible from the path to the module, then create missing submodules from there. Without this change, the tests introduced in the following commit fail, which seems sufficient to prevent regressions for such a refactoring.
Diffstat (limited to 'tests/admin_scripts')
0 files changed, 0 insertions, 0 deletions