summaryrefslogtreecommitdiffstats
path: root/core/models.py
diff options
context:
space:
mode:
authorSam Wenham <sam@wenhams.co.uk>2019-02-24 13:03:34 +0000
committerSam Wenham <sam@wenhams.co.uk>2019-02-24 13:03:34 +0000
commit8f66837f6fb5b74ba3166ae6e31328f8a9e68d96 (patch)
treef5683df0d04d8decad0685198e6e76980e376ef0 /core/models.py
parent670559ec8722d8f2f5c97e93bbed1f610cc67206 (diff)
downloadtroggle-8f66837f6fb5b74ba3166ae6e31328f8a9e68d96.tar.gz
troggle-8f66837f6fb5b74ba3166ae6e31328f8a9e68d96.tar.bz2
troggle-8f66837f6fb5b74ba3166ae6e31328f8a9e68d96.zip
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
Diffstat (limited to 'core/models.py')
-rw-r--r--core/models.py9
1 files changed, 4 insertions, 5 deletions
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]