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