summaryrefslogtreecommitdiff
path: root/tests/proxy_model_inheritance
Commit message (Collapse)AuthorAgeFilesLines
* Removed redundant QuerySet.all() calls in docs and tests.Nick Pope2022-02-221-2/+2
| | | | Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager.
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-072-5/+7
|
* Removed obsolete TODO in proxy_model_inheritance test.KUAN Hsuan-Tso2018-08-161-1/+0
|
* Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.Tim Graham2017-01-201-2/+1
| | | These functions do nothing on Python 3.
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-181-2/+0
|
* Fixed #23076, #25505 -- Fixed deletion of intermediate proxy models.Simon Charette2015-10-122-1/+14
| | | | Thanks to James Murty for his work on an alternate patch.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-2/+3
|
* Removed support for syncing apps without migrations per deprecation timeline.Tim Graham2015-01-181-1/+1
| | | | | Kept support for creating models without migrations when running tests (especially for Django's test suite).
* Removed unneeded override_system_checksClaude Paroz2014-10-211-4/+1
| | | | Refs #23685.
* Moved sys.path-extending decorator to django.test.utils and used throughout ↵Carl Meyer2014-01-251-15/+8
| | | | | | test suite. Thanks Aymeric for the suggestion.
* Fixed #16905 -- Added extensible checks (nee validation) frameworkRussell Keith-Magee2014-01-201-0/+4
| | | | | | | | | 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.
* Made it possible to change an application's label in its configuration.Aymeric Augustin2013-12-311-3/+3
| | | | Fixed #21683.
* Dropped AppCache._empty, _with_app and _without_app.Aymeric Augustin2013-12-231-2/+1
| | | | | It's now easier to achieve the same effect with modify_settings or override_settings.
* Moved apps back in the toplevel django namespace.Aymeric Augustin2013-12-221-1/+1
| | | | Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
* Improved set_available_apps() in several ways.Aymeric Augustin2013-12-221-4/+1
| | | | | | - Tested consistency the current app_configs instead of INSTALLED_APPS. - Considered applications added with _with_app as available. - Added docstrings.
* Expurged INSTALLED_APPS from code and tests.Aymeric Augustin2013-12-221-10/+8
| | | | Except the app cache code and a few specific tests, of course.
* Deprecated load_app().Aymeric Augustin2013-12-221-15/+6
| | | | | | | | | 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.
* Refactored registration of models.Aymeric Augustin2013-12-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | 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-2/+0
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Stored AppConfig objects instead of models modules in the app cache.Aymeric Augustin2013-12-171-2/+2
| | | | This is a step towards allowing applications without a models module.
* Removed module-level functions for the app cache.Aymeric Augustin2013-12-171-8/+8
| | | | | | | | | | | | | | | 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.
* Fixing E302 ErrorsJason Myers2013-11-021-0/+2
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Updated syncdb -> migrate in tests.Tim Graham2013-09-031-3/+3
|
* Removed most of absolute_import importsClaude Paroz2013-07-292-3/+1
| | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
* Defined available_apps in relevant tests.Aymeric Augustin2013-06-101-1/+7
| | | | Fixed #20483.
* Merged regressiontests and modeltests into the test root.Florian Apolloner2013-02-267-0/+88