summaryrefslogtreecommitdiffstats
path: root/core/models/caves.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2021-05-05 00:35:10 +0100
committerPhilip Sargent <philip.sargent@klebos.com>2021-05-05 00:35:10 +0100
commitd374779c473a65fca4740d83942bae24c10f683d (patch)
tree76805079a17b1570a87c996665b9748c3c9fd1f8 /core/models/caves.py
parent44b6770b6a562bb8a7d453ddfd1b0b547013a958 (diff)
downloadtroggle-d374779c473a65fca4740d83942bae24c10f683d.tar.gz
troggle-d374779c473a65fca4740d83942bae24c10f683d.tar.bz2
troggle-d374779c473a65fca4740d83942bae24c10f683d.zip
dwg upload and django admin extra search
Diffstat (limited to 'core/models/caves.py')
-rw-r--r--core/models/caves.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/models/caves.py b/core/models/caves.py
index 259854d..7bbe21b 100644
--- a/core/models/caves.py
+++ b/core/models/caves.py
@@ -432,7 +432,7 @@ class LogbookEntry(TroggleModel):
# #return super(LogbookEntry, self).__init__(*args, **kwargs) # works in py3.5
# #return TroggleModel.__init__(*args, **kwargs) # fails in py3.5, runtime fail in 3.8
- def cave(self): # Why didn't he just make this a foreign key to Cave ? Replaces __egtattrribute__ sillyness.
+ def cave(self): # Why didn't he just make this a foreign key to Cave ? Replaces __getattrribute__ sillyness.
c = CaveSlug.objects.get(slug=self.cave_slug, primary=True).cave
return c
@@ -540,13 +540,13 @@ class PersonTrip(TroggleModel):
def __str__(self):
return f'{self.personexpedition} ({self.logbook_entry.date})'
-scansFileStorage = FileSystemStorage(location=settings.SURVEY_SCANS, base_url=settings.SURVEYS_URL)
-def get_scan_path(instance, filename):
- year=instance.survey.expedition.year
- number=str(instance.survey.wallet_number)
- if str(instance.survey.wallet_letter) != "None":
- number=str(instance.survey.wallet_letter) + number #two strings formatting because convention is 2009#01 or 2009#X01
- return os.path.join('./',year,year+r'#'+number,str(instance.contents)+str(instance.number_in_wallet)+r'.jpg')
+# scansFileStorage = FileSystemStorage(location=settings.SURVEY_SCANS, base_url=settings.SURVEYS_URL)
+# def get_scan_path(instance, filename):
+ # year=instance.survey.expedition.year
+ # number=str(instance.survey.wallet_number)
+ # if str(instance.survey.wallet_letter) != "None":
+ # number=str(instance.survey.wallet_letter) + number #two strings formatting because convention is 2009#01 or 2009#X01
+ # return os.path.join('./',year,year+r'#'+number,str(instance.contents)+str(instance.number_in_wallet)+r'.jpg')
Gcavelookup = None
Gcave_count = None