Merge pull request #99 from Gluejar/correct_ungluing_date
add success_date property to campaign so we can accurately report it whe...pull/1/head
commit
c22403356c
|
@ -509,6 +509,12 @@ class Campaign(models.Model):
|
|||
@property
|
||||
def license_badge(self):
|
||||
return CCLicense.badge(self.license)
|
||||
|
||||
@property
|
||||
def success_date(self):
|
||||
if self.status == 'SUCCESSFUL':
|
||||
return self.actions.filter(type='succeeded')[0].timestamp
|
||||
return ''
|
||||
|
||||
|
||||
class Identifier(models.Model):
|
||||
|
|
|
@ -67,7 +67,7 @@ $j(document).ready(function(){
|
|||
Ending {{ countdown }}
|
||||
{% else %}
|
||||
{% if status == 'SUCCESSFUL' %}
|
||||
Unglued on {{ work.last_campaign.deadline|date:"M j, Y"}}! <br />
|
||||
Unglued on {{ work.last_campaign.success_date|date:"M j, Y"}}! <br />
|
||||
${{ work.last_campaign.current_total|floatformat:0|intcomma }} raised of ${{ work.last_campaign.target|floatformat:0|intcomma }} goal<br />
|
||||
Ebook in progress
|
||||
{% else %}{% if status == 'INITIALIZED' %}
|
||||
|
|
Loading…
Reference in New Issue