On Feb 27, 1:53 pm, stuff4ash <ashwo...@gmail.com> wrote:
> b) easy way to register, override, configurations for apps.
> a settings.py in an app folder that is "magically" loaded the same way
> other things are would suffice, but there has to be a way to:

I've never understood the desire for more magical behavior here. My
apps have a settings.py that imports django.conf.settings and provides
any necessary defaults for unset settings; the rest of my app imports
from there. Works great, easy to look and see what settings my app
consumes and what defaults they have. I don't see what advantages a
more complex system would provide. Example here:
http://bitbucket.org/carljm/django-adminfiles/src/tip/adminfiles/settings.py

> -override and prioritize settings, as sometimes you have to override
> things.

I'm not sure what this means. In my setup, project-level settings
always override app-level defaults; which is as it should be, I think.

> -mark defaults, get defaults from other apps, and mark some settings
> as obligatory.

I use getattr(settings, 'SOME_SETTING', 'default') for defaults. If I
want to get a default from some other app, I can import it and do so.
If a setting is obligatory, I raise an import-time
ImproperlyConfiguredError.

> i have a django mingus blog now. when i upgrade mingus, and the many
> many many apps it has, how do i know without reading all the docs, if
> there is a new setting that i should set or change?

If it's a required setting, you should get an error when you try to
run the project without it (I sure hope you're testing the upgrade
somewhere other than your production server...). If it's optional, why
should you be bothered with it unless you already know you want it? If
you really want to know all the available settings, that's what docs
are for.

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to