How to develop/include a Django custom reusable app in a new project? Are there some guidelines?
Question: following [tutorial on Django reusable
apps](https://docs.djangoproject.com/en/1.8/intro/reusable-apps/) things work
fine. But I have some questions on the process of developing and packaging a
Django app.

1 - In the tutorial, the app is developed first within a project, then copy-
paste'd out in another folder for packaging, and then included again in the
project vía pip. Is this the way for developing Django apps? For example, if I
have to include new features or fix bugs, Should I make changes in the project
and then copy-paste them to the package folder outside the project?

2 - Assuming that 1 is not the only way to develop an app, I started creating
a package folder for my app with this structure:

    
    
    django-myApp
    |--myApp
    |  |--models
    |     |--file1.py
    |     |--file2.py
    |--setup.py
    |--README.rst
    

After running `python3 setup.py sdist` and installing it with `pip3 install
--user myApp.tar.gz` I can successfully import my app from a new Django
project shell. But when I run python3 manage.py migrate, tables for models of
myApp are not created. I guess it is because there is not migration folder in
myApp package, and as far as I know, the only way to create migrations is
running `makemigrations` within a project. Or may I am missing something? Can
I generate initial migration module without having the app in a project?

3 - Finally, the question is: When developing an app, Should I have to start a
project, copy out the app folder for packaging, reincluding it vía installing,
and then continue developing in the package folder?

Thanks in advance for any comment or guidance.

P.D.: Sorry for my English, also comments about it are well-received

**EDIT 1:**

An example to highlight my doubt: After finish tutorial, App source code is
outside the project and suppose I need to change models. I can change them in
app folder, release a new version (e.g. 0.2) and install it. Now, How can I
generate migrations for these changes? Should I always have a test project?


Answer: Additionally, a good workflow during development is to link the reusable app
into your Django project. To easily achieve this `pip install` has the [`-e,
--editable`](https://pip.pypa.io/en/latest/reference/pip_install.html#install-
editable) option, which in turn derives from the `setuptools` [Development
mode](https://pythonhosted.org/setuptools/setuptools.html#development-mode).

**Reusable app:**

    
    
    django-myApp
    |--myApp
    |  |--models
    |     |--file1.py
    |     |--file2.py
    |--setup.py
    |--README.rst
    

**Django setup:**

    
    
    my-django-project
    |--my_django_project
    |  |--settings.py
    |  |--urls.py
    |  |--wsgi.py
    |  |--...
    |--manage.py
    

With your virtualenv activated you can now link your reusable app to the
project by running:

    
    
    (myvenv) $ pip install --editable /path/to/django-myApp
    

Now, every change that you make in `django-myApp` is automatically reflected
in `my-django-project` without the need to build/package the reusable app
first.

This becomes convenient in many use cases. E.g. imagine developing the app to
be compatible with `Python 2.x` and `Python 3.x`. With linking, you can
install the app into two (or more) different Django setups and run your tests.

