Hi Americ,

thanks for answering THAT elaborative (I first thought that it#s a
typical newbie question).

>
> When you say this is not possible, I assume you are referring to my
> work on app-loading in Django 1.7. Here's what comes to mind.
Yes.
> [...]
>
> Finally, this would mean that pluggable apps cannot assume that
> settings are immutable anymore. It would become a best practice for
> every pluggable app to assume that any setting can change and to deal
> with the consequences. I'm not enthusiastic at the prospect of adding
> this overhead to the ecosystem.

Yes and no. I wrapped my head around the chicken-egg-problem for many
weeks now.

I think that immutable settings are a good thing at last, and I would
never suppose to change that. settings.py is thought to be run *once*,
at server start. Or at least at reload. But then, apps are reloaded too.

What I think of is something else, maybe I didn't explain it good enough:

Apps should have the possibility to add DEFAULT settings to the Django
global settings. As already mentioned in my plugin system question, I
don't see a problem with app/settings loading order. The loading order
is done in INSTALLED_APPS, immutable, and good as it is.

App A could e.g. have a WEBPACK_LOADER variable that is imported into
the global scope, and the settings.py then CAN override it.

It's that Django's settings.py SHOULD remain the master of settings.
It's more about having defaults that could be supposed by modules.


The only way *I* can think of that is, like Adam Johnson just said:
after INSTALLED_APPS = [...], add some kind of

    from django.conf import load_app_settings
    for key, value in load_app_settings(INSTALLED_APPS):
        globals()[key] = value

(Sorry for this maybe shitty code hack)

Which then loads everything from installed apps - and later lines would
override these "defaults"...?

I don't even know if this is possible.

Christian

-- 
Dr. Christian González
https://nerdocs.at

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/2a40ed7c-9115-1f63-3590-846697dd02e1%40nerdocs.at.
For more options, visit https://groups.google.com/d/optout.

Attachment: pEpkey.asc
Description: application/pgp-keys

Reply via email to