diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-21 20:46:24 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-21 20:46:24 +0100 |
commit | 06051fe7dcec667deb439bb88e8b544873d06dbe (patch) | |
tree | 56e9b592f4f6d8bbf55ebaf3bea67349d8c16f8c | |
parent | a24becd004840e82c48b39179c509f57e6c9a727 (diff) | |
download | troggle-06051fe7dcec667deb439bb88e8b544873d06dbe.tar.gz troggle-06051fe7dcec667deb439bb88e8b544873d06dbe.tar.bz2 troggle-06051fe7dcec667deb439bb88e8b544873d06dbe.zip |
[svn] allow the recreate tables thing on control panel to work
-rw-r--r-- | expo/views_other.py | 5 | ||||
-rw-r--r-- | templates/controlPanel.html | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/expo/views_other.py b/expo/views_other.py index 4cbf786..504d1f6 100644 --- a/expo/views_other.py +++ b/expo/views_other.py @@ -63,7 +63,10 @@ def controlPanel(request): jobs_completed=[]
if request.method=='POST':
if request.user.is_superuser:
- importlist=['import_people', 'import_cavetab', 'import_logbooks', 'import_surveys', 'import_QMs']
+
+ #importlist is mostly here so that things happen in the correct order.
+ #http post data seems to come in an unpredictable order, we do it this way.
+ importlist=['reload_db', 'import_people', 'import_cavetab', 'import_logbooks', 'import_surveys', 'import_QMs']
databaseReset.make_dirs()
for item in importlist:
if item in request.POST:
diff --git a/templates/controlPanel.html b/templates/controlPanel.html index 487b7d1..d62030f 100644 --- a/templates/controlPanel.html +++ b/templates/controlPanel.html @@ -20,7 +20,7 @@ <h3>Wipe:</h3>
<table>
-<tr><td>Wipe entire database and recreate tables: </td><td><input type="checkbox" name="reset" /></td><td> <input type="submit" id="Import" value="I really want to delete all information in troggle, and accept all responsibility."></td></tr>
+<tr><td>Wipe entire database and recreate tables: </td><td><input type="checkbox" name="reload_db" /></td><td> <input type="submit" id="Import" value="I really want to delete all information in troggle, and accept all responsibility."></td></tr>
</table>
</form>
<h3>Import (non-destructive):</h3>
|