django-compressor / django-appconf

An app to handle configuration defaults of packaged Django apps gracefully
https://django-appconf.readthedocs.io
BSD 3-Clause "New" or "Revised" License
350 stars 47 forks source link

Why not just using settings.py ? #74

Closed lapinvert closed 3 years ago

lapinvert commented 4 years ago

I am sorry for this simple question. I was trying to figure out the use case for django-appconf, and basically for now I don't see it doing something that is already done by declaring your own custom settings in settings.py and re-use it everywhere.

Could somebody please explain to me what problem it solves that settings.py doesn't?

ghost commented 4 years ago

When you develop reusable apps, it is not ideal to put all your configurations into settings.py for two reasons:

  1. The module belongs to the whole project, which may contains other configurations that belong to other apps.
  2. Even if your project is built solely for a single app, you can't distribute settings.py without forcing users to tinkering and modifying the existing settings.py module in their own project, which is not an elegant solution.

According to the documentation, using AppConfig would solve the problem. I'm not going to speak for the django-appconf since I'm not the developer and I just discovered this app a couple hours ago.