Fixed #22073 - Ensure CreateTable operation handles backwards migration correctly when M2M fields are present
Fix bad conflict detection during makemigrations
Fixed #22199: Bad max_length deconstruction for FileField
Merge pull request #2315 from bendavis78/issues/22073

Fixed #22073 - Ensure CreateTable operation handles backwards migration correctly when M2M fields are present
Fixed #22183: Through M2Ms now correctly handled
Fixed #21843: Remove explicit ID column setting in test
4 flake8 warning fixes
Reorganized the database test settings

Change database test settings from "TEST_"-prefixed entries in the
database settings dictionary to setting in a dictionary that is itself
an entry "TEST" in the database settings.

Refs #21775

Thanks Josh Smeaton for review.
Fix weird autodetector error
Corrected a few missed references to old test settings
Fixed test breakage following test-settings enhancements
Avoided leaking warning filters.
Removed obsolete hack to run template tests.
Fixed the last fix for database test settings to work with Python3.
Revert "Reordered INSTALLED_APPS in default template, refs #22005"

This reverts commit a718fcf201b04ba254e9073be82f51ae1ae3a853.
Prevented admin from importing auth.User.

Since we don't enforce order between apps, root packages of contrib apps
cannot import models from unrelated apps.

Fix #22005, refs #21719.
Fixed an example to match the code.
Substituted 'shortcut function' for 'factory method' in tutorial

Many newbies don't know what a factory method is, nor is it pertinent to the
information the tutorial hopes to convey.
Fixed #22237 -- Removed some warnings in the test suite

Thanks Aymeric Augustin for the report.
Fixed #22239 -- Add auto detection of renamed models