Commit graph

20 commits

Author SHA1 Message Date
Henrik Levkowetz f2b883d2bb Merged in ^/trunk@17617.
- Legacy-Id: 17618
2020-04-14 17:11:51 +00:00
Henrik Levkowetz 0df0a87a48 Added a workaround for the current libmagic which quite easily can mischaracterise text/plain documents as text/x-Algol68. Fixes issues #2941 and #2956.
- Legacy-Id: 17594
2020-04-07 18:33:24 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz 33e8733b91 Fixed up mypy issues or added type:ignore comments as needed for a clean mypy run.
- Legacy-Id: 16772
2019-09-30 15:42:18 +00:00
Henrik Levkowetz 2d7c9629aa Added 'from __future__' imports all over the place, to bring code behaviour into closer alignment between python2 and python3
- Legacy-Id: 16446
2019-07-15 15:40:51 +00:00
Henrik Levkowetz 1225f8af6b Refactored submission code to be clearer and only do mimetype extraction in one place, made the point where files are saved less obscure, fixed bytes/str issues for file read and write, fixed regex strings, fixed variable name visibility due to scope changes in py3.
- Legacy-Id: 16375
2019-07-04 15:49:42 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz 274548f1b1 Check the whole draft submission text when checking mime type, and catch decoding errors and raise ValidationError when converting submission form txt file to unicode for Draft().
- Legacy-Id: 13759
2017-07-02 21:32:44 +00:00
Henrik Levkowetz 5395c85ed7 Changed the acceptable mime type for uploaded xml files to be either text/xml or application/xml.
- Legacy-Id: 11280
2016-06-06 07:38:02 +00:00
Henrik Levkowetz 72ba673bd8 Removed debug code.
- Legacy-Id: 11221
2016-05-22 15:47:05 +00:00
Henrik Levkowetz a32b121efb Changed some instances of error strings from ascii to unicode in order to avoid problems with unicode error messages, such as the file size indications generated by django.template.defaultfilters.filesizeformat().
- Legacy-Id: 11220
2016-05-22 14:40:37 +00:00
Henrik Levkowetz 6c253ee48b Improved the verification of submitted file extensions and mimetype.
- Legacy-Id: 9986
2015-08-07 12:10:26 +00:00
Henrik Levkowetz e737fa747c Fixed an incorrect list of string interpolation arguments.
- Legacy-Id: 9918
2015-07-30 13:17:14 +00:00
Henrik Levkowetz d5f36911cf Added support of xml-source only drafts submissions.
- Legacy-Id: 9858
2015-07-22 21:35:44 +00:00
Ole Laursen ecf68dbb05 Revamp and clean up submit models:
- Rename IdSubmissionDetail to Submission
- Rename various submission fields to correspond to the conventions in
  the new schema
- Use a name model for the states instead of IdSubmissionStatus
- Drop the TempIdAuthor model which is based on splitting up author
  names
- Add a simple textual SubmissionEvent for tracking events in the
  lifetime of a submission
- Delete a bunch of obsolete fields
- Make sure all submission have an access key so we can depend on it
- Add state for when approval is needed from previous authors

A couple of migrations take care of transforming the
IdSubmissionDetail and moving data over/cleaning it up.

Also revamp the submit view code:

- Make form code do validation/cleaning only so there's a clear
  separation of concerns
- Reduce uses of inheritance that made the code hard to follow -
  forms now don't inherit from each other, views don't call each other
  but instead reuse common utilities, templates share CSS/utilities
  instead of relying on inheritance
- Move email rendering/sending to separate file
- Drop the in-grown terminology use (auto post vs. manual posts)
- Make the status page explain who is emailed for what purpose
- Add history table with recorded events
- Make the status page handle its post actions by itself instead of
  duplicating most of the setup logic in a number of simple views
- Fix a couple of minor bugs and handle some edge cases better
- Expand tests with a couple of more cases

Possibly the submit tool could still use more help text added to
explain the process, ideally what's explained in the tool instructions
page should be inlined or self-evident.
 - Legacy-Id: 6714
2013-11-15 13:30:32 +00:00
Emilio A. Sánchez López 37458917e0 Make critical parsing explicit. See #584
- Legacy-Id: 2828
2011-02-08 15:40:45 +00:00
Emilio A. Sánchez López da78082080 Extract metadata from plain ascii file. Fixes #586
- Legacy-Id: 2821
2011-02-08 10:55:37 +00:00
Jacobo Tarragón 020e7f89ff merging author parsing in plain parser. Closes #585.
- Legacy-Id: 2820
2011-02-08 10:42:09 +00:00
Emilio A. Sánchez López c0f0d2c237 Two levels of parsing. Fixes #584
- Legacy-Id: 2819
2011-02-08 08:26:12 +00:00
Emilio A. Sánchez López 4bc95f6436 Cutoff dates and basic checkings over the plain file. See #580
- Legacy-Id: 2806
2011-02-03 11:46:04 +00:00