forked from expo/troggle
[svn] allow the recreate tables thing on control panel to work
This commit is contained in:
parent
a24becd004
commit
06051fe7dc
@ -63,7 +63,10 @@ def controlPanel(request):
|
|||||||
jobs_completed=[]
|
jobs_completed=[]
|
||||||
if request.method=='POST':
|
if request.method=='POST':
|
||||||
if request.user.is_superuser:
|
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()
|
databaseReset.make_dirs()
|
||||||
for item in importlist:
|
for item in importlist:
|
||||||
if item in request.POST:
|
if item in request.POST:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<h3>Wipe:</h3>
|
<h3>Wipe:</h3>
|
||||||
|
|
||||||
<table>
|
<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>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<h3>Import (non-destructive):</h3>
|
<h3>Import (non-destructive):</h3>
|
||||||
|
Loading…
Reference in New Issue
Block a user