The problem of versioning a large project.
Hi guys, I really got stuck with the challenge, with the design of versioning for a large project.
Now we have organized versioning, where our project is divided into separate GIT repositories which are created for each application.
The new necessity point is to split some of them for front-end and back-and developers.
The task looks like bad practice, where we have to create a repository within another one.
Or redesign the file structures of the application itself, to meet this requirement.
If someone has a similar challenge or practice and helps me make the right decision, I will be very grateful.
We would like to separate the repository specifically for front-end guest groups.
With access to parts like: views_groups, templates, dummy_data, forms_group, helpers_group, static_blob and media_blob as an example.
Now our application tier and the file structure of the project looks something like in the picture below.
.
├── apps
. ├── .DS_Store
├── app_alpha
│ ├── .git <<<<<<<<<<<<<<<<<<<<<<<<< git alpha
│ └── alpha
│ ├── __init__.py
│ ├── admin_alpha.py
│ ├── api_connectors
│ ├── apps_alpha.py
│ ├── conf_parser_alpha.py
│ ├── controllers_groups
│ ├── dummy_data_alpha
│ ├── db_router_alpha.py
│ ├── forms_group
│ ├── helpers_group
│ ├── media_blob_alpha
│ ├── metadata
│ ├── migrations
│ ├── models_groups
│ ├── signals_alpha.py
│ ├── static_blob__alpha
│ ├── templates
│ ├── urls_alpha.py
│ └── views_groups
├── app_beta
│ ├── .git <<<<<<<<<<<<<<<<<<<<<<<<< git beta
│ └── beta
│ ├── __init__.py
│ …….
├── app_gamma
│ ├── .git <<<<<<<<<<<<<<<<<<<<<<<<< git gamma
│ └── gamma
│ ├── __init__.py
│ …….
├── app_delta
│ ├── .git <<<<<<<<<<<<<<<<<<<<<<<<< git delta
│ └── delta
│ ├── __init__.py
….. …….
I think that's not possible with Django without some quirks. You
need to add apps to your settings.py anyway, so, if these apps are
not present in your repo, it's not working, as there are imports
that lead into nowhere.
Django provides really good support for creating reusable "apps"
that can be used in different Django applications, if correctly
done. But you have to include them hard-coded, it's not possible
to create more apps that "plug" into ONE Django application and
extend its functionality dynamically. And it seems you need that
in your case.
So you need either a mono repo, or git submodules that need to be fetched. I solved a similar problem by building a library that adds such a plugin support to Django: https://gdaps.readthedocs.io
You can use a Django main application, and install app "plugins" that add funcationality to your app without touching the settings.py. Just install the Django/GDAPS app per pip, restart the Django server / manage migrate, and it should work.
It's not perfect ans still lacks some features, but should solve your problem.
Yours, Christian
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/PH0PR15MB5640DD26A7890FC754671486FC929%40PH0PR15MB5640.namprd15.prod.outlook.com.
-- Dr. Christian González https://nerdocs.at