3 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
cde615aee6
middleware: Don't interfere in 404 URLs in setup
Don't raise a 404 exception when a page is not found.  Instead, simply
bypass the setup middleware so that other middleware have a chance to
process further.

Slight modification so that resolve method can be mocked during
unittests.
2016-06-02 20:13:40 -04:00
Sunil Mohan Adapa
f34cb78867
middleware: Fix anonymous access to setup view
Django runs process_request() on all the middleware classes in order.
Then it runs process_view() on all of them again.  During the runs, if
any of the views return a HttpResponse.  Further processing is ignored.

Setup middleware was handling process_request() and returning
HttpResponse if the application as not setup.  However, stronghold
middleware handles process_view().  Since process_request happens first
and response is being returned there, stronghold middleware is never
called.

Make setup middleware use process_view() instead.
2016-06-02 20:13:35 -04:00
Sunil Mohan Adapa
8dcafe3e0e
middleware: New middleware to check need for setup
- Call the setup helper to check if a installation or update of a module
  is required.

- Show installation and progress using the setup view.
2016-02-13 13:50:16 +05:30