HI Marc,

On Sun, Jan 19, 2014 at 5:52 PM, Marc Tamlyn <marc.tam...@gmail.com> wrote:

> All of your proposed solutions require trying to import an apps.py module
> which may not exist. I know Aymeric was very much against this, especially
> as python imports have potential side effects, and we don't know what
> people might have in a apps module already.
>
> Anyways, configuration over convention and explicit better than implicit
> etc.
>
> It does mean that we can't put any required logic into AppConfig, but for
> example admin.autodiscover is fine as existing projects already call it in
> their urls.py (or wherever they moved it to), so there is no concern here,
> especially if we update the project template.
>
> The only other obvious contrib thing which would be nice to move is signal
> registration, but this isn't that necessary.
>
> The hope is that people will migrate towards using AppConfig in their
> settings, and then we can reconsider. Third party apps who wish to do a lot
> of logic there may wish to require it.
>
> Personally I'm torn, as I can see the benefits of a convention. But
> equally I don't think there's a huge amount of point making a big effort to
> rewrite Django's import handling in order to add more magic back in.
>
> See my comments to Aymeric. I'm not blind to the concerns you've raised
here - there certainly valid ones, and I appreciate (and sympathise with)
the intent. I'm just stuck in a bind where there's a new feature that will
fix my problem much better than the existing alternatives -- I just can't
use it.

I'm completely open to other approaches that don't require speculative
imports. Aymeric's suggestion of an attribute in the root module sounds
like a good option to me -- it only requires an attribute access in a
module that you're already importing, and you use that string to provide
the value that we'd like to tell the end user to put in their
INSTALLED_APPS. However, it sounds like Aymeric wasn't as keen on this
approach.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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 http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAJxq84_MPKw_zywaeaQ-4aXDYaTVJxfRtm%2B-2GEXrrn7D7VwJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to