Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/proxy_models
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #18012 -- Propagated reverse foreign keys from ↵Simon Charette2015-10-122-7/+12
| | | | | | proxy to concrete models. Thanks to Anssi for the review.
* Fixed #21127 -- Started deprecation toward requiring ↵Flavio Curella2015-07-281-5/+5
| | | | on_delete for ForeignKey/OneToOneField
* Fixed #21927 -- Made application and instance namespaces ↵Marten Kenbeek2015-06-081-2/+2
| | | | | | | | more distinct. Made URL application namespaces be set in the included URLconf and instance namespaces in the call to include(). Deprecated other ways to set application and instance namespaces.
* Updated tests to stop leaking models in shared AdminSite.Riccardo Magliocchetti2015-04-153-8/+10
| | | | | | This would break upcoming changes and AdminSite assumptions about having an app_config for each application that has registered models.
* Converted test fixtures to setUpTestData methodsJosh Smeaton2015-03-052-43/+14
|
* Fixed #24328 -- cleaned up Options._get_fields() ↵Anssi Kääriäinen2015-02-202-3/+13
| | | | implementation
* Replaced some more hardcoded admin URLsClaude Paroz2015-02-091-7/+9
|
* Sorted imports with isort; refs #23860.Tim Graham2015-02-064-10/+10
|
* Fixed #24149 -- Normalized tuple settings to lists.darkryder2015-02-031-1/+1
|
* Fixed #23620 -- Used more specific assertions in the ↵Berker Peksag2014-11-031-4/+4
| | | | Django test suite.
* Fixed #22690 -- Added a check for proxy models ↵Craig de Stigter2014-06-021-8/+20
| | | | | | containing fields. Removed the FieldError raised by ModelBase.__new__ in this case.
* Fixed #21977 -- Deprecated SimpleTestCase.urlsAnubhav Joshi2014-04-061-2/+2
|
* Fixed #22218 -- Deprecated django.conf.urls.patterns.Tim Graham2014-04-031-4/+4
| | | | Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
* Used Apps.clear_cache() in tests that alter the app ↵Aymeric Augustin2013-12-291-1/+1
| | | | registry.
* Renamed AppCache to Apps.Aymeric Augustin2013-12-241-5/+5
| | | | | | Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
* Replaced ad-hoc caching of get_models with lru_cache.Aymeric Augustin2013-12-241-1/+1
| | | | | Invalidate properly the cache whenever all_models or app_configs change. This fixes some isolation issues in the test suite.
* Imported override_settings from its new location.Aymeric Augustin2013-12-231-2/+1
|
* Moved apps back in the toplevel django namespace.Aymeric Augustin2013-12-221-1/+1
| | | | Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
* Refactored registration of models.Aymeric Augustin2013-12-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Moved the new app cache inside core.Aymeric Augustin2013-12-171-1/+1
|
* Moved list of models inside AppConfig instances.Aymeric Augustin2013-12-171-7/+6
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Removed module-level functions for the app cache.Aymeric Augustin2013-12-171-3/+3
| | | | | | | | | | | | | | | 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.
* Removed BaseAppCache.app_store.Aymeric Augustin2013-12-171-2/+0
| | | | | It was only storing redundant information. This is part of the effort to allow applications without a models module.
* Moved django.db.models.loading to django.apps.cache.Aymeric Augustin2013-12-171-1/+1
| | | | This commit doesn't contain any code changes; it's purely a refactoring.
* Fixed E124 pep8 warnings.Loic Bistuer2013-12-101-6/+12
|
* Fixing E302 ErrorsJason Myers2013-11-031-0/+26
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Fixed #21302 -- Fixed unused imports and import *.Tim Graham2013-11-021-2/+1
|
* Removed some direct settings manipulations in tests; ↵Bouke Haarsma2013-10-211-3/+1
| | | | refs #21230.
* Removed unused local variables in tests.Tim Graham2013-10-191-5/+5
|
* Fixed #17627 -- Renamed util.py files to utils.pyTim Graham2013-09-161-1/+1
| | | | | Thanks PaulM for the suggestion and Luke Granger-Brown and Wiktor Kołodziej for the initial patch.
* Fixed #20989 -- Removed useless explicit list ↵Simon Charette2013-08-301-1/+1
| | | | comprehensions.
* Fixed #20777 -- Admin proxy model deletion regressionAnssi Kääriäinen2013-08-195-2/+64
| | | | Added proxy_models tests by Harm Geerts <github@geertswei.nl>.
* Made Model.__eq__ consider proxy models equivalentAnssi Kääriäinen2013-08-191-0/+3
| | | | Fixed #11892, fixed #16458, fixed #14492.
* Removed most of absolute_import importsClaude Paroz2013-07-291-1/+1
| | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
* Stopped calling loaddata with commit=False.Aymeric Augustin2013-06-301-1/+1
| | | | | This was a stealth option only used by the tests, and it isn't useful any more since `atomic` provides nested transactions.
* Fixed #15363 -- Renamed and normalized to `get_queryset` ↵Loic Bistuer2013-03-081-4/+4
| | | | the methods that return a QuerySet.
* Merged regressiontests and modeltests into the test root.Florian Apolloner2013-02-265-0/+584