diff options
author | luxagraf <sng@luxagraf.net> | 2019-05-05 11:40:42 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2019-05-05 11:40:42 -0500 |
commit | a2891841fbf1e5660693a1f9109f2e6810224a3b (patch) | |
tree | be0aae73fe8f5e6271a76e8c5c6dc35b00f347a6 /app/utils/views.py | |
parent | bdc06f56d538358f1fa07d35afb5733c790e3ab2 (diff) |
Diffstat (limited to 'app/utils/views.py')
-rw-r--r-- | app/utils/views.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/utils/views.py b/app/utils/views.py index 7a0c67d..c69cfff 100644 --- a/app/utils/views.py +++ b/app/utils/views.py @@ -11,7 +11,7 @@ from django.shortcuts import render_to_response from django.shortcuts import render from django.template import RequestContext from taggit.models import Tag -#from dal import autocomplete +from photos.models import LuxImage class PaginatedListView(ListView): @@ -100,3 +100,12 @@ def nav_json(request, app, model, pk): data['next'] = p.get_next_admin_url data = json.dumps(data) return HttpResponse(data) + + +def insert_image(request): + """ + The view that handles the admin insert image/video feature + """ + images = LuxImage.objects.all()[:80] + object_list = images + return render(request, 'admin/insert_images.html', {'object_list': object_list, 'textarea_id': request.GET['textarea']}) |