[1.7.x] Fixed #23983 -- Fixed a crash in migrations when adding order_with_respect_to to non-empty table.

Backport of 3dbbb8a89ca4beaabd5359fe82e32ed633b15140 from master
[1.7.x] Fixed #23975 -- Restored pre_migrate signal if all apps have migrations.

Thanks kmmbvnr for the report.

Backport of d2ff8a7241b621b8013c7ec1631e95ae4445f76d from master
[1.7.x] Fixed the formatting of one section of the security page

Backport of 104aaab7049afc6ef456fee52763f6d4f7dd575d from master