예제 #1
0
def get_recurring_cancelled_donor_text(subscription):
    return _("""DONATION CANCELLED\n
\n
Dear %(name)s,\n
Thanks very much for your recent support.\n
Your recurring donation to HKFP has been suspended at your request - no further payments will be processed.\n
Sign into our support page(%(siteurl)s) (click "forgot password?" if you have trouble logging in) if you wish to support us again in the future. Please email [email protected] if you have any further enquiries.\n
From all of us, thank you for backing our team and helping us keep independent media alive in Hong Kong!\n
Details of your recurring donation:\n
\n
Donor: %(name)s\n
Recurring donation identifier: %(profile_id)s\n
Payment method: %(gateway)s\n
Recurring donation amount: %(amount)s\n
Recurring Status: %(recurring_status)s\n
\n
Thank you,\n
%(sitename)s""") % {
        'name': subscription.user.fullname,
        'siteurl': get_site_url(),
        'url': reverse_with_site_url('donations:my-recurring-donations'),
        'profile_id': subscription.profile_id,
        'gateway': displayGateway(subscription),
        'amount': displayRecurringAmountWithCurrency(subscription),
        'recurring_status': subscription.recurring_status,
        'sitename': get_site_name()
    }
예제 #2
0
def get_account_created_admin_text(user):
    return _("""A Donor Account is created\n
\n
Hi Admins,\n
This email is to inform you that a donor account has been created on your website:\n
%(url)s\n
\n
Donor: %(name)s\n
\n
Thank you,\n
%(sitename)s""") % {
        'url': get_site_url() + '/admin/users/%d/' % user.id,
        'name': user.fullname,
        'sitename': get_site_name()
    }
예제 #3
0
def site_rel_url(relurl):
    """
    can be used as a filter in django templates like this: {{ donations_url|site_rel_url }}
    rel_url is expected to start with a forward slash
    """
    return get_site_url() + relurl
예제 #4
0
def site_url():
    """
    can be used as a tag in django templates like this: {% site_url %}
    returns a full site url e.g. https://newstream.example.com
    """
    return get_site_url()