Update the WSGI script for Django 1.6 and 1.11 compatibility.

Review Request #10527 — Created April 11, 2019 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

Our WSGI script is very old, and attempts to import and construct a
WSGIHandler instance directly. Even in Django 1.6, this was not the
recommended approach. Instead, we now call get_wsgi_application(),
which has the important addition on Django 1.7+ of calling
django.setup() to initialize Django before serving requests. This is
fully backwards-comaptible.

rb-site will perform an upgrade on this file, converting the old logic
to the new logic automatically without altering anything else in the
file.

Performed an upgrade on a legacy file. Verified that it was upgraded
correctly.

Verified that the new logic returns a valid WSGIHandler on both
Django 1.6 and 1.11.

Commits

Files