From 157f11b65900f7f36c7d9a060c8162c4250d584a Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Wed, 13 May 2009 06:08:04 +0100 Subject: [svn] Added QM wiki markup. The format is [[cave:204 QM:2005-04A]] with the grade (A) being optional. The links color red if the QM does not exist, and in that case clicking on them goes to an admin add page with fields prepopulated. Various other little things, e.g. filled in the footer with links. Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8305 by aaron @ 3/16/2009 8:53 AM --- parsers/QMs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'parsers/QMs.py') diff --git a/parsers/QMs.py b/parsers/QMs.py index bad95a7..c7e6789 100644 --- a/parsers/QMs.py +++ b/parsers/QMs.py @@ -33,9 +33,9 @@ def parseCaveQMs(cave,pathToCSV): year=int(line[0][1:5]) #check if placeholder exists for given year, create it if not if cave=='stein': - placeholder, hadToCreate = LogbookEntry.objects.get_or_create(date__year=year, text="placeholder for QMs in 204", defaults={"date": date(year, 1, 1),"cave":steinBr}) + placeholder, hadToCreate = LogbookEntry.objects.get_or_create(date__year=year, title="placeholder for QMs in 204", text="QMs temporarily attached to this should be re-attached to their actual trips", defaults={"date": date(year, 1, 1),"cave":steinBr}) elif cave=='hauch': - placeholder, hadToCreate = LogbookEntry.objects.get_or_create(date__year=year, text="placeholder for QMs in 234", defaults={"date": date(year, 1, 1),"cave":hauchHl}) + placeholder, hadToCreate = LogbookEntry.objects.get_or_create(date__year=year, title="placeholder for QMs in 234", text="QMs temporarily attached to this should be re-attached to their actual trips", defaults={"date": date(year, 1, 1),"cave":hauchHl}) if hadToCreate: print cave+" placeholder logbook entry for " + str(year) + " added to database" QMnum=re.match(r".*?-\d*?-X?(?P\d*)",line[0]).group("numb") -- cgit v1.2.3