diff options
-rw-r--r-- | app/photos/models.py | 2 | ||||
-rw-r--r-- | app/photos/readexif.py | 8 |
2 files changed, 1 insertions, 9 deletions
diff --git a/app/photos/models.py b/app/photos/models.py index 075808d..6253336 100644 --- a/app/photos/models.py +++ b/app/photos/models.py @@ -233,7 +233,7 @@ def post_save_events(sender, update_fields, created, instance, **kwargs): img = Image.open(instance.image.path) instance.height = img.height instance.width = img.width - #instance = readexif(instance) + instance = readexif(instance) post_save.disconnect(post_save_events, sender=LuxImage) instance.save() post_save.connect(post_save_events, sender=LuxImage) diff --git a/app/photos/readexif.py b/app/photos/readexif.py index 71416ff..70a6987 100644 --- a/app/photos/readexif.py +++ b/app/photos/readexif.py @@ -36,14 +36,6 @@ def readexif(image): except: pass try: - image.point = Point(meta["XMP:GPSLongitude"], meta["XMP:GPSLatitude"], srid=4326) - try: - image.location = Location.objects.filter(geometry__contains=image.point).get() - except Location.DoesNotExist: - pass - except KeyError: - pass - try: image.exif_aperture = meta["EXIF:FNumber"] except: pass |