<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chango.git/tests/invalid_models, branch devmain</title>
<subtitle>django
</subtitle>
<id>http://cgit.adnoto.dev/chango.git/atom?h=devmain</id>
<link rel='self' href='http://cgit.adnoto.dev/chango.git/atom?h=devmain'/>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/'/>
<updated>2013-12-22T10:39:17Z</updated>
<entry>
<title>Deprecated load_app().</title>
<updated>2013-12-22T10:39:17Z</updated>
<author>
<name>Aymeric Augustin</name>
<email>aymeric.augustin@m4x.org</email>
</author>
<published>2013-12-18T16:56:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=f25fa9d8590c7759c1ec7ffecf1d67be81237674'/>
<id>urn:sha1:f25fa9d8590c7759c1ec7ffecf1d67be81237674</id>
<content type='text'>
Adjusted several tests that used it to add apps to the app cache and
then attempted to remove them by manipulating attributes directly.

Also renamed invalid_models to invalid_models_tests to avoid clashing
application labels between the outer and the inner invalid_models
applications.
</content>
</entry>
<entry>
<title>Refactored registration of models.</title>
<updated>2013-12-22T10:39:17Z</updated>
<author>
<name>Aymeric Augustin</name>
<email>aymeric.augustin@m4x.org</email>
</author>
<published>2013-12-18T10:19:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=742ed9878e7edbb7a11667c489c719c4d9ab82de'/>
<id>urn:sha1:742ed9878e7edbb7a11667c489c719c4d9ab82de</id>
<content type='text'>
Got rid of AppConfig._stub. As a side effect, app_cache.app_configs now
only contains entries for applications that are in INSTALLED_APPS, which
is a good thing and will allow dramatic simplifications (which I will
perform in the next commit). That required adjusting all methods that
iterate on app_configs without checking the "installed" flag, hence the
large changes in get_model[s].

Introduced AppCache.all_models to store models:
- while the app cache is being populated and a suitable app config
  object to register models isn't available yet;
- for applications that aren't in INSTALLED_APPS since they don't have
  an app config any longer.

Replaced get_model(seed_cache=False) by registered_model() which can be
kept simple and safe to call at any time, and removed the seed_cache
argument to get_model[s]. There's no replacement for that private API.

Allowed non-master app caches to go through populate() as it is now
safe to do so. They were introduced in 1.7 so backwards compatibility
isn't a concern as long as the migrations framework keeps working.
</content>
</entry>
<entry>
<title>Removed superfluous models.py files.</title>
<updated>2013-12-17T10:16:48Z</updated>
<author>
<name>Aymeric Augustin</name>
<email>aymeric.augustin@m4x.org</email>
</author>
<published>2013-12-17T09:27:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=6e895f9e069f73982751cd2d4aa5aa693136a274'/>
<id>urn:sha1:6e895f9e069f73982751cd2d4aa5aa693136a274</id>
<content type='text'>
Added comments in the three empty models.py files that are still needed.

Adjusted the test runner to add applications corresponding to test
labels to INSTALLED_APPS even when they don't have a models module.
</content>
</entry>
<entry>
<title>Moved the new app cache inside core.</title>
<updated>2013-12-17T09:17:46Z</updated>
<author>
<name>Aymeric Augustin</name>
<email>aymeric.augustin@m4x.org</email>
</author>
<published>2013-12-16T10:52:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2'/>
<id>urn:sha1:4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Moved list of models inside AppConfig instances.</title>
<updated>2013-12-17T09:17:44Z</updated>
<author>
<name>Aymeric Augustin</name>
<email>aymeric.augustin@m4x.org</email>
</author>
<published>2013-12-12T20:34:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=b55282b98bf7883490fcc586d501e1b36c7a1c9c'/>
<id>urn:sha1:b55282b98bf7883490fcc586d501e1b36c7a1c9c</id>
<content type='text'>
This commit is a refactoring with no change of functionality, according
to the following invariants:

- An app_label that was in app_configs and app_models stays in
  app_config and has its 'installed' attribute set to True.

- An app_label that was in app_models but not in app_configs is added to
  app_configs and has its 'installed' attribute set to True.

As a consequence, all the code that iterated on app_configs is modified
to check for the 'installed' attribute. Code that iterated on app_models
is rewritten in terms of app_configs.

Many tests that stored and restored the state of the app cache were
updated.

In the long term, we should reconsider the usefulness of allowing
importing models from non-installed applications. This doesn't sound
particularly useful, can be a trap in some circumstances, and causes
significant complexity in sensitive areas of Django.
</content>
</entry>
<entry>
<title>Removed module-level functions for the app cache.</title>
<updated>2013-12-17T09:17:44Z</updated>
<author>
<name>Aymeric Augustin</name>
<email>aymeric.augustin@m4x.org</email>
</author>
<published>2013-12-11T22:31:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=8662654d6d50e4d89f771a757ae5fc83c6b74db0'/>
<id>urn:sha1:8662654d6d50e4d89f771a757ae5fc83c6b74db0</id>
<content type='text'>
Since the original ones in django.db.models.loading were kept only for
backwards compatibility, there's no need to recreate them. However, many
internals of Django still relied on them.

They were also imported in django.db.models. They never appear in the
documentation, except a quick mention of get_models and get_app in the
1.2 release notes to document an edge case in GIS. I don't think that
makes them a public API.

This commit doesn't change the overall amount of global state but
clarifies that it's tied to the app_cache object instead of hiding it
behind half a dozen functions.
</content>
</entry>
<entry>
<title>Removed BaseAppCache.app_store.</title>
<updated>2013-12-17T09:17:44Z</updated>
<author>
<name>Aymeric Augustin</name>
<email>aymeric.augustin@m4x.org</email>
</author>
<published>2013-12-11T21:19:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=9217b89da3295116a098ae2a071a3c4a64a0a5d0'/>
<id>urn:sha1:9217b89da3295116a098ae2a071a3c4a64a0a5d0</id>
<content type='text'>
It was only storing redundant information. This is part of the effort to
allow applications without a models module.
</content>
</entry>
<entry>
<title>Moved django.db.models.loading to django.apps.cache.</title>
<updated>2013-12-17T09:17:43Z</updated>
<author>
<name>Aymeric Augustin</name>
<email>aymeric.augustin@m4x.org</email>
</author>
<published>2013-12-11T20:44:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=860c2c8bc5c77194c41464655851379bf512a052'/>
<id>urn:sha1:860c2c8bc5c77194c41464655851379bf512a052</id>
<content type='text'>
This commit doesn't contain any code changes; it's purely a refactoring.
</content>
</entry>
<entry>
<title>Fixed all E261 warnings</title>
<updated>2013-11-02T22:20:39Z</updated>
<author>
<name>coagulant</name>
<email>baryshev@gmail.com</email>
</author>
<published>2013-11-02T21:02:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=3bc0d46a840f17dce561daca8a6b8690b2cf5d0a'/>
<id>urn:sha1:3bc0d46a840f17dce561daca8a6b8690b2cf5d0a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed #8918 -- Made FileField.upload_to optional.</title>
<updated>2013-10-11T12:07:25Z</updated>
<author>
<name>Tim Graham</name>
<email>timograham@gmail.com</email>
</author>
<published>2013-10-11T12:07:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.adnoto.dev/chango.git/commit/?id=945e033a6964c8c83c1c5ce5f188baf41a7a7701'/>
<id>urn:sha1:945e033a6964c8c83c1c5ce5f188baf41a7a7701</id>
<content type='text'>
Thanks leahculver for the suggestion and dc and vajrasky for work
on the patch.
</content>
</entry>
</feed>
