How to migrate models from a models package hierar

2019-07-26 08:14发布

Hy!

I have my models in a hierarchy below "models" package:

 models
 |-a.py
 |-b.py

instead of having all my models into the models.py

But when I run the migration command for South it doesn't find any of them:

schemamigration my_app --auto

In the meta class already exists the app_label='my_app'

I use auto because the tables are already changed.

1条回答
趁早两清
2楼-- · 2019-07-26 08:40

Have you imported all the models in __init__.py? If you've done that, there's effectively no difference in how it works.

查看更多
登录 后发表回答