改变南方移民目录 [英] Changing South Migration Directory

查看:119
本文介绍了改变南方移民目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改South寻找应用迁移的位置?

How do you change the location where South looks for an app's migrations?

默认情况下,South假定应用程序的迁移位于/迁移中。但是,我已经迁移了安装在/usr/local/lib/python-2.6/dist-packages/上的第三方软件包的模型,所以South正在寻找迁移,而不是我的自定义代码库的位置

By default, South assumes an app's migrations are in /migrations. However, I've migrated the model of a third-party package which is installed at /usr/local/lib/python-2.6/dist-packages/, so South is looking for migrations there, instead of the location of my custom codebase.

推荐答案

在settings.py:

In settings.py:

SOUTH_MIGRATION_MODULES = {
    'books': 'myproject.app_name.migrations',
}

这篇关于改变南方移民目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆