2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-08 13:03:46 +00:00

[svn] Brief code cleanup.

This commit is contained in:
substantialnoninfringinguser
2009-07-03 05:31:49 +01:00
parent dc19150eba
commit 8446047ab2
17 changed files with 126 additions and 207 deletions

View File

@@ -4,7 +4,7 @@ import csv
from django.conf import settings
from core.models import QM, LogbookEntry, Cave
from datetime import *
from troggle.save_carefully import save_carefully
from utils import save_carefully
import re, os
def deleteQMs():

View File

@@ -2,7 +2,7 @@
import troggle.core.models as models
from django.conf import settings
import csv, time, re, os, logging
from troggle.save_carefully import save_carefully
from utils import save_carefully
##format of CAVETAB2.CSV is
KatasterNumber = 0

View File

@@ -13,7 +13,7 @@ import re
import datetime
import os
from troggle.save_carefully import save_carefully
from utils import save_carefully
#
# When we edit logbook entries, allow a "?" after any piece of data to say we've frigged it and

View File

@@ -3,18 +3,7 @@
from django.conf import settings
import core.models as models
import csv, re, datetime, os, shutil
from troggle.save_carefully import save_carefully
# Julian: the below code was causing errors and it seems like a duplication of the above. Hope I haven't broken anything by commenting it. -Aaron
#
# if name in expoers2008:
# print "2008:", name
# expomissing.discard(name) # I got an error which I think was caused by this -- python complained that a set changed size during iteration.
# yo = models.Expedition.objects.filter(year = "2008")[0]
# pyo = models.PersonExpedition(person = pObject, expedition = yo, is_guest=is_guest)
# pyo.save()
from utils import save_carefully
def saveMugShot(mugShotPath, mugShotFilename, person):
if mugShotFilename.startswith(r'i/'): #if filename in cell has the directory attached (I think they all do), remove it
@@ -39,7 +28,7 @@ def saveMugShot(mugShotPath, mugShotFilename, person):
mugShotObj.save()
def parseMugShotAndBlurb(personline, header, person):
#create mugshot Photo instance
"""create mugshot Photo instance"""
mugShotFilename=personline[header["Mugshot"]]
mugShotPath = os.path.join(settings.EXPOWEB, "folk", mugShotFilename)
if mugShotPath[-3:]=='jpg': #if person just has an image, add it

View File

@@ -7,7 +7,7 @@ import sys, os
import os, re, logging
from django.conf import settings
from core.models import Subcave, Cave
from troggle.save_carefully import save_carefully
from utils import save_carefully
def getLinksInCaveDescription(cave):
'''

View File

@@ -10,7 +10,7 @@ from PIL import Image
import csv
import re
import datetime
from save_carefully import save_carefully
from utils import save_carefully
def get_or_create_placeholder(year):
""" All surveys must be related to a logbookentry. We don't have a way to