Search code examples
djangogitrepositorydjango-apps

Same Django project different GIT repositories


Which is the best way to have two different repositories on the same Django project?

I started developing a project months ago and I have the whole folder in the repository. I want to reuse some apps in the project and I would like to create a different repository for them since they will be spin-offs project. But I want to keep it updated.

Which is the best workflow, methodology, etc... to achieve this? Or is it a bad approuch?

Thanks!

Xavi


Solution

  • You can wrap each app as a python package, which has its own GIT repo. And save all your packages in some private (or public?) python packages repository (like Gemfury).

    Then, in your projects, just use the app as you install django itself.. pip install myapp

    This way the apps a reusable and decoupled from any project.

    (This works very well for myself.. perhaps there is a better way)