From 57a972fae79e77752c9b2bd18889eb0a61c13d41 Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Thu, 14 May 2009 06:19:46 +0100 Subject: [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. --- databaseReset.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'databaseReset.py') 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 -- cgit v1.2.3