From 743877fef95658dbf86b28b2faceb5529731aa48 Mon Sep 17 00:00:00 2001 From: "J.-S. Caux" <J.S.Caux@uva.nl> Date: Mon, 20 Jul 2020 10:59:15 +0200 Subject: [PATCH] Remove pdf fetch method (broken if SciPost, then arXiv preprint) --- preprints/urls.py | 3 --- preprints/views.py | 9 --------- 2 files changed, 12 deletions(-) diff --git a/preprints/urls.py b/preprints/urls.py index 7aa565fee..e52db4668 100644 --- a/preprints/urls.py +++ b/preprints/urls.py @@ -11,9 +11,6 @@ from submissions.constants import SUBMISSIONS_NO_VN_REGEX, SUBMISSIONS_COMPLETE_ app_name = 'preprints' urlpatterns = [ - url(r'^{regex}/$'.format(regex=SUBMISSIONS_NO_VN_REGEX), - views.preprint_latest_pdf, - name='latest_pdf'), url(r'^{regex}/$'.format(regex=SUBMISSIONS_COMPLETE_REGEX), views.preprint_pdf, name='pdf'), diff --git a/preprints/views.py b/preprints/views.py index 5d22b4cd4..23c1c0823 100644 --- a/preprints/views.py +++ b/preprints/views.py @@ -40,12 +40,3 @@ def preprint_pdf(request, identifier_w_vn_nr): filename = '{}{}'.format(preprint.identifier_w_vn_nr, extension) response['Content-Disposition'] = ('filename=' + filename) return response - - -def preprint_latest_pdf(request, identifier_wo_vn_nr): - submission = Submission.objects.filter( - preprint__identifier_wo_vn_nr=identifier_wo_vn_nr).first() - if not submission: - raise Http404 - return redirect(reverse('preprints:pdf', - args=[submission.get_latest_version().preprint.identifier_w_vn_nr,])) -- GitLab