Commit graph

62 commits

Author SHA1 Message Date
Ryan Cross 39fd739fad Have RFC sync change IESG state of draft to RFC Ed Queue when draft appears in queue. Fixes #1750. Commit ready for merge.
- Legacy-Id: 9788
2015-07-18 12:55:05 +00:00
Robert Sparks dd939e8196 Make parsing IANA mail for comments more flexible. Commit ready for merge.
- Legacy-Id: 9641
2015-05-22 19:12:07 +00:00
Henrik Levkowetz 48e24c0a1e Merged in [9548] from rjsparks@nostrum.com:
Allow IANA to switch to (BEGIN IANA COMMENTS) at their leisure. Make sure the captured events are obviously from IANA.
 - Legacy-Id: 9568
Note: SVN reference [9548] has been migrated to Git commit 6ded3411c2
2015-04-26 21:11:05 +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
Robert Sparks 6ded3411c2 Allow IANA to switch to (BEGIN IANA COMMENTS) at their leisure. Make sure the captured events are obviously from IANA. Commit ready for merge.
- Legacy-Id: 9548
2015-04-24 19:11:33 +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 86997e1e95 Turned the api.py file into a module. Moved the makeresources management command to the api module. Added some api tests. Added crawling of api files to the test-crawler. Adjusted some resource files discovered by the test suite and test-crawler. Removed a bunch of empty model files.
- Legacy-Id: 9144
2015-03-03 20:23:36 +00:00
Robert Sparks bf4f3ad75f Made several changes to better handle non-ascii UTF-8 in email messages.
Used multipart mime when including the original message in an error message to the secretariat.
Modified the way IANA review email is parsed.
Added non-ascii UTF-8 tests to the IANA review email parser and to the SMTP Exception handling code.

Commit ready for merge.
 - Legacy-Id: 7673
2014-04-29 18:45:37 +00:00
Henrik Levkowetz b8cd069070 Merged [7557] from rjsparks@nostrum.com: Update reference relationships (asyncronously) for new rfcs found when syncing with the rfc index. Fixes ticket #1347.
- Legacy-Id: 7572
Note: SVN reference [7557] has been migrated to Git commit 9b43e159623ed1fb53438541b25a1605922943dd
2014-04-06 15:01:12 +00:00
Henrik Levkowetz 8e9f835651 Made ietf/sync pyflakes-clean.
- Legacy-Id: 7498
2014-03-16 07:49:21 +00:00
Henrik Levkowetz 02031a01b9 Cleaned out some (arbitrary) submodule name imports into ietf.utils, and made the corresponding import statements import the names directly from the correct submodules.
- Legacy-Id: 7495
2014-03-16 07:09:38 +00:00
Ole Laursen 32874a2c89 Move draft files to archive when setting the draft state to RFC,
fixes #1254.
 - Legacy-Id: 7157
2014-01-23 11:41:22 +00:00
Ole Laursen 4525c22b54 Remove Python 2.6 compatibility hack
- Legacy-Id: 7156
2014-01-23 11:27:29 +00:00
Ole Laursen 87ca10d122 Remove usage of log_state_changed (and duplicate in
doc/utils_charter.py) in favour of add_state_change_event which has
slightly better API but otherwise does basically the same except it
sets an event type we can later search for. Also expand tests slightly
to exercise three more templates.
 - Legacy-Id: 7129
2014-01-15 17:52:00 +00:00
Ole Laursen 72db45734b Add missing sync notify page test, found by coverage check
- Legacy-Id: 7088
2014-01-09 17:13:10 +00:00
Ole Laursen d1782297ab assertEquals -> assertEqual in tests, the former is deprecated
- Legacy-Id: 6964
2013-12-17 12:52:24 +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 cfa0d47ca0 Port to new class-based generic redirect and simple template views, remove utils.lazy.reverse_lazy, it's now included in Django
- Legacy-Id: 6878
2013-12-11 16:36:09 +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 9457669310 Merge in changes from the old shimfree branch
- Legacy-Id: 6764
2013-11-27 12:55:50 +00:00
Henrik Levkowetz e4f4467725 Changed tests to use our own subclassed TestCase, and changed almost all fixtures to be perma_fixtures.
- Legacy-Id: 6320
2013-09-30 20:36:20 +00:00
Ole Laursen c191a691e0 Remove "names" fixture from all tests, since it's now loaded once just
after creating the test database through the global test fixture
mechanism - this speeds up multiple tests considerably
 - Legacy-Id: 6305
2013-09-29 17:35:59 +00:00
Ole Laursen 742dbace24 Move views and templatetags from idrfc/ to doc, the I-D specific views
go into views_draft.py and tests in tests_draft.py; what's left in
idrfc is wrapper code, templates and the ballot_icon templatetag
 - Legacy-Id: 6051
2013-08-14 10:32:25 +00:00
Ole Laursen ec2f0cabbf Delete dead code from idrfc, and delete some obsolete imports too
- Legacy-Id: 6001
2013-08-09 14:55:51 +00:00
Henrik Levkowetz 942efacb08 Added a guard to prevent duplicate RFC-Editor notifications for approved documents, and added logging to the notification routine.
- Legacy-Id: 5852
2013-07-23 22:28:19 +00:00
Henrik Levkowetz e678659b56 Merged in a lot of shim-layer removals from olau@iola.dk
(-r5194:5465 from branch/iola/shimfree).  Copying relevant
commit messages here:

  - Removed .related many to many relationship, it's not really useful
    since we always have to restrict on the relationship type anyway,
    instead add two helpers for doing the necessary queries (in both
    directions)

  - Added migration for transforming the .desc on the new_revision events
    into something more akin to what is actually shown in the history page

  - Added migration for blanking IESG notes that just consist of "RFC
    XXXX", these have been superfluous for some time

  - Grant stream chairs access to changing the stream on a draft

  - Hacked the format_history_text filter to be less weird, using the same
    formatting for snippets and full text, also link up legacy ballot set
    events

  - Moved the decoraters + utilities to new ietfauth/utils.py file

  - Added simple helper to Email to identify invalid email addresses (from
    legacy author entries)

  - Used new new_revision .desc format for when drafts are submitted

  - Improved the looks of the button class by adding extra contrast and a
    linear gradient. Currently the gradient is only visible in fairly
    recent browsers.

  - Rewrote draft and RFC tabs in terms of the new schema, porting
    write-up and history tabs as well

  - Fixed two bugs in RFC Editor syncing: make sure documents we don't know
    beforehand get a "draft" type and make sure individually submitted
    drafts get the type="individ" group instead of NULL

  - Made the CSS-styled button feel a bit nicer to use by flattening the
    active state, also introduce some temporary styles until browsers
    catch up with the standard syntax

  - Added migrations for fixing 1) a dummy RFC entry, 2) three stand-alone
    RFCs that didn't get their doc.type set, 3) a big bunch of historic
    stand-alone RFCs that have doc.group=None - set these to the
    individual submission "none" group for the time being so the view code
    doesn't have to deal with a special case.

    In some cases this is wrong since there actually was a WG associated
    but unfortunately fixing them properly requires detective work
    (probably parsing the RFCs) and in at least some cases recreating
    historic WGs. In case someone ends up doing this, the documents to
    check can still be found with

    Document.objects.filter(name__startswith="rfc", group__type="individ")
    since there are almost no new RFCs that didn't went through the I-D
    process.

  - Merged the I-D and RFC views by showing I-D information on RFCs too.
    I-Ds that have been published as RFCs redirect to the RFC URL. Also
    support alias URLs so e.g. /doc/bcpXXXX redirects to /doc/rfcXXXX.

  - Fixed revision augmentation so events after RFC publication gets a "RFC"
    designation

  - Fixed a bug with tabs not using provided name but rather doc.name

  - Displaying draft-iesg state rather than doc.friendly_state as IESG state,
    also show a notice that the IESG state refers to post-RFC processing
    if it does, like the old separate RFC page did

  - Fixed the RFC number doc.note migration to catch combined "RFC XXX; BCP
    XXX" notes too, use the opportunity to remove inserted HTML tags from
    notes and rely on linebreaksbr filter instead (the other thing was a
    left-over from the Perl days), update the various uses of the note to
    reflect that

  - Refactored slightly to make views_doc.py independent of other idrfc code

  - Moveed idrfc/views_doc.py to doc/ with associated templates, replace the
    somewhat fragile simple URL tests for views_doc.py with ordinary unit
    tests. The new tests are still fairly basic but at least test more
    than the URL tests did.

  - Made sure RFC's (and BCP/STD/FYI) are stored as RFC123 instead of
    RFC0123 in the alias table with a new migration and a change to the
    RFC Editor sync, this in turn makes /doc/std1/ do the right thing

  - Now /doc/std1/ works, we can actually do a local link in
    urlize_ietf_docs rather than linking to the tools.ietf.org server

  - Fixed history text formatter: sanitize HTML before adding linebreaks and
    non-breaking spaces, this cuts the time to render a history page with
    long comments in half

  - Added a test crawler that walks through the crawlable part of the site,
    reporting errors and slow pages

  - Got rid of initial "No record" positions when showing old positions,
    it's just noise

  - Added a .select_related() to the document main tab to reduce the number
    of DB queries, unfortunately it seems it doesn't really help with
    Django 1.2.x due to a bug (Document inherits from DocumentInfo which
    makes things a bit more complicated)

  - Introduced a simple cache in doc.get_state so repeated reads don't
    cause a DB query

  - Cleaned up the search code in preparation for removal of the shim-layer;
    use a static button and don't send extraneous GET parameters

  - Removed dead code in several places
 - Legacy-Id: 5830
2013-07-15 20:55:24 +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 a4d486ab26 Use argument 'draft' for document instead of 'approved_draft_name' when sending sync notifications to the RFC-Editor.
- Legacy-Id: 5776
2013-06-09 17:55:47 +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 8eec9ccb15 Don't actually do a post to the rfc-editor's state sync interface for a publication request when not in production mode.
- Legacy-Id: 5773
2013-06-03 20:49:40 +00:00
Henrik Levkowetz c72ab5daa3 Added alternative names for 2 iana states which seems to have changed name since the code was originally deployed. Also added a guard against sending state change emails when the iana state hasn't actually changed.
- Legacy-Id: 5718
2013-05-09 20:07:40 +00:00
Henrik Levkowetz f2c4ed9f24 Changed additional places to use IANA sync settings from settings.py
- Legacy-Id: 5681
2013-04-21 15:57:56 +00:00
Henrik Levkowetz 53b1719860 Merged [5645],[5646] and [5647] from olau@iola.dk:
Added support for notifying the RFC Editor upon draft approval

Added action to post to RFC Editor on non-IESG publication requests too

Fixed a bug that the CC on the announcement copy sent to IANA wasn't
cleared causing people on the CC to get duplicate emails
 - Legacy-Id: 5680
2013-04-21 15:53:16 +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 2f3476690f In order that document states (which may be used by old documents) should not need to be removed when state machines change and states go out of use, all document states have a 'used' field. The code which accesses the state fields have not been requiring that used=True for the states returned, which is an error. Fixed this by adding 'used=True' to all State.objects.get() and State.objects.filter() call where it's relevant.
- Legacy-Id: 5486
2013-03-05 23:24:41 +00:00
Henrik Levkowetz 5f32828caa With RFC6410, there are only two RFC maturity levels, 'Proposed Standard' and 'Internet Standard'. Added a mapping between 'Internet Standard' and slug 'std', to be able to process newer RFC info from the RFC Editor.
- Legacy-Id: 5477
2013-03-02 17:03:15 +00:00
Henrik Levkowetz 5345b17eab Added a missing import.
- Legacy-Id: 5455
2013-02-24 20:15:20 +00:00
Ole Laursen 4b312de464 Introduce a simple cache in doc.get_state so repeated reads don't
cause a DB query
 - Legacy-Id: 5314
2013-01-21 14:01:33 +00:00
Henrik Levkowetz 37955bf2a6 Added an INSTALL file which holds a record of general and version-specific actions needed to install.
- Legacy-Id: 5304
2013-01-20 15:19:31 +00:00
Ole Laursen 0dc47254a0 ## Lines starting with '## ' will be removed from the log message.
## File(s) to commit recursively:
## ietf/sync/tests.py
Fix another test bug, bcp0001 has become bcp1
 - Legacy-Id: 5301
2013-01-18 16:09:24 +00:00
Ole Laursen f607fb7880 Fix test bug
- Legacy-Id: 5300
2013-01-18 15:25:57 +00:00
Ole Laursen 7998371ace Make sure RFC's (and BCP/STD/FYI) are stored as RFC123 instead of
RFC0123 in the alias table with a new migration and a change to the
RFC Editor sync, this in turn makes /doc/std1/ do the right thing
 - Legacy-Id: 5296
2013-01-18 13:47:31 +00:00
Ole Laursen 9ca9eb350d Fix two bugs in RFC Editor syncing: make sure documents we don't know
beforehand get a "draft" type and make sure individually submitted
drafts get the type="individ" group instead of NULL
 - Legacy-Id: 5282
2013-01-17 11:19:53 +00:00
Ole Laursen 3dccf596b2 Fix ordering bug in test code that shows up in MySQL but not in SQLite
- Legacy-Id: 5151
2012-12-21 12:44:55 +00:00
Ole Laursen f22b14a8a4 Fix really weird encoding issue with Python 2.6
- Legacy-Id: 5150
2012-12-21 11:46:42 +00:00
Henrik Levkowetz 1fbcd783f3 Merged branch/iola/statesync up to @5118 to trunk.
- Legacy-Id: 5147
2012-12-20 20:32:03 +00:00
Ole Laursen 819e80f033 Fix quoting bug in AUTH48 links
- Legacy-Id: 5118
2012-12-11 15:16:31 +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 e29bd99283 Add test of RFC Editor redaction feature
- Legacy-Id: 5027
2012-11-07 15:19:45 +00:00