| Age | Commit message (Collapse) | Author |
|
source contains non-ASCII characters.
Backport of 307c0f299a6c26f5231d3516df5b4edc54b36553 from master
|
|
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
|
|
compatibility
A change in Python test discovery [1] causes the old packages that raised
an error to be discovered; now we use a common directory that's
ignored during discovery. Refs #23763.
[1] http://bugs.python.org/issue7559
Backport of c0cc8f69e7abfa8578729031f97ae4b96c5cdafe from master
|
|
|
|
Thanks dfunckt and Tim Graham.
|
|
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.
|
|
If loading an application trigger an ImportError, the details of that
error were lost in some cases. Thanks Ben Davis for the report.
|
|
|
|
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.
|
|
|
|
Also added tests for get_model.
|
|
test suite.
Thanks Aymeric for the suggestion.
|
|
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.
|
|
Thanks Russell for the report, Marc for the initial patch, Carl for the
final review, and everyone who contributed to the design discussion.
|
|
Thanks Aymeric for design discussion.
|
|
|
|
Fixed #21679.
|
|
Fixed #21683.
|
|
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.
|
|
|
|
Use app_config.get_models() instead.
|
|
Returning None on errors required unpythonic error checking and was
inconsistent with get_app_config.
get_model was a private API until the previous commit, but given that it
was certainly used in third party software, the change is explained in
the release notes.
Applied the same change to get_registered_model, which is a new private
API introduced during the recent refactoring.
|
|
This removes the gap between the master app registry and ad-hoc app
registries created by the migration framework, specifically in terms
of behavior of the get_model[s] methods.
This commit contains a stealth feature that I'd rather not describe.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also renamed app_cache to apps and "app cache" to "app registry".
Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
|