Nice! And thanks for sharing! I like this idea too. Why did you include "if settings.DEBUG" by the way?
I still think injecting code explicitly has certain advantages:
* I believe AppConfig approach could be implemented in apps.py by the package author. If they chose not to write their package's configuration this way, I assume there is a reason.
* The AppConfig approach is a bit of a black box to most app users. I wanted the result of the "indject" operation to mirror the package's installation/quickstart docs almost verbatim.
* The injected code is just a starting point. I expect the developer will want to lock the injected code and make modifications that suit their needs.
* My package doesn't just address settings. It also has the ability to handle introspection at the app and model level of a given project. For example, in the latest version of the djangorestframework installer, I inject a HyperlinkedModelSerializer corresponding to every model of every app in a given project. I can't imagine how that could be implemented with the AppConfig approach.
* I did not want to create another prod dependency. "indjections" is only used during development to create boilerplate code.
If I didn't understand something about your suggestion, please do let me know.
Thanks!