notified_end = models.DateTimeField(_('End notifications sent'), blank=True, null=True)
def cover_img_tag(self):
- return u'<img src="%s" />' % self.cover.url
+ return '<img src="%s" />' % self.cover.url
cover_img_tag.short_description = _('Cover preview')
cover_img_tag.allow_tags = True
ordering = ['-end']
def __str__(self):
- return u"%s - %s" % (self.author, self.title)
+ return "%s - %s" % (self.author, self.title)
def get_absolute_url(self):
return reverse('funding_offer', args=[self.slug])
offer_sum = self.sum()
return {
'offer': self,
- 'sum': offset_sum,
+ 'sum': offer_sum,
'is_current': self.is_current(),
'is_win': offer_sum >= self.target,
'missing': self.target - offer_sum,
ordering = ['-price']
def __str__(self):
- return "%s (%s%s)" % (self.name, self.price, u" for %s" % self.offer if self.offer else "")
+ return "%s (%s%s)" % (self.name, self.price, " for %s" % self.offer if self.offer else "")
class Funding(models.Model):
ordering = ['-timestamp']
def __str__(self):
- return u"Spent: %s" % str(self.book)
+ return "Spent: %s" % str(self.book)
@receiver(getpaid.signals.new_payment_query)