Fixed #22073 - Ensure CreateTable operation handles backwards migration correctly when M2M fields are present
Improved compatibility in admin_scripts tests

Environment keys/values need to use native strings on some
plateforms. Thanks anubhav joshi for detecting the issue and
helping shaping the patch.
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.