summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/TESTS/test_imports.py2
-rw-r--r--core/models/caves.py2
-rw-r--r--core/views/caves.py1
-rw-r--r--core/views/prospect.py6
4 files changed, 4 insertions, 7 deletions
diff --git a/core/TESTS/test_imports.py b/core/TESTS/test_imports.py
index 074bfbc..585b0fe 100644
--- a/core/TESTS/test_imports.py
+++ b/core/TESTS/test_imports.py
@@ -34,7 +34,7 @@ class SimpleTest(SimpleTestCase):
def test_import_Cave(self):
from troggle.core.models.caves import Cave
def test_import_parsers_surveys(self):
- from PIL import Image
+ #from PIL import Image
from troggle.core.utils import save_carefully
from functools import reduce
def test_import_parsers_survex(self):
diff --git a/core/models/caves.py b/core/models/caves.py
index d023f48..6a07748 100644
--- a/core/models/caves.py
+++ b/core/models/caves.py
@@ -56,7 +56,7 @@ def writetrogglefile(filepath, filecontent):
#os.chmod(filepath, 0o664) # set file permissions to rw-rw-r--
# should replace .call with .run and capture_output=True
call([git, "add", filename], cwd=cwd)
- call([git, "commit", "-m", 'Online cave or entrance edit'], cwd=cwd)
+ call([git, "commit", "-m", 'Troggle online cave or entrance edit'], cwd=cwd)
class Area(TroggleModel):
diff --git a/core/views/caves.py b/core/views/caves.py
index f32132c..1e9c3c4 100644
--- a/core/views/caves.py
+++ b/core/views/caves.py
@@ -5,7 +5,6 @@ import settings
import urllib.parse
import subprocess
from pathlib import Path
-#from PIL import Image, ImageDraw, ImageFont
from django import forms
from django.conf import settings
diff --git a/core/views/prospect.py b/core/views/prospect.py
index aaefc11..4b30f5d 100644
--- a/core/views/prospect.py
+++ b/core/views/prospect.py
@@ -1,10 +1,8 @@
import os
import string
import re
-#import settings
import urllib.parse
# from pathlib import Path
-from PIL import Image, ImageDraw, ImageFont
from django.http import HttpResponse
from django.shortcuts import render
@@ -18,7 +16,7 @@ from troggle.parsers.survex import MapLocations
''' Generates the prospecting guide document.
Also produces the overlay of points on top of a prospecting_image map - to be deleted.
-I have tried to make this work with the version of PIL we have installed but something is missing still.
+Not working with recent PIL aka Pillow image package - removed.
'''
AREANAMES = [
@@ -143,7 +141,7 @@ for FONT in [
TEXTSIZE = 16
CIRCLESIZE =8
LINEWIDTH = 2
-myFont = ImageFont.truetype(FONT, TEXTSIZE)
+#myFont = ImageFont.truetype(FONT, TEXTSIZE) # disabled as not importing PIL
#print(f' - myFont {myFont} {FONT} {TEXTSIZE}')
def mungecoord(x, y, mapcode, img):