Django: How to get South to create tables for thir

2019-02-19 08:49发布

I am trying to use django-image-cropper (Link) in my project. I added it to INSTALL_APPS in settings.py and got resolved successfully. The app needs a handful of database tables to work with, so I gotta get them created. Since I have been using South, I need to create the tables with South, instead of using syncdb. My question is how do I run "./manage.py schemamigration" while cropper does not reside in my project directory but the python's "dist-apps" directory.

1条回答
迷人小祖宗
2楼-- · 2019-02-19 09:13

Just run:

python manage.py schemamigration django-image-cropper --initial

and away you go.

Replace django-image-cropper with whatever the actual application is called (as defined in INSTALLED_APPS).

You then simply just use the standard migrate command to add the tables to the database.

查看更多
登录 后发表回答