This makes it possible to run django.setup() in management commands that
don't need a settings module. In addition it simplifies error handling.
Thanks Claude for the review.
Backport of 4865326f from master.
`makemigrations --dry-run` will output the complete migrations file
that would be written if it's used along with `--verbosity 3`.
Backport of 2e613ea5c5 from master
Made the fix in InteractiveMigrationQuestioner class code, rather than
MigrationAutodetector, because --dry-run shouldn't affect whether
MigrationAutodetector will detect non-nullable fields, but the
questioner should skip the question and returns a None for default
(since that won't be used anyway) if --dry-run is used.
Backport of ee14961a2a from master
Refs #8620.
If we allow any value to remove form fields then we get name clashes
with method names, media classes etc. There was a backwards
incompatibility introduced meaning ModelForm subclasses with declared
fields called media or clean would lose those fields.
Field removal is now only permitted by using the sentinel value None.
The docs have been slightly reworded to refer to removal of fields
rather than shadowing.
Thanks to gcbirzan for the report and initial patch, and several of the
core team for opinions.
Backport of 9fb0f5dddc from master
Loading fixtures were failing since the refactoring in 244e2b71f5 for
inheritance setups where the chain contains abstract models and the
root ancestor contains a M2M relation.
Thanks Stanislas Guerra for the report.
Refs #20946.
Backport of 862e1ff234 from master
Also fixes a slight issue in sqlite3.schema._remake_table where
default values where quoted with "column name" quoting rules.
Reference for quoting: http://www.sqlite.org/lang_expr.html
Thanks Shai Berger for the review. Refs #22424.
Backport of 6aacb4c991 from master
Regression from f51c1f59 when using select_related then prefetch_related
on the reverse side of an O2O:
Author.objects.select_related('bio').prefetch_related('bio__books')
Thanks Aymeric Augustin for the report and tests. Refs #17001.
Backport of bdf3473e64 from master
When using ManifestStaticFilesStorage, deleted static files would be
correctly cleaned up by "collectstatic --clear", but the manifest file
would still contain the stale entries.
Thanks to tedtieken for the report
Backport of 3bec38888f from master.
Previously, class lookups from the output_type would be used, but any
changes to custom_lookup or custom_transform would be ignored.
Backport of a2dd618 from master
Considering that these apps only translate their app name, it's not
worth having a whole bunch of po files just for that. The translatable
app name for those apps will be integrated in Django core catalog.
Backport of a1f0c4c697 from master.
makemessages should now automatically distribute translatable
strings in the proper locale files, for Django too
(see 50a8ab7cd1).
Backport of 7999ed9b69 from master.