diff options
author | luxagraf <sng@luxagraf.net> | 2019-03-25 12:25:45 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2019-03-25 12:25:45 -0600 |
commit | f4551d4630b55aca5149c54c81f4d7d974457cba (patch) | |
tree | bfecc61cc052cc51df60ee743db4dd7c59c82232 | |
parent | 098df309dc2ef44bee389739089140c04e827982 (diff) |
added audio to image insert
-rw-r--r-- | app/utils/views.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/utils/views.py b/app/utils/views.py index cd72961..60cb7de 100644 --- a/app/utils/views.py +++ b/app/utils/views.py @@ -3,11 +3,13 @@ import json from django.http import Http404, HttpResponse from django.views.generic import ListView from django.apps import apps -from photos.models import LuxImage, LuxVideo from django.shortcuts import render_to_response from django.shortcuts import render from django.template import RequestContext +from photos.models import LuxImage, LuxVideo +from recordings.models import Audio + class PaginatedListView(ListView): """ @@ -34,8 +36,9 @@ def insert_image(request): """ images = LuxImage.objects.all()[:80] videos = LuxVideo.objects.all()[:10] + audio = Audio.objects.all()[:40] object_list = sorted( - chain(images, videos), + chain(images, videos, audio), key=lambda instance: instance.pub_date, reverse=True ) |