summaryrefslogtreecommitdiff
path: root/django/apps
AgeCommit message (Collapse)Author
2016-05-19Refs #26421 -- Refactored Apps.lazy_model_operation() for better checks and ↵Alex Hill
tests
2016-04-29Fixed #26207 -- Replaced dynamic classes with non-data descriptors for ↵Anssi Kääriäinen
deferred instance loading.
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2015-09-17Refs #24215 -- Fixed Python 3.5 compatiblity for unhandled lazy ops error.Tim Graham
2015-09-02Fixed #25246 -- Guarded against duplicate paths in AppConfig.Caio Ariede
2015-08-27Fixed #24590 -- Cached calls to swappable_setting.Markus Holtermann
Moved the lookup in Field.swappable_setting to Apps, and added an lru_cache to cache the results. Refs #24743 Thanks Marten Kenbeek for the initial work on the patch. Thanks Aymeric Augustin and Tim Graham for the review.
2015-06-30Refs #23621 -- Fixed warning message when reloading models.Marten Kenbeek
2015-06-27Sorted imports in __init__.py files.Tim Graham
2015-06-18Removed support for Python 3.3.Tim Graham
2015-05-22Fixed #24776 -- Improved apps.get_app_config() error message on ↵Peter Inglesby
fully-qualified package names.
2015-03-25Fixed #24215 -- Refactored lazy model operationsAlex Hill
This adds a new method, Apps.lazy_model_operation(), and a helper function, lazy_related_operation(), which together supersede add_lazy_relation() and make lazy model operations the responsibility of the App registry. This system no longer uses the class_prepared signal.
2015-03-08Fixed #24397 -- Sped up rendering multiple model states.Marten Kenbeek
Set apps.ready to False when rendering multiple models. This prevents that the cache on Model._meta is expired on all models after each time a single model is rendered. Prevented that Apps.clear_cache() refills the cache on Apps.get_models(), so that the wrong value cannot be cached when cloning a StateApps.
2015-02-08Added check_apps_ready() to Apps.get_containing_app_config()Tim Graham
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-18Removed deprecated Apps methods per deprecation timeline.Tim Graham
2015-01-18Removed an obsolete comment in django/apps/config.pyTim Graham
2015-01-06Fixed #12663 -- Formalized the Model._meta API for retrieving fields.Daniel Pyrathon
Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
2014-10-23Improved warning message when reloading models. Refs #23621.Loic Bistuer
Thanks dfunckt and Tim Graham.
2014-10-23Fixed #23621 -- Warn for duplicate models when a module is reloaded.Loic Bistuer
Previously a RuntimeError was raised every time two models clashed in the app registry. This prevented reloading a module in a REPL; while it's not recommended to do so, we decided not to forbid this use-case by turning the error into a warning. Thanks @dfunckt and Sergey Pashinin for the initial patches.
2014-10-04Revert "Improved AppRegistryNotReady message."Tim Graham
This reverts commit 6fa9fa91a5fcb228b3c385b35a2018b3821a447a. Aymeric: "I chose not to talk about django.setup() here on purpose. This will hardly always be the correct solution."
2014-10-04Improved AppRegistryNotReady message.Collin Anderson
2014-09-08Fixed #22920 -- Avoid masking some exceptions.Aymeric Augustin
If loading an application trigger an ImportError, the details of that error were lost in some cases. Thanks Ben Davis for the report.
2014-07-12Checked more precisely whether the app registry is ready.Aymeric Augustin
Accounted for the three stages of population: app configs, models, ready() methods of app configs.
2014-06-23Fixed #8033 -- Explained app registry error during translation setupClaude Paroz
Thanks Tim Graham and Aymeric Augustin for the review.
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2014-02-15Fixed two typos.Rodolfo Carvalho
2014-01-27Fixed #21874 -- Require Django applications to have a filesystem path.Carl Meyer
Wherever possible this filesystem path is derived automatically from the app module's ``__path__`` and ``__file__`` attributes (this avoids any backwards-compatibility problems). AppConfig allows specifying an app's filesystem location explicitly, which overrides all autodetection based on ``__path__`` and ``__file__``. This permits Django to support any type of module as an app (namespace packages, fake modules, modules loaded by other hypothetical non-filesystem module loaders), as long as the app is configured with an explicit filesystem path. Thanks Aymeric for review and discussion.
2014-01-26Fixed some missing/extraneous new line warnings.Simon Charette
2014-01-26Fixed #21877 -- Renamed django.apps.base to config.Aymeric Augustin
2014-01-26Fixed #21702 -- get_model('app_label.ModelName').Aymeric Augustin
Also added tests for get_model.
2014-01-25Fixed #17304 -- Allow single-path and configured-path namespace packages as ↵Carl Meyer
apps. Also document the conditions under which a namespace package may or may not be a Django app, and raise a clearer error message in those cases where it may not be. Thanks Aymeric for review and consultation.
2014-01-25Fixed #21829 -- Added default AppConfigs.Aymeric Augustin
Thanks Russell for the report, Marc for the initial patch, Carl for the final review, and everyone who contributed to the design discussion.
2014-01-24Fixed #21871 -- Fixed Apps.is_installed() for apps with custom label.Carl Meyer
Thanks Aymeric for design discussion.
2014-01-15Fixed typo in comment.Martin Matusiak
2014-01-12Used a regular lock for app registry population.Aymeric Augustin
Since the app registry is always populated before the first request is processed, the situation described in #18251 for the old app cache cannot happen any more. Refs #18251, #21628.
2014-01-06Fixed #21718 -- Renamed has_app to is_installed.Aymeric Augustin
2014-01-05Fixed #21711 -- Enforced unicity of model names.Aymeric Augustin
2013-12-31Renamed AppConfig.setup to ready.Aymeric Augustin
Thanks Jannis and Marc for the feedback. Fixed #21717.
2013-12-31Enforced unicity of app labels.Aymeric Augustin
Fixed #21679.
2013-12-31Made it possible to change an application's label in its configuration.Aymeric Augustin
Fixed #21683.
2013-12-31Checked unicity of app config names when populating the app registry.Aymeric Augustin
This check will miss duplicates until the check for duplicate labels is added. Refs #21679.
2013-12-31Fleshed out release notes for app loading.Aymeric Augustin
Fixed #21715.
2013-12-30Removed the only_with_models_module argument of get_model[s].Aymeric Augustin
Now that the refactorings are complete, it isn't particularly useful any more, nor very well named. Let's keep the API as simple as possible. Fixed #21689.
2013-12-30Merged Apps.populate_apps() and populate_models().Aymeric Augustin
After the recent series of refactorings, there's no reason to keep two distinct methods. Refs #21681.
2013-12-30Removed postponing in Apps.populate_models.Aymeric Augustin
To the best of my understanding, since populate_models() is now called as soon as Django starts, it cannot be called while a models module is being imported, and that removes the need for postponing. (If hell breaks loose we'll revert this commit.) Refs #21681.
2013-12-30Stopped populating the app registry as a side effect.Aymeric Augustin
Since it triggers imports, it shouldn't be done lightly. This commit adds a public API for doing it explicitly, django.setup(), and does it automatically when using manage.py and wsgi.py.
2013-12-30Populated Apps instances immediately by default.Aymeric Augustin
2013-12-30Added AppConfig.setup() to run setup code.Aymeric Augustin
2013-12-30Avoided leaking state on exceptions in populate_models().Aymeric Augustin
2013-12-29Deprecated the app argument of apps.get_models.Aymeric Augustin
Use app_config.get_models() instead.