Commit graph

101 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
Jennifer Richards ebebdbed3e
refactor: replace datetime.now and datetime.today with timezone.now (#4211)
* refactor: replace datetime.now with timezone.now

* refactor: migrate model fields to use timezone.now as default

* refactor: replace datetime.today with timezone.now

datetime.datetime.today() is equivalent to datetime.datetime.now(); both
return a naive datetime with the current local time.

* refactor: rephrase datetime.now(tz) as timezone.now().astimezone(tz)

This is effectively the same, but is less likely to encourage accidental
use of naive datetimes.

* refactor: revert datetime.today() change to old migrations

* refactor: change a missed datetime.now to timezone.now

* chore: renumber timezone_now migration

* chore: renumber migrations
2022-08-25 13:45:16 -03:00
Robert Sparks 10396d6f01
chore: remove more tools.ietf.org server only related things. (#4103)
* chore: remove more tools.ietf.org server only related things.

* chore: remove use of tools.ietf.org floorplans\n\nThe data will move into the FloorPlan models instead.
2022-06-22 14:11:46 -05:00
Lars Eggert c68446ae93 More select2 and test fixes.
- Legacy-Id: 19781
2021-12-14 18:19:12 +00:00
Ryan Cross 93d5d193e5 Change view /ipr/by-draft-recursive to use static content
- Legacy-Id: 19488
2021-10-28 18:45:07 +00:00
Robert Sparks 550c1233fe Change ipr pages to say General rather than Generic, and to change the text to note email submissions are not accepted. Fixes #3209. Commit ready for merge.
- Legacy-Id: 18886
2021-03-03 20:15:57 +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 0c4d58a9f7 Based on feedback from the Secretariat, changed the 404 for IPR declarations in other states than 'posted' to a 403 with a login link.
- Legacy-Id: 18333
2020-07-31 12:36:50 +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 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 d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz 426870b766 Merged in the Document and DocAlias primary key change and m2m work in ^/personal/henrik/6.96.1-docalias.
- Legacy-Id: 16261
2019-06-15 12:00:48 +00:00
Henrik Levkowetz a2cafded25 Changed DocAlias to be many-to-many, in order to be able to handle STD aliases referring to multiple RFCs.
- Legacy-Id: 16249
2019-06-14 20:38:14 +00:00
Henrik Levkowetz f6461d531c Added html escaping of initial text-area content in a view function to avoid mangling.
- Legacy-Id: 15989
2019-03-04 20:10:16 +00:00
Henrik Levkowetz ea7728b501 Changed calls to .related_that*() and .relations_that*() to use tuples rather than lists (a slight optimization).
- Legacy-Id: 15029
2018-04-07 10:47:16 +00:00
Henrik Levkowetz 9547646f81 Added a test for IPR edit.
- Legacy-Id: 14951
2018-03-27 17:55:11 +00:00
Henrik Levkowetz e830f0f976 Fill in the IPR edit form, section V, with patent information derived from the patent_info field, the same way we do for the IPR update form.
- Legacy-Id: 14950
2018-03-27 10:40:59 +00:00
Henrik Levkowetz 1ed8e967e7 Merged in ^/personal/henrik/6.72.1-django-1.11@14676: Upgrade to Django 1.11
- Legacy-Id: 14695
2018-02-25 19:55:16 +00:00
Henrik Levkowetz dc90fa3940 Changed user.is_authenticated and .is_anonymous from method calls to attribute access.
- Legacy-Id: 14668
2018-02-22 00:03:30 +00:00
Henrik Levkowetz d07411c62f Fixed an issue which could arise when updating IPR declarations with no value for patent_info.
- Legacy-Id: 14638
2018-02-10 22:37:16 +00:00
Henrik Levkowetz 46472401ad Changed the IPR disclosure page for IPR disclosure updates to show both the previous and current disclosure details side-by-side. Fixes issue #2414.
- Legacy-Id: 14581
2018-01-27 21:34:52 +00:00
Henrik Levkowetz 717868cae2 Rewrote text_to_dict() and dict_to_text() to support unicode without RFC2822 encoding issues. Added initial values in IPR update forms, from the original disclosure, in order to make updates easier. Addresses issue #2413.
- Legacy-Id: 14531
2018-01-17 00:21:34 +00:00
Henrik Levkowetz d7e1d258e5 Added a new section for IPR disclosures on related documents to the IPR document search result page. Fixes issue #2412.
- Legacy-Id: 14514
2018-01-11 18:03:29 +00:00
Russ Housley 6d616855bc Show which RFC was in force when the IPR disclosure was submitted. Fixes #2309.
- Legacy-Id: 14062
2017-08-21 14:30:20 +00:00
Ole Laursen 5b677dc6ba Merge author stats branch into new branch from trunk
- Legacy-Id: 13159
2017-03-28 14:36:40 +00:00
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Henrik Levkowetz 5f053ad21a Cleaned up the remaining explicit url names, using dotted-paths to view
functions instead.  In all almost 700 changes.
 - Legacy-Id: 12923
2017-02-26 23:21:49 +00:00
Henrik Levkowetz 876d4c93a4 Removed another explicit url() name which blocked a dotted-path reverse, causing 500 for ipr// urls.
- Legacy-Id: 12882
2017-02-19 19:52:56 +00:00
Henrik Levkowetz aa5e61d958 Updated all urlpatterns to use ietf.utils.urls.url() instead of django's,
in order to autogenerate dotted path url pattern names.  Updated a number
of url reverses to use dotted path, and removed explicit url pattern names
as needed.

Changed some imports to prevent import of ietf.urls before django
initialization was complete.


Changed 3 cases of form classes being curried to functions; django 1.10
didn't accept that.

Started converting old-style middleware classes to new-style middleware
functions (incomplete).

Tweaked a nomcom decorator to preserve function names and attributes, like
a good decorator should.

Replaced the removed django templatetag 'removetags' with our own version
which uses bleach, and does sanitizing in addition to removing explicitly
mentionied html tags.

Rewrote the filename argument handling in a management command which had
broken with the upgrade.
 - Legacy-Id: 12818
2017-02-11 14:43:01 +00:00
Henrik Levkowetz 7dea44e626 Added a change password page, and linked to it from the account profile page and user menu. Added zxcvbn-based browser-side password strength estimation on the various password setting, re-setting, and changing forms. Added a change password test. Changed ietfauth/urls.py to not use the deprecated string form for views in urlpatterns.
- Legacy-Id: 12798
2017-02-09 17:03:44 +00:00
Henrik Levkowetz 6c3a4015c5 Tweaked the IPR Details page to show the possible a), b), and c) choices under section 'V' when licensing declaration to be provided later has been chosen.
- Legacy-Id: 12793
2017-02-08 18:04:34 +00:00
Henrik Levkowetz db1cc15f1f Undid last commit
- Legacy-Id: 12792
2017-02-08 18:03:29 +00:00
Henrik Levkowetz 15628c698f Tweaked the IPR Details page to show the possible a), b), and c) choices under section 'V' when licensing declaration to be provided later has been chosen.
- Legacy-Id: 12791
2017-02-08 18:02:03 +00:00
Ole Laursen 9308948195 Add person, affiliation and country (through django-countries) to
DocumentAuthor, rename author field to email and make it optional (for
modeling old email-less submissions), remove the authors many to many
referencing field from Document as it is not really pointing the right
place.

Update the Secretariat tools to show affiliation and country.

Add migration for getting rid of the fake email addresses that the
migration script created some years ago (just set the author email
field to null).
 - Legacy-Id: 12739
2017-01-26 17:10:08 +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 658a5cecbb Add support for legacy IPR search arguments, for compatibility with old ipr search URLs.
- Legacy-Id: 11108
2016-04-07 18:00:08 +00:00
Henrik Levkowetz eabc7b2c76 Merged in [11070] from housley@vigilsec.com:
Only the Secretariat can see the history for parked IPR statements. Fixes #1922.
 - Legacy-Id: 11086
Note: SVN reference [11070] has been migrated to Git commit 570107dbf1
2016-04-03 13:35:45 +00:00
Ole Laursen 86c3a430d1 Merge in ^/branch/iola/event-saving-refactor-r10076, fixing a few problems
- Legacy-Id: 10298
2015-10-27 10:37:06 +00:00
Henrik Levkowetz 9ff8d77798 Merged in [10265] from rcross@amsl.com:
Fix IPR notice addresses formatting.
 - Legacy-Id: 10276
Note: SVN reference [10265] has been migrated to Git commit 68ce2cd299
2015-10-23 19:32:44 +00:00
Henrik Levkowetz f1a08564d1 Added a new machine-readable list of IPR declarations per draft, which also searches through related documents. Extended make_test_data() with a replaced document for the test draft.
- Legacy-Id: 10272
2015-10-23 16:34:44 +00:00
Ryan Cross 68ce2cd299 Fix IPR notice addresses formatting. Commit ready for merge
- Legacy-Id: 10265
2015-10-22 18:37:57 +00:00
Ole Laursen fd87b22030 Summary: Fix missing u in front of a format string (causes Unicode woes)
- Legacy-Id: 10104
2015-09-29 08:51:42 +00:00
Robert Sparks f5b6465e81 mailtoken becomes mailtrigger
- Legacy-Id: 10090
2015-09-17 20:03:45 +00:00
Robert Sparks 90c3426e2f updated mailtoken utilities to match the model refactor. Morphed all the code using the utilities to match. Added paths to get Cc through as needed. Next up: Recipient selection form for the iesg save-and-send-email workflow
- Legacy-Id: 10040
2015-08-23 18:15:06 +00:00
Robert Sparks 5db9e0d6a8 checkpoint
- Legacy-Id: 10029
2015-08-19 19:53:09 +00:00
Robert Sparks 093ff52eac Small things before second run at reworking IPR addressing
- Legacy-Id: 10028
2015-08-18 20:47:35 +00:00
Robert Sparks 23a2ada5f9 checkpoint
- Legacy-Id: 10027
2015-08-18 18:52:22 +00:00