X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8037505309870a6372cde196ce6a115f728612c2..d91551345b68c2bc7d96f2098691fab28276d6b8:/apps/catalogue/views.py 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'):