summaryrefslogtreecommitdiff
path: root/tests/proxy_model_inheritance
AgeCommit message (Collapse)Author
2022-02-22Removed redundant QuerySet.all() calls in docs and tests.Nick Pope
Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2018-08-16Removed obsolete TODO in proxy_model_inheritance test.KUAN Hsuan-Tso
2017-01-20Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.Tim Graham
These functions do nothing on Python 3.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2015-10-12Fixed #23076, #25505 -- Fixed deletion of intermediate proxy models.Simon Charette
Thanks to James Murty for his work on an alternate patch.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-18Removed support for syncing apps without migrations per deprecation timeline.Tim Graham
Kept support for creating models without migrations when running tests (especially for Django's test suite).
2014-10-21Removed unneeded override_system_checksClaude Paroz
Refs #23685.
2014-01-25Moved sys.path-extending decorator to django.test.utils and used throughout ↵Carl Meyer
test suite. Thanks Aymeric for the suggestion.
2014-01-20Fixed #16905 -- Added extensible checks (nee validation) frameworkRussell Keith-Magee
This is the result of Christopher Medrela's 2013 Summer of Code project. Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian Apolloner, and Alex Gaynor for review notes along the way. Also: Fixes #8579, fixes #3055, fixes #19844.
2013-12-31Made it possible to change an application's label in its configuration.Aymeric Augustin
Fixed #21683.
2013-12-23Dropped AppCache._empty, _with_app and _without_app.Aymeric Augustin
It's now easier to achieve the same effect with modify_settings or override_settings.
2013-12-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-22Improved set_available_apps() in several ways.Aymeric Augustin
- Tested consistency the current app_configs instead of INSTALLED_APPS. - Considered applications added with _with_app as available. - Added docstrings.
2013-12-22Expurged INSTALLED_APPS from code and tests.Aymeric Augustin
Except the app cache code and a few specific tests, of course.
2013-12-22Deprecated load_app().Aymeric Augustin
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.
2013-12-22Refactored registration of models.Aymeric Augustin
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.
2013-12-17Moved the new app cache inside core.Aymeric Augustin
2013-12-17Moved list of models inside AppConfig instances.Aymeric Augustin
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.
2013-12-17Stored AppConfig objects instead of models modules in the app cache.Aymeric Augustin
This is a step towards allowing applications without a models module.
2013-12-17Removed module-level functions for the app cache.Aymeric Augustin
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.
2013-12-17Removed BaseAppCache.app_store.Aymeric Augustin
It was only storing redundant information. This is part of the effort to allow applications without a models module.
2013-12-17Moved django.db.models.loading to django.apps.cache.Aymeric Augustin
This commit doesn't contain any code changes; it's purely a refactoring.
2013-11-02Fixing E302 ErrorsJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-09-03Updated syncdb -> migrate in tests.Tim Graham
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-06-10Defined available_apps in relevant tests.Aymeric Augustin
Fixed #20483.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner