We're developing a great number of utility applications, each of which
introduce their own configurable settings specific to the individual
application. As a result, settings.py gets *cluttered* with tons of
options and documentation and becomes incredibly difficult to read. So I
patched django/conf/__init__.py to try to decentralize
application-specific settings.

The resulting patch, submitted to Trac as #5049, does the following:

* Applications can provide a settings.py file in their application
directory. This file will be parsed exactly as settings.py would be,
only observing ALL_CAPS attributes. These attributes will be made
available at django.conf.settings.*appname*.*attribute*

* Since it is important that each project be able to override settings,
these settings can be overridden per-project by creating a subfolder in
the project called app_settings and placing a file *appname*.py in it
with the local overrides.

So if proj.app.settings says that FOO='bar' and BLAH='blech', and
proj.app_settings.app says that FOO='baz', django.conf.settings.app.FOO
is 'baz' and django.conf.settings.app.BLAH is 'blech'.

I'd welcome any feedback on this patch. Thanks!

-jag (j00bar on #django)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to