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.
Asked
Active
Viewed 884 times
2
-
A similar question was asked by some other user a while back ([Here](http://stackoverflow.com/questions/3802906/django-contrib-comments-not-synced-after-adding-it-to-installed-apps)). But it has not been answered. – tamakisquare May 16 '11 at 17:49
1 Answers
3
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.

Cromulent
- 3,788
- 4
- 31
- 41
-
Thanks Simon. Exactly what I need. Just a quick side question. Is it a better practice to use SOUTH_MIGRATION_MODULES ([Link](http://south.aeracode.org/docs/settings.html#setting-south-migration-modules)). I have chosen to use it but just curious what your would think. Cheers. – tamakisquare May 16 '11 at 18:45
-
1@ahmoo It would certainly clean things up a bit for third party apps. For apps that you have written yourself for your own Django projects I tend to think they should be kept in the app itself so that it makes it easier to use the app with other projects in the future if you so choose, but that comes down to personal preference. – Cromulent May 16 '11 at 19:37
-