| Age | Commit message (Collapse) | Author |
|
|
|
Many thanks to @bitdancer and @aaugustin for answering my stupid questions about (mail)encodings and pointing me in the right direction.
|
|
Thanks ashley at ashleymills.com for the suggestion.
|
|
|
|
would get send via smtp.
|
|
Thanks Keryn Knight for the report.
|
|
After the recent series of refactorings, there's no reason to keep
two distinct methods.
Refs #21681.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
Refs #1796, #21676.
|
|
|
|
Currently it's 3.3.
|
|
Various small fixes while I was proof-reading.
|
|
|
|
|
|
Use app_config.get_models() instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This avoid leaking implementation details to tests that swap models.
|
|
Thanks Simon.
|
|
|
|
TOOOOO MUCH GLOBAL STATE (you didn't see that).
|
|
Thanks Simon for the suggestion.
Also removed inappropriate lowercasing of app labels in migrations.
Unlike model names, they are case sensitive.
|
|
Thanks Florian for isolating the shortest way to reproduce this issue:
./runtests.py \
django.contrib.auth.tests.test_context_processors.AuthContextProcessorTests.test_perms_attrs \
django.contrib.auth.tests.test_auth_backends.ChangedBackendSettingsTest.test_changed_backend_settings \
django.contrib.auth.tests.test_auth_backends.CustomUserModelBackendAuthenticateTest.test_authenticate \
django.contrib.auth.tests.test_basic.BasicTestCase.test_createsuperuser_management_command
|
|
De-aliased pre/post_syncdb to pre/post_migrate to increase
backwards-compatibility.
|
|
|
|
SQLite accepts the relevant standard SQL (although by default it doesn't
enforce the constraint), and the 'traditional' creation backend helper
generate it, so this allows us to:
- Maintain the status quo
- Improve readability of the SQL code generated for that backend.
Also, we will need this for when we fix Refs #14204.
|
|
Thanks Sascha Peilicke for the report and initial patch, and
Tim Graham for the review.
|
|
Refs #15903, #15866, #15850.
|
|
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.
|
|
Documented them as public APIs.
|
|
ContentTypes are only created for installed applications, and I could
make a case for not returning a model that isn't installed any more.
The check for stale ContentTypes in update_contenttypes doesn't use
model_class.
ModelSignal actually needs get_registered_model since the lookup happens
at import time. I took this opportunity to perform a small 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.
|
|
This is to provide a consistent interface (namely bytes) for the smtp
backend which after all sends bytes over the wire; encoding with as_string
yields different results since mails as unicode are not really specified.
as_string stays for backwardscompatibilty mostly and some debug outputs.
But keep in mind that the output doesn't match as_bytes!
|
|
|
|
Previously, only the URL path was included in the cache key.
Thanks jamey for the suggestion.
|
|
|
|
Made it use 'AUTOINCREMENT' suffix for PK creation. This way it doeesn't
regress when compared with the 'traditional' DB backend creation
infrastructure.
Refs #10164.
|
|
Thanks to Arfrever for the report and Aymeric for the review.
|
|
Thanks kz26 for the report and Tim Graham for the excellent
review.
|
|
The last component of the dotted path to the application module is
consistently referenced as the application "label". For instance it's
AppConfig.label. appname could be confused with AppConfig.name, which is
the full dotted path.
|
|
|