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
eshellman 2012-12-31 12:28:47 -08:00
commit c22403356c
2 changed files with 7 additions and 1 deletions

View File

@ -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):

View File

@ -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' %}