From 8f66837f6fb5b74ba3166ae6e31328f8a9e68d96 Mon Sep 17 00:00:00 2001 From: Sam Wenham Date: Sun, 24 Feb 2019 13:03:34 +0000 Subject: 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 --- core/models.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'core/models.py') diff --git a/core/models.py b/core/models.py index a78e49b..f87792e 100644 --- a/core/models.py +++ b/core/models.py @@ -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] -- cgit v1.2.3