diff options
author | luxagraf <sng@luxagraf.net> | 2018-09-27 11:33:59 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2018-09-27 11:33:59 -0500 |
commit | 1596c642731e5839da942c7727bbc1fa8016fdee (patch) | |
tree | c8630e2332d4e40a3335a67f1931462eb020c700 /app/photos/models.py | |
parent | efabaed1ef7ec2baafabed9dfd3c08dc192d98bd (diff) |
version 9 of stylesheet
Diffstat (limited to 'app/photos/models.py')
-rw-r--r-- | app/photos/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/photos/models.py b/app/photos/models.py index 5a41182..9f78ac9 100644 --- a/app/photos/models.py +++ b/app/photos/models.py @@ -179,7 +179,7 @@ class LuxImage(models.Model): self.location = apps.get_model('locations', 'Location').objects.filter( geometry__contains=self.point ).get() - except DoesNotExist: + except apps.get_model('locations', 'Location').DoesNotExist: raise forms.ValidationError("There is no location associated with that point, add it: %sadmin/locations/location/add/" % (settings.BASE_URL)) super(LuxImage, self).save() @@ -337,7 +337,7 @@ class Photo(models.Model): return '%sflickr/med/%s/%s.jpg' % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.flickr_id) def get_local_orig_url(self): - return '%sflickr/full/%s/%s.jpg' % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.flickr_id) + return '%s/flickr/full/%s/%s.jpg' % (settings.IMAGES_ROOT, self.pub_date.strftime("%Y"), self.flickr_id) def get_local_slideshow_url(self): return '%sslideshow/%s/%s.jpg' % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.flickr_id) |