Fix the OAuth app on Django 1.11.
Review Request #10523 — Created April 10, 2019 and updated
reviewboard.oauthapp had an app label of
which didn't match any other references to the app. The custom label
affected admin URLs, the label for the app in the database UI (though
this is easily correctable), and some internal machinery of the
oauth2_providermodule. This only applied on Django 1.7+, meaning that
we had a major discrepency between 1.6 and newer versions.
To keep things compatible with what we've had in the past, we're going
to continue using an app label of
We're also lazily importing the method for enabling OAuth2 scopes, in
order to avoid breaking the Django app initialization process.
Unit tests pass on Django 1.6 and 1.11.