I was thinking of packing one of my django projects in a reusable package.
How to pack is given pretty well at https://docs.djangoproject.com/en/dev/intro/reusable-apps/ and, of course, on many other sites.
All that is offered is to include in the application application INSTALLED_APPS the list of available files in the django project settings.py project.
Cool, but that I have several (third-party) dependencies with the project. Should I list all these packages in the INSTALLED_APPS list in the documentation?
I feel that there should be a better way that you simply enable one application, and all its dependencies are automatically added to the INSTALLED_APPS application.
Now let me give an example of clarity: (you can read here)
- project A: django reuse application
- project B and C: are third-party django applications used in project A (e.g. django toolbar, reverse, etc.)
- Project D: this is your django project and you want to include my project A in your application.
Now:
- You can add 'A' to your INSTALLED_APPS
- But you also need to add "B" and "C" as they depend on "A"
My question is: Is there a way in which adding "A" to your project includes "B" and "C" automatically?
As the saying goes, I know how to add custom settings and provide reasonable defaults. Itβs just that I canβt think about the problem of dependent applications (maybe because it will be the next day)
source share