Jennifer Richards
36c43c8520
chore: add task tests; move message task to message app ( #6964 )
...
* test: Test send_review_reminders_task
* refactor: Move send_scheduled_mail_task to message app
* chore: Remove unused import
* test: Add Message/SendQueue factories
* test: Test send_scheduled_mail_task
* test: Reset mocks before reuse
* test: Cover error conditions
* test: Return non-empty change set
* test: Test SMTPException handling
* test: Test fetch_attendance_from_meetings()
* test: Test RuntimeError handling
* test: RFC index sync should populate authors
2024-01-24 08:53:42 -06:00
Jennifer Richards
7f5c3a3699
refactor: Remove length limit on Message header fields ( #5455 )
2023-03-31 09:37:46 +09:00
Jennifer Richards
6b826fd985
refactor: Purge old migrations and update ci to build on a clean schema ( #5431 )
...
* refactor: Remove all existing migrations
* refactor: Create clean set of migrations
* chore: Skip check_statetype_slugs when DB is not yet populated
* fix: Do not cache active_groups_menu on module import
* fix: Do not patch timezone awareness out of oidc-provider
* refactor: Migrate to create postgres schema, only use pgloader for data
* ci: Use migration scripts from feat/pg-migrations branch
* Revert "ci: Use migration scripts from feat/pg-migrations branch"
This reverts commit c82f64c614241ccede4865a50d494725c8a47c15.
* ci: Run check before migrate
* fix: Remove redundant migration caused by merge error
* chore: Add casts/ALTER TABLEs to eliminate pgloader errors/warnings
* chore: Change schema name to match docker image assumptions
* chore: Clear out schema so we get a clean start in case of a retry
2023-03-28 18:06:07 +09:00
Jennifer Richards
448cfbb13d
fix: more timezone fixes in liaisons/meeting/message apps
2022-09-27 15:50:10 -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
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
088033d843
Added matching indexes to a number of models with ordering by multiple keys.
...
- Legacy-Id: 18664
2020-11-09 19:41:12 +00:00
Henrik Levkowetz
f93270e0f6
Changed the API to not export saved Message instances (they can contain information such as draft confirmation codes and password reset codes that should not be generally visible).
...
- Legacy-Id: 18375
2020-08-15 09:37:05 +00:00
Henrik Levkowetz
bc05e7a8d0
Refactored many instances of msg.get_payload(decode=True).decode('utf-8') and similar to get_payload_text(msg), which uses msg.get_charset() to get the actual charset to do the decoding, in a consistent manner. Also removed some instances of force_str, but more remain.
...
- Legacy-Id: 17807
2020-05-16 20:20:05 +00:00
Henrik Levkowetz
9aeda11a29
Removed some Py2 compatibility decorators.
...
- Legacy-Id: 17673
2020-04-21 13:54:31 +00:00
Henrik Levkowetz
f10ddadc0e
Merged in changes from trunk up to r17584.
...
- Legacy-Id: 17593
2020-04-07 16:02:52 +00:00
Henrik Levkowetz
353fad160f
Changed some fields to raw_id_fields in the MessageAdmin.
...
- Legacy-Id: 17587
2020-04-03 16:29:54 +00:00
Henrik Levkowetz
726fcbf27d
Removed all __future__ imports.
...
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz
34e6cae7d3
Added more complete help text to the show_messages and send_messags management commands.
...
- Legacy-Id: 17361
2020-02-27 20:24:31 +00:00
Henrik Levkowetz
a7982f1f67
Added a missing __init__.py
...
- Legacy-Id: 17353
2020-02-26 21:31:54 +00:00
Henrik Levkowetz
7448037c65
Tweaked the show_messages managment command output.
...
- Legacy-Id: 17352
2020-02-26 21:28:51 +00:00
Henrik Levkowetz
3562af0b9b
Added management commands to show saved messages (unsent and otherwise) and to send or re-send saved messages as needed.
...
- Legacy-Id: 17351
2020-02-26 18:14:29 +00:00
Henrik Levkowetz
46ab91ec1d
Added a migration to set an explicit content-type for Message objects when missing.
...
- Legacy-Id: 17350
2020-02-26 18:07:48 +00:00
Henrik Levkowetz
0b3ac2ac0e
Added a migration to correct Message fields containing strings that are repr() of list instances instead of comma-separated email addresses.
...
- Legacy-Id: 17349
2020-02-26 18:06:52 +00:00
Henrik Levkowetz
fb740ff6bf
Added saving of outgoing emails as Message instances, with accompanying test.
...
- Legacy-Id: 17348
2020-02-26 18:04:44 +00:00
Henrik Levkowetz
3227e42543
Slight refactoring of infer_message() and send_scheduled_message_from_send_queue(), and added setting of Message.sent when sent.
...
- Legacy-Id: 17347
2020-02-26 18:03:12 +00:00
Henrik Levkowetz
2b1014d66c
Added a 'sent' field to Message, to be able to track sent status for captured outgoing messages (which don't have a SendQueue instance).
...
- Legacy-Id: 17340
2020-02-26 17:09:06 +00:00
Henrik Levkowetz
8e313e4ed5
Adjusted migrations for Python2/3 compatibility.
...
- Legacy-Id: 16633
2019-08-08 17:11:14 +00:00
Henrik Levkowetz
ea8c84d2f6
Python2/3 compatibility: used @python_2_unicode_compatible to provide __unicode__() versions of __str__() methods.
...
- Legacy-Id: 16455
2019-07-15 18:01:26 +00:00
Henrik Levkowetz
99a7f9c263
Python2/3 compatibility: Added force_str or force_bytes in some places, to ensure the argument right type
...
- Legacy-Id: 16453
2019-07-15 17:13:46 +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
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
36cac48063
Fixed a bunch of str/bytes issues.
...
- Legacy-Id: 16341
2019-06-30 20:54:09 +00:00
Henrik Levkowetz
15e74e89cb
Converted instances of assertTrue(text in response.content) to the recommended assertContains(response, text), and similar for assertFalse(... in ...)
...
- Legacy-Id: 16336
2019-06-29 13:43:31 +00:00
Henrik Levkowetz
70c00950b6
Fixed several email handling str/bytes issues.
...
- Legacy-Id: 16334
2019-06-29 13:30:36 +00:00
Henrik Levkowetz
484dcece5f
Changed all model __unicode__() methods to __str__()
...
- Legacy-Id: 16330
2019-06-28 21:07:08 +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
7270d5f67a
Added the option to order API resource lists by primary key, for stable ordering when paging through a list.
...
- Legacy-Id: 16284
2019-06-18 12:40:19 +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
815602351f
This is a series of 50 migrations that changes the Document and DocAlias
...
primary keys from character strings to integers, and makes corresponding code
changes.
This was prompted by database limitations discovered when trying to make
DocAlias use a m2m document field; with 255 long strings as primary keys for
Document and DocAlias this violated the MySQL database limitations.
Changing the primary keys to integers should also improve efficiency.
Due to the data migrations which create the new integer primary keys and adds
corresponding integer foreign keys matching the previous string foreign keys
in all tables having foreign keys to Document and DocAlias, some of these
migrations take a long time. The total set of migrations are expected to have
a runtime on the order of 2 hours.
- Legacy-Id: 16237
2019-06-10 11:32:46 +00:00
Henrik Levkowetz
682ddee8e4
Reverted earlier application of on_behalf_of() at mail sending call points, and instead did all on_behalf_of processing in condition_message(). Added insertion of Reply-To header fields in this case. Changed all use of the mail-sending 'extra' parameters to use value lists. Updated a bunch of tests accordingly.
...
- Legacy-Id: 16020
2019-03-11 17:01:33 +00:00
Henrik Levkowetz
435a0da12d
Added on_behalf_of() calls for from addresses needing it throughout the code.
...
- Legacy-Id: 15992
2019-03-04 20:14:19 +00:00
Robert Sparks
5c57cf1b91
Used factories instead of make_test_data for malinglists, mailtrigger, message, person, secr/announcement, and secr/areas tests. Commit ready for merge.
...
- Legacy-Id: 15551
2018-10-10 05:36:34 +00:00
Henrik Levkowetz
e87442f33a
Merged in [15282] from housley@vigilsec.com:
...
Set reply-to for I-D Announcements that include a CC to a mail list. Fixes #2530 .
- Legacy-Id: 15289
Note: SVN reference [15282] has been migrated to Git commit 733c304e3d
2018-07-10 17:16:47 +00:00
Henrik Levkowetz
a4768bb514
Removed unused imports. Added some explicit orderings to avoid pagination issues.
...
- Legacy-Id: 14664
2018-02-21 23:54:31 +00:00
Henrik Levkowetz
06362ec046
Got rid of old migrations and created new initial migrations.
...
- Legacy-Id: 14662
2018-02-21 23:46:22 +00:00
Henrik Levkowetz
5638cf3da3
Changed all usage of ForeignKey and OneToOneFiled in model.py files to the compatibility versions from ietf.utils.models.
...
- Legacy-Id: 14661
2018-02-20 15:36:05 +00:00
Ryan Cross
6772afdd24
Update secretariat admin permissions. Change AnnouncementFrom.address to CharField because full emails, with real name, fail EmailField validation. Includes migration. Commit ready for merge.
...
- Legacy-Id: 14104
2017-09-06 22:42:15 +00:00
Henrik Levkowetz
4dad8cdf9a
Added a test to check for missing admin models, and added the admin models that were currently missing.
...
- Legacy-Id: 14021
2017-08-01 14:00:29 +00:00
Henrik Levkowetz
e54a24b931
Added a couple of missing migrations.
...
- Legacy-Id: 14010
2017-07-31 12:11:08 +00:00
Henrik Levkowetz
868427a645
Merged in [13996] from rcross@amsl.com:
...
Move Announcement app From addresses out of code and into database table. Fixes #1681 .
- Legacy-Id: 14006
Note: SVN reference [13996] has been migrated to Git commit d49787a0f6060e7db64f5a0e684bf1d980f85290
2017-07-29 18:12:45 +00:00
Lars Eggert
8a70e9773d
Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
...
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00