I'm developing a new Django site. It uses some existing Django apps and I'm building some of my own.
Current folder structure (truncated):
projects/
- mysite/
- .git/
- conf/
- mysite/
- __init__.py
- settings.py
- myapp/
- __init__.py
- admin.py
- models.py
- manage.py
I'd like to make my site and apps available as separate Git repositories. In other words, someone may want to clone/contribute to the whole site, or they may want to clone/contribute to just an app.
According to the Packaging your app section of Advanced tutorial: How to write reusable apps the following folder structure is required for separate site and app folders:
projects/
- mysite/
- .git/
- conf/
- mysite/
- __init__.py
- settings.py
- manage.py
- django-myapp
- .git/
- myapp/
- __init__.py
- admin.py
- models.py
- setup.py
But in Using your own package the same tutorial suggests that the only way to make and use local modifications is to:
- Modify the app folder
- Run
python setup.py sdist
to build the app - Run
pip install --user /path/to/django-myapp.tar.gz
to install it - Run the Django site
How can I organise these folders so that I can easily modify either site or app code, and immediately run the site locally? In other words, avoid building and importing a local tarball each time.