Question

I am developing a django app as part of my project. I plan to release it later as a generic app that other people can use, as such I'm developing it in another directory with it's own git history, and then pip install ~/path/to/new/app to install and use it in my django project.

However I want to include South migrations in the app itself, as part of the history and as part of the code that gets installed. This is an example of someone distributing a django app and including the south migrations https://github.com/bmentges/django-cart

What's the easiest way to do this? How can I add some south migrations to just an app folder?

Was it helpful?

Solution

If you use pip install -e path/to/app, then pip will not copy the app, but instead refer to the directory you are developing from.

Then, the "project" that you use as you work on the app should contain south as an app. If you use south manage.py commands to create migrations, they will be put in the appropriate app's migrations directory.

OTHER TIPS

As long as there is an "migrations" folder inside your app folder (default south), it should work flawless without any other configurations.. Lots of apps are built this way. Good luck.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top