Commit graph

38 commits

Author SHA1 Message Date
Robert Sparks 3697180cc1 Reverted merge of timezone-aware migration efforts.
- Legacy-Id: 18792
2021-01-12 16:54:20 +00:00
Henrik Levkowetz 774e752a54 Snapshot of timezone-aware datatracker code. Tests pass, and the test-crawler shows only expected differences. Trunk changes merged in up to r18768.
- Legacy-Id: 18770
2020-12-16 23:53:37 +00:00
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 76ee1b8cdf Fixed a Py3 issue trying run .decode() on (already decoded) str.
- Legacy-Id: 17248
2020-01-18 14:59:08 +00:00
Henrik Levkowetz 202d112e0d Added handling for a decoding exception during submission processing.
- Legacy-Id: 17151
2019-12-16 13:32:51 +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 08f0338555 Tweaked the wording of the unexpected-encoding warning.
- Legacy-Id: 13760
2017-07-03 11:38:03 +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
Henrik Levkowetz 1bced6e46b Tweaked the missing id submission revision message to work also with non-ascii characters in the draft name. Changed the disallowed character error message to be more useful by providing the found document name and byte codes for the disallowed characters.
- Legacy-Id: 9610
2015-05-11 11:23:56 +00:00
Henrik Levkowetz acc2c59920 Updated a bunch of links from http: to https: based on a patch from lars@netapp.com.
- Legacy-Id: 9556
2015-04-24 21:47:12 +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
Ole Laursen 2daff23f02 Remove shim layer from submit code
- Legacy-Id: 6654
2013-11-05 16:59:13 +00:00
Henrik Levkowetz 1e03a04eca Changed the mimetype detection code to only read first 4k block of file, not the whole file.
- Legacy-Id: 5878
2013-07-25 18:28:18 +00:00
Henrik Levkowetz a8c2bc80e9 Fixed bug in the rewritten mime-magic code.
- Legacy-Id: 5877
2013-07-25 15:20:21 +00:00
Henrik Levkowetz 4ed0337cae Made the code which uses the 'magic' module to determine file type and encoding work with both the old and new interface to python-magic.
- Legacy-Id: 5876
2013-07-25 14:45:01 +00:00
Henrik Levkowetz 1c12b295ef Fixed a misleading error message given when disallowed character occurs in a draft filename.
- Legacy-Id: 4946
2012-10-22 18:18:49 +00:00
Ole Laursen 6f10d2f3f7 Port submit to new schema, adding a set of tests and fixing some bugs
- Legacy-Id: 3436
2011-09-21 19:29:50 +00:00
Henrik Levkowetz d98d27dfa6 Return an early error if we can't extract enough information from the draft to fill in the metainformation that lets the user return to this submission later. Tweak an error message.
- Legacy-Id: 3171
2011-06-08 19:24:15 +00:00
Henrik Levkowetz d78f5f651f Ignore *.pyc files under ietf/submit, as elsewhere.
- Legacy-Id: 3041
2011-04-12 15:57:35 +00:00
Emilio A. Sánchez López d08c515e78 Fixed 'post first-click' bug.
Added domain into email with authorization key.
Extend the type of submission that secretariat can cancel or autopost. Fixes #614
 - Legacy-Id: 2882
2011-03-12 16:22:44 +00:00
Emilio A. Sánchez López 86229aa478 Saving files in staging area.
Saving information of upload in database.
Executing idnits.
Fixes #589
 - Legacy-Id: 2835
2011-02-09 10:42:37 +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
Jacobo Tarragón 5dd4ef6742 make plain parser pep8 compliant. See #585.
- Legacy-Id: 2827
2011-02-08 15:25:59 +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