diff options
Diffstat (limited to 'app/utils/views.py')
-rw-r--r-- | app/utils/views.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/utils/views.py b/app/utils/views.py index f28a8cd..b1decf6 100644 --- a/app/utils/views.py +++ b/app/utils/views.py @@ -1,5 +1,7 @@ from django.views.generic import ListView - +from photos.models import LuxImage +from django.shortcuts import render_to_response +from django.template import RequestContext class PaginatedListView(ListView): """ @@ -17,3 +19,9 @@ class PaginatedListView(ListView): print(request.page_url) request.page = int(self.kwargs['page']) return super(PaginatedListView, self).dispatch(request, *args, **kwargs) + + +def insert_image(request): + images = LuxImage.objects.all()[:50] + return render_to_response('admin/insert_images.html', {'images': images, 'textarea_id': request.GET['textarea']}, context_instance=RequestContext(request)) + |