retail.emails

Copyright (C) 2019 Gitcoin Core

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

render_kudos_email

render_kudos_email(to_email, kudos_transfer, is_new, html_template, text_template=None)

Summary

Args: to_emails (list): An array of email addresses to send the email to. kudos_transfer (model): An instance of the kudos.model.KudosTransfer object. This contains the information about the kudos that will be cloned. is_new (TYPE): Description

Returns: tup: response_html, response_txt

render_funder_stale

render_funder_stale(github_username, days=30, time_as_str='about a month')

Render the stale funder email template.

Args: github_username (str): The Github username to be referenced in the email. days (int): The number of days back to reference. time_as_str (str): The human readable length of time to reference.

Returns: str: The rendered response as a string.

render_share_bounty

render_share_bounty(to_email, msg, from_profile, invite_url=None, kudos_invite=False)

Render the share bounty email template.

Args: to_email: user to send the email to. msg: the message sent in the email.

Returns: str: The rendered response as a string.

funder_payout_reminder

funder_payout_reminder(request)

Display the funder payment reminder email template.

Params: username (str): The Github username to reference in the email.

Returns: HttpResponse: The HTML version of the templated HTTP response.

funder_stale

funder_stale(request)

Display the stale funder email template.

Params: limit (int): The number of days to limit the scope of the email to. duration_copy (str): The copy to use for associated duration text. username (str): The Github username to reference in the email.

Returns: HttpResponse: The HTML version of the templated HTTP response.