Update the WSGI script for Django 1.6 and 1.11 compatibility.

Review Request #10527 — Created April 11, 2019 and updated

chipx86
Review Board
release-4.0.x
reviewboard

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.

Summary
Update the WSGI script for Django 1.6 and 1.11 compatibility.
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
david
  1. Ship It!
  2. 
      
Loading...