X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b05172d6b6a148ec45867fb3efd5911471279398..d91551345b68c2bc7d96f2098691fab28276d6b8:/apps/catalogue/views.py?ds=sidebyside diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index fd8a6330f..44a01479d 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -779,29 +779,6 @@ def clock(request): return HttpResponse(datetime.now().strftime('%Y/%m/%d %H:%M:%S')) -@cache.never_cache -def xmls(request): - """" - Create a zip archive with all XML files. - This should be removed when we have real API. - """ - temp = tempfile.TemporaryFile() - archive = zipfile.ZipFile(temp, 'w') - - for book in models.Book.objects.all(): - archive.write(book.xml_file.path, str('%s.xml' % book.slug)) - archive.close() - - response = HttpResponse(content_type='application/zip', mimetype='application/x-zip-compressed') - response['Content-Disposition'] = 'attachment; filename=xmls.zip' - response['Content-Length'] = temp.tell() - - temp.seek(0) - response.write(temp.read()) - return response - - - # info views for API def book_info(request, id, lang='pl'):