modifying pledge_charged to only send transaction as context, and templates derive campaign and work info therefrom
parent
2bf67671ad
commit
b9de19bb09
|
@ -131,9 +131,7 @@ def handle_transaction_charged(sender,transaction=None, **kwargs):
|
|||
return
|
||||
notification.queue([transaction.user], "pledge_charged", {
|
||||
'site':Site.objects.get_current(),
|
||||
'campaign':transaction.campaign,
|
||||
'amount':transaction.amount,
|
||||
'premium': transaction.premium,
|
||||
'transaction':transaction
|
||||
'payment_processor':settings.PAYMENT_PROCESSOR
|
||||
}, True)
|
||||
from regluit.core.tasks import emit_notifications
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{% load humanize %}Congratulations!
|
||||
|
||||
Thanks to you and other ungluers, {{ campaign.work.title }} will be released to the world in an unglued ebook edition. {{ payment_processor|capfirst }} will now charge your credit card.
|
||||
Thanks to you and other ungluers, {{ transaction.campaign.work.title }} will be released to the world in an unglued ebook edition. {{ payment_processor|capfirst }} will now charge your credit card.
|
||||
|
||||
Pledge Summary
|
||||
Amount pledged: ${{ amount|intcomma }}
|
||||
Premium: {{ premium.description }}
|
||||
Amount pledged: ${{ transaction.amount|intcomma }}
|
||||
Premium: {{ transaction.premium.description }}
|
||||
|
||||
We will notify you when the unglued ebook is available for you to read. If you've requested special premiums, the rights holder, {{ campaign.rightsholder }}, will be in touch with you via email to request any information needed to deliver your premium.
|
||||
We will notify you when the unglued ebook is available for you to read. If you've requested special premiums, the rights holder, {{ transaction.campaign.rightsholder }}, will be in touch with you via email to request any information needed to deliver your premium.
|
||||
|
||||
If you'd like to visit the project page, click here:
|
||||
http://{{site.domain}}{% url work campaign.work.id %}
|
||||
http://{{ site.domain }}{% url work transaction.campaign.work.id %}
|
||||
|
||||
Thank you again for your support.
|
||||
|
||||
{{ campaign.rightsholder }} and the Unglue.it team
|
||||
{{ transaction.campaign.rightsholder }} and the Unglue.it team
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% load humanize %}
|
||||
{% with campaign.work.title as title %}
|
||||
{% with campaign.rightsholder as rightsholder %}
|
||||
{% with transaction.campaign.work.title as title %}
|
||||
{% with transaction.campaign.rightsholder as rightsholder %}
|
||||
{% with transaction.amount as amount %}
|
||||
<div class="comments clearfix">
|
||||
<div class="comments_info clearfix">
|
||||
<div class="comments_book">
|
||||
|
@ -18,7 +19,7 @@
|
|||
|
||||
<p>Pledge Summary :<br />
|
||||
Amount pledged: {{ amount|intcomma }}<br />
|
||||
Premium: {{ premium.description }} <br />
|
||||
Premium: {{ transaction.premium.description }} <br />
|
||||
</p>
|
||||
<p>We will notify you when the unglued ebook is available for you to read. If you've requested special premiums, the rights holder, {{ rightsholder }}, will be in touch with you via email to request any information needed to deliver your premium.
|
||||
</p>
|
||||
|
@ -33,3 +34,4 @@
|
|||
</div>
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
|
|
Loading…
Reference in New Issue