diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-14 06:19:46 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-14 06:19:46 +0100 |
commit | 57a972fae79e77752c9b2bd18889eb0a61c13d41 (patch) | |
tree | 117ccd760c60b6d159a9d16b99a5daa3083a733a /export | |
parent | c454fecfc1dc1e63812cb230fd5e7d9d90b20c33 (diff) | |
download | troggle-57a972fae79e77752c9b2bd18889eb0a61c13d41.tar.gz troggle-57a972fae79e77752c9b2bd18889eb0a61c13d41.tar.bz2 troggle-57a972fae79e77752c9b2bd18889eb0a61c13d41.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 'export')
-rw-r--r-- | export/tocavetab.py | 3 | ||||
-rw-r--r-- | export/toqms.py | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/export/tocavetab.py b/export/tocavetab.py index 121c36e..ab7a2ee 100644 --- a/export/tocavetab.py +++ b/export/tocavetab.py @@ -42,8 +42,7 @@ def cavetabRow(cave): caveRow[headers.index(column)]=modelField.replace(u'\xd7','x').replace(u'\u201c','').replace(u'\u2013','').replace(u'\xbd','')
return caveRow
-def writeCaveTab(path):
- outfile=file(path,'w')
+def writeCaveTab(outfile):
cavewriter=csv.writer(outfile,lineterminator='\r')
cavewriter.writerow(headers)
for cave in models.Cave.objects.all():
diff --git a/export/toqms.py b/export/toqms.py index 0597da6..dd58fca 100644 --- a/export/toqms.py +++ b/export/toqms.py @@ -28,8 +28,7 @@ def qmRow(qm): qmRow[headers.index(column)]=modelField.replace(u'\xd7','x').replace(u'\u201c','').replace(u'\u2013','').replace(u'\xbd','')
return qmRow
-def writeQmTable(path,cave):
- outfile=file(path,'w')
+def writeQmTable(outfile,cave):
cavewriter=csv.writer(outfile,lineterminator='\r')
cavewriter.writerow(headers)
for qm in cave.get_QMs():
|