Remove the ability to submit Postscript I-Ds.
Commit ready for merge. Fixes #3448. - Legacy-Id: 19486
This commit is contained in:
parent
126892d8a2
commit
b058ba28ec
|
@ -36,7 +36,6 @@ from ietf.submit.models import Submission, Preapproval
|
||||||
from ietf.submit.utils import validate_submission_name, validate_submission_rev, validate_submission_document_date
|
from ietf.submit.utils import validate_submission_name, validate_submission_rev, validate_submission_document_date
|
||||||
from ietf.submit.parsers.pdf_parser import PDFParser
|
from ietf.submit.parsers.pdf_parser import PDFParser
|
||||||
from ietf.submit.parsers.plain_parser import PlainParser
|
from ietf.submit.parsers.plain_parser import PlainParser
|
||||||
from ietf.submit.parsers.ps_parser import PSParser
|
|
||||||
from ietf.submit.parsers.xml_parser import XMLParser
|
from ietf.submit.parsers.xml_parser import XMLParser
|
||||||
from ietf.utils import log
|
from ietf.utils import log
|
||||||
from ietf.utils.draft import Draft
|
from ietf.utils.draft import Draft
|
||||||
|
@ -450,7 +449,6 @@ class SubmissionManualUploadForm(SubmissionBaseUploadForm):
|
||||||
# html for version 3 xml submissions.
|
# html for version 3 xml submissions.
|
||||||
# html = forms.FileField(label='.html format', required=False)
|
# html = forms.FileField(label='.html format', required=False)
|
||||||
pdf = forms.FileField(label='.pdf format', required=False)
|
pdf = forms.FileField(label='.pdf format', required=False)
|
||||||
ps = forms.FileField(label='.ps format', required=False)
|
|
||||||
|
|
||||||
def __init__(self, request, *args, **kwargs):
|
def __init__(self, request, *args, **kwargs):
|
||||||
super(SubmissionManualUploadForm, self).__init__(request, *args, **kwargs)
|
super(SubmissionManualUploadForm, self).__init__(request, *args, **kwargs)
|
||||||
|
@ -463,9 +461,6 @@ class SubmissionManualUploadForm(SubmissionBaseUploadForm):
|
||||||
def clean_pdf(self):
|
def clean_pdf(self):
|
||||||
return self.clean_file("pdf", PDFParser)
|
return self.clean_file("pdf", PDFParser)
|
||||||
|
|
||||||
def clean_ps(self):
|
|
||||||
return self.clean_file("ps", PSParser)
|
|
||||||
|
|
||||||
class SubmissionAutoUploadForm(SubmissionBaseUploadForm):
|
class SubmissionAutoUploadForm(SubmissionBaseUploadForm):
|
||||||
user = forms.EmailField(required=True)
|
user = forms.EmailField(required=True)
|
||||||
|
|
||||||
|
@ -671,4 +666,4 @@ class MessageModelForm(forms.ModelForm):
|
||||||
super(MessageModelForm, self).__init__(*args, **kwargs)
|
super(MessageModelForm, self).__init__(*args, **kwargs)
|
||||||
self.fields['frm'].label='From'
|
self.fields['frm'].label='From'
|
||||||
self.fields['frm'].widget.attrs['readonly'] = 'True'
|
self.fields['frm'].widget.attrs['readonly'] = 'True'
|
||||||
self.fields['reply_to'].widget.attrs['readonly'] = 'True'
|
self.fields['reply_to'].widget.attrs['readonly'] = 'True'
|
|
@ -1,12 +0,0 @@
|
||||||
from ietf.submit.parsers.base import FileParser
|
|
||||||
|
|
||||||
|
|
||||||
class PSParser(FileParser):
|
|
||||||
ext = 'ps'
|
|
||||||
mimetypes = ['application/postscript', ]
|
|
||||||
|
|
||||||
# If some error is found after this method invocation
|
|
||||||
# no other file parsing is recommended
|
|
||||||
def critical_parse(self):
|
|
||||||
super(PSParser, self).critical_parse()
|
|
||||||
return self.parsed_info
|
|
|
@ -1,2 +0,0 @@
|
||||||
%%!PS-Adobe-2.0
|
|
||||||
This is PostScript
|
|
|
@ -1492,7 +1492,7 @@ class SubmitTests(TestCase):
|
||||||
rev = "00"
|
rev = "00"
|
||||||
group = "mars"
|
group = "mars"
|
||||||
|
|
||||||
self.do_submission(name, rev, group, ["txt", "xml", "ps", "pdf"])
|
self.do_submission(name, rev, group, ["txt", "xml", "pdf"])
|
||||||
|
|
||||||
self.assertEqual(Submission.objects.filter(name=name).count(), 1)
|
self.assertEqual(Submission.objects.filter(name=name).count(), 1)
|
||||||
|
|
||||||
|
@ -1503,8 +1503,6 @@ class SubmitTests(TestCase):
|
||||||
self.assertTrue('<?xml version="1.0" encoding="UTF-8"?>' in io.open(os.path.join(self.staging_dir, "%s-%s.xml" % (name, rev))).read())
|
self.assertTrue('<?xml version="1.0" encoding="UTF-8"?>' in io.open(os.path.join(self.staging_dir, "%s-%s.xml" % (name, rev))).read())
|
||||||
self.assertTrue(os.path.exists(os.path.join(self.staging_dir, "%s-%s.pdf" % (name, rev))))
|
self.assertTrue(os.path.exists(os.path.join(self.staging_dir, "%s-%s.pdf" % (name, rev))))
|
||||||
self.assertTrue('This is PDF' in io.open(os.path.join(self.staging_dir, "%s-%s.pdf" % (name, rev))).read())
|
self.assertTrue('This is PDF' in io.open(os.path.join(self.staging_dir, "%s-%s.pdf" % (name, rev))).read())
|
||||||
self.assertTrue(os.path.exists(os.path.join(self.staging_dir, "%s-%s.ps" % (name, rev))))
|
|
||||||
self.assertTrue('This is PostScript' in io.open(os.path.join(self.staging_dir, "%s-%s.ps" % (name, rev))).read())
|
|
||||||
|
|
||||||
def test_expire_submissions(self):
|
def test_expire_submissions(self):
|
||||||
s = Submission.objects.create(name="draft-ietf-mars-foo",
|
s = Submission.objects.create(name="draft-ietf-mars-foo",
|
||||||
|
@ -1664,12 +1662,6 @@ class SubmitTests(TestCase):
|
||||||
self.assertIn('Expected the PDF file to have extension ".pdf"', m)
|
self.assertIn('Expected the PDF file to have extension ".pdf"', m)
|
||||||
self.assertIn('Expected an PDF file of type "application/pdf"', m)
|
self.assertIn('Expected an PDF file of type "application/pdf"', m)
|
||||||
|
|
||||||
def test_submit_bad_file_ps(self):
|
|
||||||
r, q, m = self.submit_bad_file("some name", ["ps"])
|
|
||||||
self.assertIn('Invalid characters were found in the name', m)
|
|
||||||
self.assertIn('Expected the PS file to have extension ".ps"', m)
|
|
||||||
self.assertIn('Expected an PS file of type "application/postscript"', m)
|
|
||||||
|
|
||||||
def test_submit_file_in_archive(self):
|
def test_submit_file_in_archive(self):
|
||||||
name = "draft-authorname-testing-file-exists"
|
name = "draft-authorname-testing-file-exists"
|
||||||
rev = '00'
|
rev = '00'
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
<h3>Upload screen</h3>
|
<h3>Upload screen</h3>
|
||||||
<p>
|
<p>
|
||||||
The Upload screen is the first screen that a user will see when he or she starts the I-D submission process. A user can submit four different formats of an I-D, plain text, XML, PDF, and postscript, at the same time. Failure to submit at least one of a plain-text or xml version will cause an error, and an error screen will be displayed. A single v3 .xml source is preferred. A single v2 .xml source will be accepted. If neither of those are available, a plain-text document may be provided.
|
The Upload screen is the first screen that a user will see when he or she starts the I-D submission process. A user can submit three different formats of an I-D, XML, plain-text, and PDF, at the same time. Failure to submit at least one of a plain-text or xml version will cause an error, and an error screen will be displayed. A single v3 .xml source is preferred. A single v2 .xml source will be accepted. If neither of those are available, a plain-text document may be provided.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -70,10 +70,6 @@
|
||||||
<th>.pdf format</th>
|
<th>.pdf format</th>
|
||||||
<td>Button to select a PDF file of an I-D from a user's local file system. </td>
|
<td>Button to select a PDF file of an I-D from a user's local file system. </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<th>.ps format</th>
|
|
||||||
<td>Button to select a postscript file of an I-D from a user's local file system. </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Upload</th>
|
<th>Upload</th>
|
||||||
<td>Button to upload the document(s). The tool will begin parsing the plain-text document (or creating it from the xml if only xml is provided) and validate the document. The parsed meta-data will be displayed for user confirmation along with the validation results.</td>
|
<td>Button to upload the document(s). The tool will begin parsing the plain-text document (or creating it from the xml if only xml is provided) and validate the document. The parsed meta-data will be displayed for user confirmation along with the validation results.</td>
|
||||||
|
|
|
@ -80,14 +80,6 @@
|
||||||
on the submitted XML.
|
on the submitted XML.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
{% bootstrap_field form.ps label='<i class="fa fw-fw fa-file-image-o" aria-hidden="true"></i> Postscript rendering of the I-D'%}
|
|
||||||
<p class="help-block">
|
|
||||||
Optional to submit, will be auto-generated based
|
|
||||||
on the submitted XML.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% bootstrap_form_errors form %}
|
{% bootstrap_form_errors form %}
|
||||||
|
|
Loading…
Reference in a new issue