【发布时间】:2013-07-18 01:09:21
【问题描述】:
我想执行annotate/aggregate内部迁移,因为我的数据需要在架构修改之前准备好。 South 不允许从 django.db.models 导入聚合器 - 它在迁移应用程序阶段引发错误。那么在南方有什么办法可以做到这一点吗?
【问题讨论】:
-
annotate/aggregate是什么意思? -
您始终可以编写如下所述的自定义命令:docs.djangoproject.com/en/dev/howto/custom-management-commands) 并使用
python manage.py custom_aggregate_command运行它。另外,看看这个:south.readthedocs.org/en/latest/tutorial/part3.html
标签: python django django-south database-migration