Show an "Updates Required" page when we require manual updates from the administrator
Submitted
Updated 7 months, 3 weeks ago
| Christian Hammond | Reviewers | ||
| trunk | reviewboard | ||
| None | Review Board SVN | ||
There are unfortunately times when upgrading Review Board is not as simple as running "svn up." We've so far been unhelpful with this. Now that we're going to require some changes for the media locations and users aren't necessarily going to see the message on the listserv, I felt we should have a nice way of communicating to the user. This change introduces the ability to add checks on startup. These may include schema changes in the future, but right now they check if the media setup is what we expect. If not, an error page is displayed with helpful information. Once the user fixes the problem and restarts Review Board, the normal URLs will be activated. This can also be useful for first-time users who currently have very little aid.
Tried this change with a branch using the old media setup and saw that it told me how to fix the problem instead of taking me to any URLs. Tried it on a branch with the new media setup and Review Board operated as normal.
Posted 7 months, 3 weeks ago (March 29th, 2008, 12:56 a.m.)
-
/trunk/reviewboard/admin/checks.py (Diff revision 1) 29 # TODO: Put checks here for schema changes.
30 _install_fine = not _updates_required
31 32 return _updates_required
-
I'd like a permanent comment here along the lines of "Add new checks here"
-
/trunk/reviewboard/templates/admin/manual-updates/media-upload-dir.html (Diff revision 1) 1 <h1 class="title">Media directory changes</h1>
2 <div class="main">
3 <p>4 Your Review Board installation does not have a {{settings.MEDIA_ROOT}}/uploaded/images directory.5 </p>6 <h3>If this is a new installation...</h3>
7 <p>8 Create both <tt>{{settings.MEDIA_ROOT}}/uploaded</tt> and
9 <tt>{{settings.MEDIA_ROOT}}/uploaded/images</tt> on the server and make both directories writable by the web
10 server. You can do so with the following commands:
11 </p>12 <pre>13 $ cd {{settings.MEDIA_ROOT}}14 $ mkdir -p uploaded/images
15 $ sudo chown -R www-data.www-data uploaded
16 </pre>17 <h3>If this is an existing installation...</h3>
18 <p>19 A recent update has changed the media setup on the server. This may require manual updates to
20 the web server configuration. Please see the "Media Changes" section on the
21 <a href="http://code.google.com/p/reviewboard/wiki/RequiredServerUpdates">Required Server
22 Updates</a> page for instructions on fixing your setup.23 </p>24 </div> -
This whole thing needs strings to be marked for translation.
-
/trunk/reviewboard/templates/admin/manual_updates_required.html (Diff revision 1) 1 {% extends "base.html" %} -
Translation in this file, too