Aymeric,

Your work is amazing and has improved Django so much. Your work on timezone
support, the transaction overhaul and now this app changes makes my and a
lot of other peoples experience with Django so much better. Thank you!

2013/12/30 Aymeric Augustin <aymeric.augus...@polytechnique.org>

> ## Solution 2.a — Require users to call django.setup() before they use the
> ORM. setup() would configure the settings and populate the app registry.
>

I think this approach is the only proper solution. We have hit multiple
bugs within the import mechanism in the ORM with models not finding related
models (#20143 for instance). To workaround this, we always explicitly call
get_models() in the web app servers, celery workers and scripts before
anything else. Whenever we forget the get_models() call, things break in a
lot of interesting ways. :-)

Being explicit with an exception when trying to use the ORM in a
non-initialised state would be very very useful in situations like this,
and would have saved us many hours of confusion.

--
Andreas Pelme

-- 
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/CA%2B8bEMHrH10OLxQ-50UeRM08YDpAiRhXGq6LhTpOG7JsRp_M7w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to