summaryrefslogtreecommitdiffstats
path: root/expo/models.py
diff options
context:
space:
mode:
authorsubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:38:37 +0100
committersubstantialnoninfringinguser <substantialnoninfringinguser@gmail.com>2009-05-13 05:38:37 +0100
commit99ab1e22e9dfd8ca058cb2256ee01b6492659438 (patch)
treee6146a5b57bdfca9d89049dd9a2bc43e2d005e5d /expo/models.py
parent0f5109cb0988d76c5b7d3037acca0ad8ac07f0dd (diff)
downloadtroggle-99ab1e22e9dfd8ca058cb2256ee01b6492659438.tar.gz
troggle-99ab1e22e9dfd8ca058cb2256ee01b6492659438.tar.bz2
troggle-99ab1e22e9dfd8ca058cb2256ee01b6492659438.zip
[svn] MOre work on abstracting the file locations on scanned survey notes
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8190 by julian @ 1/18/2009 9:04 PM
Diffstat (limited to 'expo/models.py')
-rw-r--r--expo/models.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/expo/models.py b/expo/models.py
index ebaf9ab..6d38b4f 100644
--- a/expo/models.py
+++ b/expo/models.py
@@ -350,6 +350,7 @@ class Photo(models.Model):
scansFileStorage = FileSystemStorage(location=settings.SURVEYS, base_url=settings.SURVEYS_URL)
def get_scan_path(instance, filename):
year=instance.survey.expedition.year
+ print "WN: ", type(instance.survey.wallet_number), instance.survey.wallet_number
number="%02d" % instance.survey.wallet_number + str(instance.survey.wallet_letter) #using %02d string formatting because convention was 2009#01
return os.path.join('./',year,year+r'#'+number,instance.contents+str(instance.number_in_wallet)+r'.jpg')