Disable Django system checks when running commands in rb-site.

Review Request #10683 — Created Sept. 6, 2019 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x
29fd60d...

Reviewers

Long ago, Django introduced a concept of system checks, which allow apps
to notify developers and system administrators when there are things
that require or recommend code or configuration changes.

We don't want to actually show these when running commands from rb-site,
as it's just going to result in administrators getting confused and
thinking checks that are on our plate are somehow their fault.

So now we disable those checks. Unfortunately, Django doesn't give us
any sort of reasonable way of doing this, so we have to monkey patch.
Command implementations can opt out of checks, but that doesn't help us.
You can call commands in a way that skips checks, but not when working
with an argv approach. So this is sadly our only recourse. We may need
to revisit this in the future.

Installed and upgraded a site, and ran management commands, all without
seeing system check warnings on Django 1.11.

    Loading...