Index
hypha.apply.activity.adapters
¶
ActivityAdapter
¶
Bases: AdapterBase
messages
class-attribute
instance-attribute
¶
messages = {MESSAGES.TRANSITION: 'handle_transition', MESSAGES.BATCH_TRANSITION: 'handle_batch_transition', MESSAGES.NEW_SUBMISSION: _('Submitted {source.title_text_display} for {source.page.title}'), MESSAGES.EDIT_SUBMISSION: _('edited the submission'), MESSAGES.APPLICANT_EDIT: _('edited the submission'), MESSAGES.UPDATE_LEAD: _('updated Lead from {old_lead} to {source.lead}'), MESSAGES.BATCH_UPDATE_LEAD: _('batch updated Lead to {new_lead}'), MESSAGES.DETERMINATION_OUTCOME: _('sent a determination. Outcome: {determination.clean_outcome}'), MESSAGES.BATCH_DETERMINATION_OUTCOME: 'batch_determination', MESSAGES.INVITED_TO_PROPOSAL: _('Invited to submit a proposal'), MESSAGES.REVIEWERS_UPDATED: 'reviewers_updated', MESSAGES.BATCH_REVIEWERS_UPDATED: 'batch_reviewers_updated', MESSAGES.NEW_REVIEW: _('Submitted a review'), MESSAGES.OPENED_SEALED: _('Opened the submission while still sealed'), MESSAGES.SCREENING: 'handle_screening_statuses', MESSAGES.REVIEW_OPINION: _('{opinion.opinion_display}s with {opinion.review.author}s review of {source}'), MESSAGES.DELETE_REVIEW_OPINION: _('deleted the opinion for review: {review_opinion.review}'), MESSAGES.CREATED_PROJECT: _('Created project with initial status of "{status}"'), MESSAGES.CREATED_SOW: _('Created SOW for project "{related.project}"'), MESSAGES.EDITED_SOW: _('Edited SOW for project "{related.project}"'), MESSAGES.CREATED_PF: _('Created project form for project "{related.project}"'), MESSAGES.EDITED_PF: _('Edited project form for project "{related.project}"'), MESSAGES.PROJECT_TRANSITION: 'handle_project_transition', MESSAGES.UPDATE_PROJECT_TITLE: _('updated the project title from {old_title} to {source.title}'), MESSAGES.UPDATE_PROJECT_CONTRACT_NUMBER: _('updated contract number to {source.contract_number}'), MESSAGES.UPDATE_PROJECT_LEAD: _('update Lead from {old_lead} to {source.lead}'), MESSAGES.SEND_FOR_APPROVAL: _('Requested approval'), MESSAGES.APPROVE_PAF: 'handle_paf_assignment', MESSAGES.APPROVE_PROJECT: _('Approved'), MESSAGES.REQUEST_PROJECT_CHANGE: _('requested changes for acceptance'), MESSAGES.SUBMIT_CONTRACT_DOCUMENTS: _('Submitted Contract Documents'), MESSAGES.UPLOAD_CONTRACT: _('Uploaded a {contract.state} contract'), MESSAGES.APPROVE_CONTRACT: _('Approved contract'), MESSAGES.UPDATE_INVOICE_STATUS: 'handle_update_invoice_status', MESSAGES.CREATE_INVOICE: _('Invoice added'), MESSAGES.SUBMIT_REPORT: _('Submitted a report'), MESSAGES.DELETE_REPORT: _('deleted a report'), MESSAGES.SKIPPED_REPORT: 'handle_skipped_report', MESSAGES.REPORT_FREQUENCY_CHANGED: 'handle_report_frequency', MESSAGES.DISABLED_REPORTING: _('disabled reporting'), MESSAGES.BATCH_DELETE_SUBMISSION: 'handle_batch_delete_submission', MESSAGES.BATCH_ARCHIVE_SUBMISSION: 'handle_batch_archive_submission', MESSAGES.BATCH_UPDATE_INVOICE_STATUS: 'handle_batch_update_invoice_status', MESSAGES.ARCHIVE_SUBMISSION: _('archived this submission'), MESSAGES.UNARCHIVE_SUBMISSION: _('un-archived this submission'), MESSAGES.DELETE_INVOICE: _('deleted an invoice'), MESSAGES.REMOVE_TASK: 'handle_task_removal', MESSAGES.UPDATE_AUTHOR: _('updated author from {old_author} to {source.user}')}
message
¶
Source code in hypha/apply/activity/adapters/base.py
render_message
¶
get_neat_related
¶
Source code in hypha/apply/activity/adapters/base.py
batch_recipients
¶
Source code in hypha/apply/activity/adapters/base.py
process_batch
¶
Source code in hypha/apply/activity/adapters/base.py
process
¶
Source code in hypha/apply/activity/adapters/base.py
process_send
¶
process_send(message_type, recipients, events, request, user, source, sources=None, related=None, **kwargs)
Source code in hypha/apply/activity/adapters/base.py
create_logs
¶
Source code in hypha/apply/activity/adapters/base.py
log_kwargs
¶
recipients
¶
extra_kwargs
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
reviewers_updated
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
batch_reviewers_updated
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
batch_determination
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
handle_batch_delete_submission
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
handle_batch_archive_submission
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
handle_batch_update_invoice_status
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
handle_paf_assignment
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
handle_task_removal
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
handle_transition
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
handle_project_transition
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
handle_batch_transition
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
handle_report_frequency
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
handle_skipped_report
¶
handle_update_invoice_status
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
send_message
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
handle_screening_statuses
¶
Source code in hypha/apply/activity/adapters/activity_feed.py
AdapterBase
¶
message
¶
Source code in hypha/apply/activity/adapters/base.py
render_message
¶
extra_kwargs
¶
get_neat_related
¶
Source code in hypha/apply/activity/adapters/base.py
recipients
¶
batch_recipients
¶
Source code in hypha/apply/activity/adapters/base.py
process_batch
¶
Source code in hypha/apply/activity/adapters/base.py
process
¶
Source code in hypha/apply/activity/adapters/base.py
process_send
¶
process_send(message_type, recipients, events, request, user, source, sources=None, related=None, **kwargs)
Source code in hypha/apply/activity/adapters/base.py
create_logs
¶
Source code in hypha/apply/activity/adapters/base.py
log_kwargs
¶
EmailAdapter
¶
Bases: AdapterBase
messages
class-attribute
instance-attribute
¶
messages = {MESSAGES.NEW_SUBMISSION: 'messages/email/submission_confirmation.html', MESSAGES.DRAFT_SUBMISSION: 'messages/email/submission_confirmation.html', MESSAGES.INVITE_COAPPLICANT: 'handle_co_applicant_invite', MESSAGES.COMMENT: 'notify_comment', MESSAGES.EDIT_SUBMISSION: 'messages/email/submission_edit.html', MESSAGES.TRANSITION: 'handle_transition', MESSAGES.BATCH_TRANSITION: 'handle_batch_transition', MESSAGES.DETERMINATION_OUTCOME: 'handle_determination', MESSAGES.BATCH_DETERMINATION_OUTCOME: 'handle_batch_determination', MESSAGES.INVITED_TO_PROPOSAL: 'messages/email/invited_to_proposal.html', MESSAGES.BATCH_READY_FOR_REVIEW: 'handle_batch_ready_for_review', MESSAGES.READY_FOR_REVIEW: 'handle_ready_for_review', MESSAGES.REVIEWERS_UPDATED: 'handle_ready_for_review', MESSAGES.BATCH_REVIEWERS_UPDATED: 'handle_batch_ready_for_review', MESSAGES.UPLOAD_CONTRACT: 'messages/email/contract_uploaded.html', MESSAGES.SUBMIT_CONTRACT_DOCUMENTS: 'messages/email/submit_contract_documents.html', MESSAGES.CREATED_PROJECT: 'messages/email/project_created.html', MESSAGES.SENT_TO_COMPLIANCE: 'messages/email/sent_to_compliance.html', MESSAGES.REQUEST_PROJECT_CHANGE: 'messages/email/project_request_change.html', MESSAGES.ASSIGN_PAF_APPROVER: 'messages/email/assign_paf_approvers.html', MESSAGES.APPROVE_PAF: 'messages/email/paf_for_approval.html', MESSAGES.CREATE_INVOICE: 'messages/email/invoice_created.html', MESSAGES.UPDATE_INVOICE: 'handle_invoice_updated', MESSAGES.UPDATE_INVOICE_STATUS: 'handle_invoice_status_updated', MESSAGES.APPROVE_INVOICE: 'messages/email/invoice_approved.html', MESSAGES.SUBMIT_REPORT: 'messages/email/report_submitted.html', MESSAGES.SKIPPED_REPORT: 'messages/email/report_skipped.html', MESSAGES.REPORT_FREQUENCY_CHANGED: 'messages/email/report_frequency.html', MESSAGES.REPORT_NOTIFY: 'messages/email/report_notify.html', MESSAGES.REVIEW_REMINDER: 'messages/email/ready_to_review.html', MESSAGES.PROJECT_TRANSITION: 'handle_project_transition', MESSAGES.UPDATE_AUTHOR: 'messages/email/author_updated.html', MESSAGES.COMMENT_ASSIGNED: 'messages/email/comment_assigned.html'}
message
¶
Source code in hypha/apply/activity/adapters/base.py
get_neat_related
¶
Source code in hypha/apply/activity/adapters/base.py
process_batch
¶
Source code in hypha/apply/activity/adapters/base.py
process
¶
Source code in hypha/apply/activity/adapters/base.py
process_send
¶
process_send(message_type, recipients, events, request, user, source, sources=None, related=None, **kwargs)
Source code in hypha/apply/activity/adapters/base.py
create_logs
¶
Source code in hypha/apply/activity/adapters/base.py
log_kwargs
¶
get_subject
¶
Source code in hypha/apply/activity/adapters/emails.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
extra_kwargs
¶
handle_transition
¶
Source code in hypha/apply/activity/adapters/emails.py
handle_co_applicant_invite
¶
Source code in hypha/apply/activity/adapters/emails.py
handle_batch_transition
¶
Source code in hypha/apply/activity/adapters/emails.py
handle_project_transition
¶
Source code in hypha/apply/activity/adapters/emails.py
handle_invoice_status_updated
¶
Source code in hypha/apply/activity/adapters/emails.py
handle_invoice_updated
¶
handle_determination
¶
Source code in hypha/apply/activity/adapters/emails.py
handle_batch_determination
¶
Source code in hypha/apply/activity/adapters/emails.py
handle_ready_for_review
¶
handle_batch_ready_for_review
¶
Source code in hypha/apply/activity/adapters/emails.py
notify_comment
¶
Source code in hypha/apply/activity/adapters/emails.py
recipients
¶
Source code in hypha/apply/activity/adapters/emails.py
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | |
batch_recipients
¶
Source code in hypha/apply/activity/adapters/emails.py
reviewers
¶
render_message
¶
send_message
¶
Source code in hypha/apply/activity/adapters/emails.py
SlackAdapter
¶
Bases: AdapterBase
Notification Adaptor for internal staff on the configured slack channels.
Source code in hypha/apply/activity/adapters/slack.py
messages
class-attribute
instance-attribute
¶
messages = {MESSAGES.NEW_SUBMISSION: _('A new submission has been submitted for {source.page.title}: <{link}|{source.title_text_display}> by {user}'), MESSAGES.UPDATE_LEAD: _('The lead of <{link}|{source.title_text_display}> has been updated from {old_lead} to {source.lead} by {user}'), MESSAGES.BATCH_UPDATE_LEAD: 'handle_batch_lead', MESSAGES.COMMENT: _('A new {comment.visibility} comment has been posted on <{link}|{source.title}> by {user}'), MESSAGES.EDIT_SUBMISSION: _('{user} has edited <{link}|{source.title_text_display}>'), MESSAGES.APPLICANT_EDIT: _('{user} has edited <{link}|{source.title_text_display}>'), MESSAGES.REVIEWERS_UPDATED: 'reviewers_updated', MESSAGES.BATCH_REVIEWERS_UPDATED: 'handle_batch_reviewers', MESSAGES.TRANSITION: _('{user} has updated the status of <{link}|{source.title_text_display}>: {old_phase.display_name} → {source.phase.display_name}'), MESSAGES.BATCH_TRANSITION: 'handle_batch_transition', MESSAGES.DETERMINATION_OUTCOME: 'handle_determination', MESSAGES.BATCH_DETERMINATION_OUTCOME: 'handle_batch_determination', MESSAGES.PROPOSAL_SUBMITTED: _('A proposal has been submitted for review: <{link}|{source.title_text_display}>'), MESSAGES.INVITED_TO_PROPOSAL: _('<{link}|{source.title_text_display}> by {source.user} has been invited to submit a proposal'), MESSAGES.NEW_REVIEW: _('{user} has submitted a review for <{link}|{source.title_text_display}>. Outcome: {review.outcome}, Score: {review.get_score_display}'), MESSAGES.READY_FOR_REVIEW: 'notify_reviewers', MESSAGES.OPENED_SEALED: _('{user} has opened the sealed submission: <{link}|{source.title_text_display}>'), MESSAGES.REVIEW_OPINION: _('{user} {opinion.opinion_display}s with {opinion.review.author}s review of <{link}|{source.title_text_display}>'), MESSAGES.BATCH_READY_FOR_REVIEW: 'batch_notify_reviewers', MESSAGES.DELETE_SUBMISSION: _('{user} has deleted {source.title_text_display}'), MESSAGES.ANONYMIZE_SUBMISSION: _('{user} has anonymized {source.title_text_display}'), MESSAGES.DELETE_REVIEW: _('{user} has deleted {review.author} review for <{link}|{source.title_text_display}>'), MESSAGES.DELETE_REVIEW_OPINION: _('{user} has deleted {review_opinion.author} review opinion for <{link}|{source.title_text_display}>'), MESSAGES.CREATED_PROJECT: _('{user} has created a Project: <{link}|{source.title}>'), MESSAGES.UPDATE_PROJECT_LEAD: _('The lead of project <{link}|{source.title}> has been updated from {old_lead} to {source.lead} by {user}'), MESSAGES.UPDATE_PROJECT_TITLE: _('The project title has been updated from <{link}|{old_title}> to <{link}|{source.title}> by {user}'), MESSAGES.UPDATE_PROJECT_CONTRACT_NUMBER: _('The contract number of project <{link}|{source.title}> has been updated to {source.contract_number} by {user}'), MESSAGES.EDIT_REVIEW: _('{user} has edited {review.author} review for <{link}|{source.title_text_display}>'), MESSAGES.SEND_FOR_APPROVAL: _('{user} has requested approval on project <{link}|{source.title}>'), MESSAGES.APPROVE_PROJECT: _('{user} has approved project <{link}|{source.title}>'), MESSAGES.REQUEST_PROJECT_CHANGE: _('{user} has requested changes for project acceptance on <{link}|{source.title}>'), MESSAGES.UPLOAD_CONTRACT: _('{user} has uploaded a contract for <{link}|{source.title}>'), MESSAGES.SUBMIT_CONTRACT_DOCUMENTS: _('{user} has submitted the contracting document for project <{link}|{source.title}>'), MESSAGES.APPROVE_CONTRACT: _('{user} has approved contract for <{link}|{source.title}>'), MESSAGES.CREATE_INVOICE: _('{user} has created invoice for <{link}|{source.title}>'), MESSAGES.UPDATE_INVOICE_STATUS: _('{user} has changed the status of <{link_related}|invoice> on <{link}|{source.title}> to {invoice.status_display}'), MESSAGES.DELETE_INVOICE: _('{user} has deleted invoice from <{link}|{source.title}>'), MESSAGES.UPDATE_INVOICE: _('{user} has updated invoice for <{link}|{source.title}>'), MESSAGES.SUBMIT_REPORT: _('{user} has submitted a report for <{link}|{source.title}>'), MESSAGES.DELETE_REPORT: _('{user} has deleted a report for <{link}|{source.title}>'), MESSAGES.BATCH_DELETE_SUBMISSION: 'handle_batch_delete_submission', MESSAGES.BATCH_ANONYMIZE_SUBMISSION: 'handle_batch_anonymize_submission', MESSAGES.STAFF_ACCOUNT_CREATED: _('{user} has created a new account for <{link}|{source}>'), MESSAGES.STAFF_ACCOUNT_EDITED: _('{user} has edited account for <{link}|{source}> that now has following roles: {roles}'), MESSAGES.BATCH_ARCHIVE_SUBMISSION: 'handle_batch_archive_submission', MESSAGES.ARCHIVE_SUBMISSION: _('{user} has archived the submission: {source.title_text_display}'), MESSAGES.UNARCHIVE_SUBMISSION: _('{user} has unarchived the submission: {source.title_text_display}'), MESSAGES.UPDATE_AUTHOR: _('{user} has updated author from {old_author} to {source.user} for submission <{link}|{source}>'), MESSAGES.COMMENT_ASSIGNED: _('A new comment has been assigned to {assignee} by {user} on submission <{link}|{source}>')}
message
¶
Source code in hypha/apply/activity/adapters/base.py
render_message
¶
get_neat_related
¶
Source code in hypha/apply/activity/adapters/base.py
process_batch
¶
Source code in hypha/apply/activity/adapters/base.py
process
¶
Source code in hypha/apply/activity/adapters/base.py
process_send
¶
process_send(message_type, recipients, events, request, user, source, sources=None, related=None, **kwargs)