Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/apps
Commit message (Collapse)AuthorAgeFilesLines
* Refs #24215 -- Fixed Python 3.5 compatiblity for ↵Tim Graham2015-09-171-0/+4
| | | | unhandled lazy ops error.
* Fixed #25246 -- Guarded against duplicate paths in ↵Caio Ariede2015-09-021-0/+4
| | | | AppConfig.
* Fixed #24590 -- Cached calls to swappable_setting.Markus Holtermann2015-08-271-0/+22
| | | | | | | | | | 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.
* Refs #23621 -- Fixed warning message when reloading models.Marten Kenbeek2015-06-301-1/+1
|
* Sorted imports in __init__.py files.Tim Graham2015-06-271-2/+4
|
* Removed support for Python 3.3.Tim Graham2015-06-181-1/+1
|
* Fixed #24776 -- Improved apps.get_app_config() error ↵Peter Inglesby2015-05-221-1/+6
| | | | message on fully-qualified package names.
* Fixed #24215 -- Refactored lazy model operationsAlex Hill2015-03-251-2/+43
| | | | | | | 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.
* Fixed #24397 -- Sped up rendering multiple model states.Marten Kenbeek2015-03-081-2/+5
| | | | | | | | 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.
* Added check_apps_ready() to Apps.get_containing_app_config()Tim Graham2015-02-081-3/+1
|
* Sorted imports with isort; refs #23860.Tim Graham2015-02-062-4/+3
|
* Removed deprecated Apps methods per deprecation timeline.Tim Graham2015-01-191-112/+1
|
* Removed an obsolete comment in django/apps/config.pyTim Graham2015-01-181-3/+0
|
* Fixed #12663 -- Formalized the Model._meta API for ↵Daniel Pyrathon2015-01-071-0/+5
| | | | | | | retrieving fields. Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
* Improved warning message when reloading models. Refs #23621.Loic Bistuer2014-10-221-1/+3
| | | | Thanks dfunckt and Tim Graham.
* Fixed #23621 -- Warn for duplicate models when a module ↵Loic Bistuer2014-10-221-3/+9
| | | | | | | | | | | is reloaded. 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.
* Revert "Improved AppRegistryNotReady message."Tim Graham2014-10-041-1/+1
| | | | | | | This reverts commit 6fa9fa91a5fcb228b3c385b35a2018b3821a447a. Aymeric: "I chose not to talk about django.setup() here on purpose. This will hardly always be the correct solution."
* Improved AppRegistryNotReady message.Collin Anderson2014-10-041-1/+1
|
* Fixed #22920 -- Avoid masking some exceptions.Aymeric Augustin2014-09-081-7/+12
| | | | | If loading an application trigger an ImportError, the details of that error were lost in some cases. Thanks Ben Davis for the report.
* Checked more precisely whether the app registry is ready.Aymeric Augustin2014-07-122-24/+42
| | | | | Accounted for the three stages of population: app configs, models, ready() methods of app configs.
* Fixed #8033 -- Explained app registry error during ↵Claude Paroz2014-06-231-2/+2
| | | | | | translation setup Thanks Tim Graham and Aymeric Augustin for the review.
* Fixed #21188 -- Introduced subclasses for ↵Claude Paroz2014-03-081-9/+10
| | | | | | | to-be-removed-in-django-XX warnings Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
* Fixed two typos.Rodolfo Carvalho2014-02-151-1/+1
|
* Fixed #21874 -- Require Django applications to have a ↵Carl Meyer2014-01-271-16/+27
| | | | | | | | | | | | | | | | filesystem path. 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.
* Fixed some missing/extraneous new line warnings.Simon Charette2014-01-261-1/+0
|
* Fixed #21877 -- Renamed django.apps.base to config.Aymeric Augustin2014-01-263-2/+2
|
* Fixed #21702 -- get_model('app_label.ModelName').Aymeric Augustin2014-01-261-2/+8
| | | | Also added tests for get_model.
* Fixed #17304 -- Allow single-path and configured-path ↵Carl Meyer2014-01-261-1/+10
| | | | | | | | | | namespace packages as 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.
* Fixed #21829 -- Added default AppConfigs.Aymeric Augustin2014-01-251-31/+42
| | | | | Thanks Russell for the report, Marc for the initial patch, Carl for the final review, and everyone who contributed to the design discussion.
* Fixed #21871 -- Fixed Apps.is_installed() for apps with ↵Carl Meyer2014-01-251-2/+1
| | | | | | custom label. Thanks Aymeric for design discussion.
* Fixed typo in comment.Martin Matusiak2014-01-151-1/+1
|
* Used a regular lock for app registry population.Aymeric Augustin2014-01-121-5/+8
| | | | | | | | 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.
* Fixed #21718 -- Renamed has_app to is_installed.Aymeric Augustin2014-01-061-1/+1
|
* Fixed #21711 -- Enforced unicity of model names.Aymeric Augustin2014-01-051-1/+0
|
* Renamed AppConfig.setup to ready.Aymeric Augustin2013-12-312-3/+3
| | | | | | Thanks Jannis and Marc for the feedback. Fixed #21717.
* Enforced unicity of app labels.Aymeric Augustin2013-12-311-1/+5
| | | | Fixed #21679.
* Made it possible to change an application's label in its ↵Aymeric Augustin2013-12-311-0/+21
| | | | | | configuration. Fixed #21683.
* Checked unicity of app config names when populating the ↵Aymeric Augustin2013-12-311-1/+12
| | | | | | | | | app registry. This check will miss duplicates until the check for duplicate labels is added. Refs #21679.
* Fleshed out release notes for app loading.Aymeric Augustin2013-12-311-3/+1
| | | | Fixed #21715.
* Removed the only_with_models_module argument of ↵Aymeric Augustin2013-12-301-21/+14
| | | | | | | | | get_model[s]. 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.
* Merged Apps.populate_apps() and populate_models().Aymeric Augustin2013-12-302-61/+20
| | | | | | | After the recent series of refactorings, there's no reason to keep two distinct methods. Refs #21681.
* Removed postponing in Apps.populate_models.Aymeric Augustin2013-12-301-30/+6
| | | | | | | | | | 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.
* Stopped populating the app registry as a side effect.Aymeric Augustin2013-12-302-27/+24
| | | | | | | 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.
* Populated Apps instances immediately by default.Aymeric Augustin2013-12-301-6/+12
|
* Added AppConfig.setup() to run setup code.Aymeric Augustin2013-12-302-0/+8
|
* Avoided leaking state on exceptions in populate_models().Aymeric Augustin2013-12-301-5/+6
|
* Deprecated the app argument of apps.get_models.Aymeric Augustin2013-12-291-26/+21
| | | | Use app_config.get_models() instead.
* Fixed stupid error in 21f22f95.Aymeric Augustin2013-12-291-1/+1
|
* Removed obsolete docstring.Aymeric Augustin2013-12-291-2/+0
|
* Added Apps.clear_cache().Aymeric Augustin2013-12-291-8/+16
| | | | This avoid leaking implementation details to tests that swap models.