2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-17 11:17:08 +00:00

Make things more compatiable with newer python

Fix the expeditions list
Improvements to make it compatiable with django 1.8
Bump the years to add 2018
Update the .hgignore file to ignore junk
This commit is contained in:
Sam Wenham
2019-02-24 13:03:34 +00:00
parent 670559ec87
commit 8f66837f6f
14 changed files with 153 additions and 101 deletions

View File

@@ -30,7 +30,7 @@ def get_related_by_wikilinks(wiki_text):
number = qmdict['number'])
res.append(qm)
except QM.DoesNotExist:
print 'fail on '+str(wikilink)
print('fail on '+str(wikilink))
return res
@@ -141,7 +141,6 @@ class Person(TroggleModel):
class Meta:
verbose_name_plural = "People"
class Meta:
ordering = ('orderref',) # "Wookey" makes too complex for: ('last_name', 'first_name')
def __unicode__(self):
@@ -529,11 +528,11 @@ class Cave(TroggleModel):
def getCaveByReference(reference):
areaname, code = reference.split("-", 1)
print areaname, code
print(areaname, code)
area = Area.objects.get(short_name = areaname)
print area
print(area)
foundCaves = list(Cave.objects.filter(area = area, kataster_number = code).all()) + list(Cave.objects.filter(area = area, unofficial_number = code).all())
print list(foundCaves)
print(list(foundCaves))
assert len(foundCaves) == 1
return foundCaves[0]