Commit graph

134 commits

Author SHA1 Message Date
Jennifer Richards 32054111df
fix: fix failing tests and eliminate naive datetime warnings (#4402)
* test: fix timestamp construction in several doc tests

* refactor: rename date2datetime to datetime_from_date and clarify code

* chore: helper to get tzinfo for PRODUCTION_TIMEZONE

* fix: fix timezone handling in make_last_call()

* test: fix datetime generation in doc.tests_charter

* refactor: remove PRODUCTION_TIMEZONE setting

Replaces the PRODUCTION_TIMEZONE setting with a constant,
DEADLINE_TZINFO, in ietf.utils.timezone.

* test: be more careful about timezone in tests_charter.py

* test: be more careful about timezone in doc/tests.py

* fix: fix timezone handling affecting doc.tests_draft

* fix: fix timezone handling affecting tests_irsg_ballot.py

* fix: fix timezone handling affecting tests_review.py

* fix: fix timezone handling affecting last ietf.doc tests

* fix: fix timezone handling affecting last ietf.group tests

* fix: fix timezone handling affecting ietf.iesg tests

* fix: handle timezones in get_8989_eligibility_querysets

* fix: handle timezones affecting ietfauth tests

* fix: return tz-aware datetime from utc_from_string

* fix: specify timezone for constants in ipr_rfc_number()

* fix: specify tz for ipr deadlines

* fix: handle timezones affecting liaisons tests

* fix: treat leap day in get_8989_eligibility_querysets()

Manual cherry-pick of 248d6474

* test: treat leap day properly in nomcom tests

* fix: fix timezone handling affecting nomcom tests

* test: fix timezone handling in review tests

* fix: fix timezone handling affecting secr.meetings tests

* fix: handle both pytz and zoneinfo timezones in ietf.utils.timezone

* fix: fix timezone handling affecting secr.proceedings tests

* refactor: use make_aware() helper in secr.meetings tests

* test: fix timezone handling in secr.telechat tests

* fix: fix timezone handling affecting stats tests

* fix: eliminate tz-naive helpers affecting sync email parsing

* fix: include timezone data when serializing DeletedEvent data

* fix: fix timezone handling affecting sync tests

* style: remove unused import
2022-09-01 13:07:28 -03:00
Robert Sparks da17e7c9a2 Merged in [19713] from lars@eggert.org:
Remove ietf/templates/iesg/scribe_template.html and related, 
    which is not used anymore according to the secretariat.
    (On merge, rjsparks@nostrum.com also removed the three other
     templates that only that one included, and removed the test
     that covered the view tht was removed).
 - Legacy-Id: 19732
Note: SVN reference [19713] has been migrated to Git commit 70420380f7
2021-12-01 22:50:13 +00:00
Russ Housley 8cfa4c264f Properly sort the management items on the IETG telechat agenda. Fixes #1374. Ready for merge.
- Legacy-Id: 19194
2021-07-03 19:32:04 +00:00
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 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz e9a37d8ac8 Removed six.text_type(), changed six.moves.urllib to plain urllib, and removed now unused six imports.
- Legacy-Id: 17385
2020-03-05 14:41:41 +00:00
Henrik Levkowetz 6482254a03 Merged in ^/branch/akayla/irsg/6.113.1.dev0 from peter@akayla.com.
This provides support for IRSG ballots, similar to the IESG ballots support which has been in use for quite some time.  The IRSG ballots differ from IESG ballots in a number of ways, described in detail in the RFP and SoW for this work and implemented here.
 - Legacy-Id: 17164
2019-12-20 15:00:55 +00:00
Peter E. Yee bb7e504d14 12/13 merged into 6.113.1.dev0 with migration ordering failure
- Legacy-Id: 17149
2019-12-13 19:53:45 +00:00
Henrik Levkowetz 513e60432b Added a 'domain' variable to context supplied to the agenda_package.txt template. Fixes issue #2793.
- Legacy-Id: 16707
2019-09-05 18:49:18 +00:00
Henrik Levkowetz bdc73e771a Python2/3 compatibility: replaced six.ensure_text() with either six.text_type or django's force_text(), depending on the case, and fixed a variable scope issue.
- Legacy-Id: 16461
2019-07-16 13:20:05 +00:00
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz 0679eaa8d4 Removed unused imports.
- Legacy-Id: 16402
2019-07-04 21:06:57 +00:00
Henrik Levkowetz f480799af9 Undid unintentional bulk commit
- Legacy-Id: 16401
2019-07-04 21:04:46 +00:00
Henrik Levkowetz fc09a59950 Added decode() of command pipe output.
- Legacy-Id: 16400
2019-07-04 21:01:39 +00:00
Henrik Levkowetz 8b52899459 Fixed some additional str/bytes issues.
- Legacy-Id: 16342
2019-06-30 20:56:56 +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 0bc7af8e0f Syntax fix
- Legacy-Id: 16231
2019-06-03 15:02:19 +00:00
Henrik Levkowetz 47cbb8cf1b Moved some explicit URLs from code and templates to settings (related to www6 cleanup).
- Legacy-Id: 16230
2019-06-03 14:53:30 +00:00
Russ Housley 268b99bd56 Add downward references to telechat moderator package and Secretariat telechat pages. Commit ready for merge.
- Legacy-Id: 16087
2019-03-23 15:36:07 +00:00
Henrik Levkowetz 421621eb51 Another round of iesg page optimizations. Reduced additional instances of individual lookups to a single lookup followed by annotation of document objects. Reduced several instances of repeating the same work multiple times (queries for telechat documents, queries for telechat dates).
- Legacy-Id: 15010
2018-04-05 11:03:26 +00:00
Henrik Levkowetz 675c652052 Additional changes to speed up the IESG agenda docs page: Changed telechat_page_count() to accept a list of documents if that's already been generated, to avoid double work. Changed the reviewed_by_teams list to provide acronyms directly, to avoid group lookups during template rendering. Provided page counts directly to the template instead of repeated (costly) filtering through telechat_page_count, with new document lookups. Removed the telechat_page_count template filter, due to its cost. Tweaked some lookups in fill_in_document_table_attributes() . Added to the select_related() list for documents in IESG agenda_documents().
- Legacy-Id: 14988
2018-04-01 18:51:48 +00:00
Henrik Levkowetz c1f8b1bb0b Changed some URLs to match new locations after the deployment of the new IETF website. Fixes issue #2434
- Legacy-Id: 14517
2018-01-12 13:54:20 +00:00
Robert Sparks d415d8658c Fixed a typo in the milestones under review view. Added bootstrap panels. Fixes #2427, Commit ready for merge.
- Legacy-Id: 14403
2017-12-07 21:12:56 +00:00
Henrik Levkowetz 8499beb010 Added a 'Recent documents' to the IESG pages.
- Legacy-Id: 14300
2017-11-04 12:36:13 +00:00
Henrik Levkowetz 7b95411f58 The context_instance parameter to render_to_response() and render_to_string() is now deprecated. Fixed this, and generally changed the idiom render_to_response('template.html', {}, RequestContext(request)) to the newer and simpler render(request, 'template.html', {}). About 200 instances.
- Legacy-Id: 12637
2017-01-09 21:26:30 +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 5159349959 Added an IESG photo page. Replaced navigation pills with a navtab on the IESG pages.
- Legacy-Id: 11277
2016-06-05 09:55:59 +00:00
Ole Laursen c061caaf04 Merge in changes from community-list-cleanup
- Legacy-Id: 10968
2016-03-23 13:31:24 +00:00
Henrik Levkowetz 174cfeafa3 Merged in [10770], [10771], [10772], and [10773] from housley@vigilsec.com:
The IESG Telechat Agenda now shows "(Has RFC Editor Note)" after the I-D
filename if there is an RFC Editor Note associated with the document.  This
was added to the html and txt versions of the agenda.  It was not added to the
Secretariat view or the Scribe view of the agenda.

For transition, when an AD edits the RFC Editor Note, they need to move the
text from the current writeup into the new field.  Returning documents on the
telechat agenda seems to be the biggest opportunity for something to fall
between the cracks.  If an event of type "changed_rfc_editor_note' exists, and
the string "RFC Editor Note" appears in the text of the most recent
'changed_ballot_writeup_text' event, then a message is shown that tells the AD
to remove the RFC Editor Note from the writeup.
 - Legacy-Id: 10783
Note: SVN reference [10770] has been migrated to Git commit 4b5ac9e09e

Note: SVN reference [10771] has been migrated to Git commit 46589ee421

Note: SVN reference [10772] has been migrated to Git commit c73659e95c

Note: SVN reference [10773] has been migrated to Git commit 2e6633c016
2016-02-05 22:18:14 +00:00
Russ Housley 4b5ac9e09e Indicate on the IESG Telechat Agenda if a document has an RFC Editor Note. To accomplish this, the RFC Editor Note needed to be separated from the rest of the ballot write up. Fixes #1230.
- Legacy-Id: 10770
2016-02-04 13:32:24 +00:00
Ole Laursen 197bc07771 Refactor search-related utilities slightly to make them more
independent of the search form, to enable them to be reused in the
community lists.

Also clean up the related code a bit, use SearchForm to handle other
document types, and fix missing ids in the HTML so that one can click
the "by" labels to hit the corresponding radio button.
 - Legacy-Id: 10729
2016-01-25 18:11:49 +00:00
Robert Sparks 67f0234cac Refactored counting telechat pages to do it only in one place. Count more accurately and make it possible to report more granularly. Added page counts to agenda.json. Commit ready to merge.
- Legacy-Id: 10636
2016-01-07 23:31:05 +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 625347cd2f Merged trunk@9354 to facelift copy
- Legacy-Id: 9357
2015-04-02 06:51:34 +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
Ole Laursen eccd8d27c4 Make new branch from trunk (r9007) and merge facelift-r8876 into it, fixing a few merge conflicts
- Legacy-Id: 9014
2015-02-06 14:08:34 +00:00
Ole Laursen b5458c29d3 Summary: Clean up some of the FACELIFT comments
- Legacy-Id: 8959
2015-02-03 16:18:42 +00:00
Robert Sparks 65804be683 This is the second step towards ADs out of GroupInfo into Role.
The use of group.ad has been scrubbed from the code and templates.
  - Those places that set group.ad have been directly manipulate Role objects instead
  - Most places that read group.ad now use a new group.ad_role() that returns a Role object, simplifing some views.

Related to #1555 and #1557.

Commit ready for merge.
 - Legacy-Id: 8854
2015-01-09 18:52:06 +00:00
Robert Sparks 4c9db8f250 This is the first step towards using Role to represent Area directors. It
- Migrates the information captured in GroupInfo.ad to Role objects.
- Renames GroupInfo.ad to GroupInfo._ad (retaining the current column name) to prepare for deletion of that field.
- Provides ad property accessor and setter methods implemented using the group's role_set (so that the existing view code continues to work with minimal changes)
- Improved selection in many querysets that assumed only groups of type 'area' would have area directors.

Related to #1557 and #1555.

Commit ready to merge.
 - Legacy-Id: 8851
2015-01-08 20:22:23 +00:00
Ole Laursen 41cb195f52 Rebase /personal/lars/5.6.4-facelift/ on trunk
- Legacy-Id: 8520
2014-10-30 14:31:07 +00:00
Lars Eggert a4daf2630c Merge branch 'lars/5.6.3-facelift' into lars/5.6.4-facelift
Conflicts:
	ietf/doc/templatetags/ietf_filters.py
	ietf/doc/views_charter.py
	ietf/templates/doc/charter/edit_notify.html
	ietf/templates/doc/charter/edit_telechat_date.html
	ietf/templates/doc/document_ballot_content.html
	ietf/templates/doc/document_history.html
	ietf/templates/doc/edit_notify.html
	ietf/templates/doc/edit_telechat_date.html
	ietf/templates/doc/notify.html
	ietf/templates/group/concluded_groups.html
 - Legacy-Id: 8429
2014-10-14 11:48:57 +00:00
Robert Sparks feb57a04f0 Replaces the return_to_url notion with logic that uses the session object. Related to bug #1430.
- Legacy-Id: 8305
2014-09-11 20:41:59 +00:00
Henrik Levkowetz f20a5d0cfb Changed URLs with explicit scheme from http to https.
- Legacy-Id: 7555
2014-03-31 00:25:08 +00:00
Henrik Levkowetz 8f6a21daf6 Made ietf/iesg pyflakes-clean.
- Legacy-Id: 7467
2014-03-15 17:38:56 +00:00
Ole Laursen 7e00fa1424 Move the Secretariat group email utility to wginfo and the rest of the wgcharter stuff to doc/(views|urls|utils)_charter.py alongside the other document types
- Legacy-Id: 7121
2014-01-13 16:08:58 +00:00
Ole Laursen 7f277a8fbb Replace user.get_profile() with user.person, the profile stuff is deprecated since Django 1.5
- Legacy-Id: 6968
2013-12-18 10:13:40 +00:00
Ole Laursen 84a9f49053 mimetype -> content_type (mimetype is deprecated)
- Legacy-Id: 6945
2013-12-16 16:53:47 +00:00
Ole Laursen 6a98fec2c3 Use built-in json module in Python instead of simplejson bundled with Django
- Legacy-Id: 6883
2013-12-11 16:59:19 +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