问题
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:
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.
来源:https://stackoverflow.com/questions/6021160/django-how-to-get-south-to-create-tables-for-third-party-apps-added-to-install