Fix the admin site only showing OAuth-related models

Review Request #9058 — Created July 7, 2017 and submitted

Information

Review Board
release-3.0.x
9dd3d91...

Reviewers

We were accidentally importing the reviewboard.oauth.admin module too
early, causing admin.autodiscover() to never be called (because we had
already registered our Application model). This was leading to only
oauth2_provider and reviewboard.oauth models being shown in the
admin site DB page. Importing the admin in a function scope fixes this
issue.

With this patch applied, models get registered correctly.

chipx86
  1. Ship It!
  2. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (707713c)