Commit graph

20 commits

Author SHA1 Message Date
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Henrik Levkowetz 4b0a9360f0 Merged in ^/branch/iola/event-saving-refactor-r10291, which refactors document saving to always use doc.save_with_history(events), and requires accompanying events. This branch also provides refactoring of recurring regexes in url patterns into a dictionary. As part of the merge, also refactored new code which didn't use the save_with_history() method.
- Legacy-Id: 11840
2016-08-23 10:52:08 +00:00
Henrik Levkowetz 6f5234969e If an external command fails, capture stderr and raise Exception.
This handles the RFC-Editor and IANA sync external commands, but
need to be generalised, and applied to all external commands: TODO.
 - Legacy-Id: 11646
2016-07-13 13:12:08 +00:00
Ole Laursen e1f0917659 Summary: Add new document saving API, Document.save_with_history(events).
The new API requires at least one event and will automatically save a
snapshot of the document and related state. Document.save() will now
throw an exception if called directly, as the new API is intended to
ensure that documents are saved with both an appropriate snapsnot and
relevant history log, both of which are easily defeated by just
calling .save() directly.

To simplify things, the snapshot is generated after the changes to a
document have been made (in anticipation of coming changes), instead
of before as was usual.

While revising the existing code to work with this API, a couple of
missing events was discovered:

- In draft expiry, a "Document has expired" event was only generated
  in case an IESG process had started on the document - now it's
  always generated, as the document changes its state in any case

- Synchronization updates like title and abstract amendmends from the
  RFC Editor were silently (except for RFC publication) applied and
  not accompanied by a descriptive event - they now are

- do_replace in the Secretariat tools now adds an event

- Proceedings post_process in the Secretariat tools now adds an event

- do_withdraw in the Secretariat tools now adds an event

A migration is needed for snapshotting all documents, takes a while to
run. It turns out that a single document had a bad foreign key so the
migration fixes that too.
 - Legacy-Id: 10101
2015-09-28 14:01:03 +00:00
Henrik Levkowetz 2f54511763 Changed all explicitly set HttpResponse content_types to specify charset.
Django sets charset if you don't specify a content_type; if you specify
one you also must add a charset specification (if you want one).  
Fixes issue #1647.
 - Legacy-Id: 9348
2015-03-26 21:35:21 +00:00
Henrik Levkowetz 8e9f835651 Made ietf/sync pyflakes-clean.
- Legacy-Id: 7498
2014-03-16 07:49:21 +00:00
Ole Laursen 42ade6273c Turn on CSRF protection - all forms must from now on have a {% csrf_token %}
- Legacy-Id: 6963
2013-12-17 12:50:24 +00:00
Ole Laursen d66ac15fc2 Rewrite a bunch of HttpResponseRedirect + url reverse calls to instead
take advantage of the redirect shortcut (introduced in Django 1.1)
 - Legacy-Id: 6960
2013-12-17 10:23:42 +00:00
Ole Laursen e63ac36b8f Remove shim layer from ietfauth, delete some dead code and migrate
remaining importers of ietfauth.decorators to ietfauth.utils
 - Legacy-Id: 6797
2013-12-05 16:24:03 +00:00
Ole Laursen 0f69f87a56 Skip IANA - Review Needed and Version Changed - Review Needed changes
from IANA as it turns out that the Datatracker is the authoritative
source on these states. Also improve logging so that the raw JSON from
IANA is dumped, the parsed JSON on imported changes is dumped and we
write to syslog before starting a sync script in the notification view.
 - Legacy-Id: 5800
2013-06-21 16:48:05 +00:00
Henrik Levkowetz 88e1d725c5 Moved settings for RFC-Editor sync to settings.py.
- Legacy-Id: 5775
2013-06-09 17:50:19 +00:00
Henrik Levkowetz e4fd951f2c Use IANA URL settings from settings.py in some more places.
- Legacy-Id: 5676
2013-04-21 14:38:20 +00:00
Henrik Levkowetz 5345b17eab Added a missing import.
- Legacy-Id: 5455
2013-02-24 20:15:20 +00:00
Ole Laursen 9c571e65ef Undo actual state when doing an RFC Editor undo, this is only relevant
if the removed entry is the latest entry
 - Legacy-Id: 5116
2012-12-11 15:10:51 +00:00
Ole Laursen 45cf853524 Dump redacted events in DeletedEvent table
- Legacy-Id: 5025
2012-11-07 14:59:17 +00:00
Ole Laursen 793856c217 Add RFC Editor undo page, missing test and dump model
- Legacy-Id: 5013
2012-11-06 17:06:10 +00:00
Ole Laursen 2ab4161daf Return 500 on sync notify errors
- Legacy-Id: 4877
2012-09-21 13:22:04 +00:00
Ole Laursen 2415ae8687 Support blank password in sync notify view (for testing)
- Legacy-Id: 4874
2012-09-21 09:01:00 +00:00
Ole Laursen ff077f4b1f Rename /sync/iana|rfceditor/update/ to /sync/iana|rfceditor/notify/,
and put the thing to notify in the URL, like
/sync/iana/notify/changes/, instead of using POST parameters; refactor
the two sync views to use the same for IANA and RFC Editor; require
Secretariat or IANA/RFC Editor roles for triggering the updates and
support passing username and password for auth to make it easier in
the other end once we move away from HTTP Auth
 - Legacy-Id: 4868
2012-09-20 11:53:56 +00:00
Ole Laursen 85d2cdddc2 Add POST interface for IANA/RFC Editor for triggering updates, add
discrepancies report for seeing differences between the
Datatracker/RFC Editor/IANA, add tests of IANA/RFC Editor integration,
add script for weekly discrepancies emails
 - Legacy-Id: 4851
2012-09-17 15:57:48 +00:00