summaryrefslogtreecommitdiffstats
path: root/databaseReset.py
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-14 06:19:46 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-14 06:19:46 +0100
commite9e755b5175b47a4dbb69ac114428660bb2e12a8 (patch)
tree7d84cc3f309f90bceed9c48a71999b9306656fda /databaseReset.py
parent191619e6d82f6ff2747b13d355064922407c762c (diff)
downloadtroggle-e9e755b5175b47a4dbb69ac114428660bb2e12a8.tar.gz
troggle-e9e755b5175b47a4dbb69ac114428660bb2e12a8.tar.bz2
troggle-e9e755b5175b47a4dbb69ac114428660bb2e12a8.zip
[svn] Fixed broken buttons on controlpanel, added CAVETAB2.CSV export and download buttons and made them work too.
Changed ordering on PersonExpeditions so that it is based on their expedition. That way, even if we don't have date info on when a user was on expo exactly, pages like personindex work correctly.
Diffstat (limited to 'databaseReset.py')
-rw-r--r--databaseReset.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/databaseReset.py b/databaseReset.py
index f2c3b51..5503104 100644
--- a/databaseReset.py
+++ b/databaseReset.py
@@ -6,6 +6,7 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from django.core import management
from django.db import connection
from django.contrib.auth.models import User
+from django.http import HttpResponse
def reload_db():
cursor = connection.cursor()
@@ -55,4 +56,19 @@ def reset():
import_logbooks()
import_survex()
import_QMs()
- import_surveys() \ No newline at end of file
+ import_surveys()
+
+def export_cavetab():
+ from export import tocavetab
+ outfile=file(os.path.join(settings.EXPOWEB, "noinfo", "CAVETAB2.CSV"),'w')
+ tocavetab.writeCaveTab(outfile)
+ outfile.close()
+
+def export_qms(): #finish this. need cave chooser
+ from export import toqms
+ outfile=file(os.path.join(settings.EXPOWEB, "noinfo", "CAVETAB2.CSV"),'w')
+ outfile.close()
+
+
+
+ \ No newline at end of file