summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/jrnl/views.py2
-rw-r--r--app/photos/models.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/jrnl/views.py b/app/jrnl/views.py
index 1e80c6b..bbeccca 100644
--- a/app/jrnl/views.py
+++ b/app/jrnl/views.py
@@ -101,7 +101,7 @@ class HomepageList(ListView):
# Call the base implementation first to get a context
context = super(HomepageList, self).get_context_data(**kwargs)
context['homepage'] = HomepageCurrator.objects.get(pk=1)
- context['location'] = CheckIn.objects.last()
+ context['location'] = CheckIn.objects.latest()
context['IMAGES_URL'] = settings.IMAGES_URL
return context
diff --git a/app/photos/models.py b/app/photos/models.py
index f0d7ec3..0d123c3 100644
--- a/app/photos/models.py
+++ b/app/photos/models.py
@@ -23,7 +23,7 @@ from django.db.models.signals import m2m_changed
def get_upload_path(self, filename):
- return "images/original/%s/%s" % ('2015', filename)#datetime.datetime.today().strftime("%Y"), filename)
+ return "images/original/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename)
def get_vid_upload_path(self, filename):
return "images/videos/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename)
@@ -180,7 +180,7 @@ def post_save_events(sender, update_fields, created, instance, **kwargs):
@receiver(m2m_changed, sender=LuxImage.sizes.through)
def update_photo_sizes(sender, instance, **kwargs):
- base_path = "%s/%s/" % (settings.IMAGES_ROOT, '2015')# instance.pub_date.strftime("%Y"))
+ base_path = "%s/%s/" % (settings.IMAGES_ROOT, instance.pub_date.strftime("%Y"))
filename, file_extension = os.path.splitext(instance.image.path)
if file_extension != ".mp4":
img = Image.open(instance.image.path)