Fix errors when loading extensions in

Review Request #2956 — Created March 11, 2012 and submitted


Review Board


Fix errors when loading extensions in

There were some very confusing errors when running with
installed extensions. These would manifest as errors loading a view from
reviews.views while trying to resolve a URL for the admin page for an

The real problem is that loading reviews.views would load
reviews.datagrids, which would use MEDIA_SERIAL, which wasn't defined
yet due to how we now initialize Review Board. Previously we'd
initialize when loading URLs, but now we initialize through middleware.

So to fix this, we now initialize middleware in prior to
loading extensions. This solves the problem and also likely will fix
some issues people may hit with management commands.
My previous attempts to run ./reviewboard/ syncdb were failing,
but worked after this change.

The shell also worked again. runserver continues to work (goes down a
different code path), and unit tests all work.
  1. Ship It!
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (fae1b83)