2013/8/12 Stefano Crosta <stefano.cro...@gmail.com> There is one situation where the order of INSTALLED_APPS really matters - > which is template override. >
There are at least two other similar cases: translations and static files. > Though not officially documented (?) I've found references in the mailing > list to the fact that APPS coming first in the INSTALLED_APPS will have > priority - their templates will be loaded effectivily overriding/shadowing > lower priority app ones. > Yes, we should standardize and document that. On a related note, some lookups depend on the INSTALLED_APPS settings and others depend on the list of applications registered in the AppCache. The latter may be a superset of the former. We should give some thought to this problem before committing to a given discovery behavior. Eventually, Django should probably raise an error when the AppCache loads a model from an application than isn't in INSTALLED_APPS. But there may be uses cases for this eg. dynamically generated models. Enough said, I'm stopping this digression here :) > Now, if this is "officially" confirmed in my opinion it would require: > > 1. use a list, not a set, as a default for INSTALLED_APPS. In Python sets > are unordered<http://docs.python.org/2/tutorial/datastructures.html#sets> > as > you surely now better than me > > The default generated settings file defines INSTALLED_APPS a tuple, not a set. We could change it to a list, however, that will introduce inconsistencies with other settings where the default value is a tuple and can't be changed without introducing backwards incompatibilities. > > 1. be more explicit in the documentation > > Yes! -- Aymeric. -- 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. For more options, visit https://groups.google.com/groups/opt_out.