@csrf_exempt<EOL>def recent_photos(request):
imgs = []<EOL>for obj in Image_File.objects.filter(is_image=True).order_by("<STR_LIT>"):<EOL><INDENT>upurl = "<STR_LIT:/>" + obj.upload.url<EOL>thumburl = "<STR_LIT>"<EOL>if obj.thumbnail:<EOL><INDENT>thumburl = "<STR_LIT:/>" + obj.thumbnail.url<EOL><DEDENT>imgs.append({'<STR_LIT:src>': upurl, '<STR_LIT>': thumburl, '<STR_LIT>': True})<EOL><DEDENT>return render_to_response('<STR_LIT>', {'<STR_LIT>': imgs})<EOL>
returns all the images from the data base