class Offer(models.Model):
""" A fundraiser for a particular book. """
- entry = models.OneToOneField(Entry) # filter publications!
+ entry = models.OneToOneField(Entry, models.CASCADE) # filter publications!
price = models.DecimalField(_('price'), decimal_places=2, max_digits=6)
cost_const = models.DecimalField(decimal_places=2, max_digits=6)
cost_per_item = models.DecimalField(decimal_places=2, max_digits=6, default=0)
ordering = ['entry']
def __unicode__(self):
- return self.entry.title
+ return unicode(self.entry)
def get_absolute_url(self):
return self.entry.get_absolute_url()
The payment was completed if and only if payed_at is set.
"""
- offer = models.ForeignKey(Offer, verbose_name=_('offer'))
+ offer = models.ForeignKey(Offer, models.CASCADE, verbose_name=_('offer'))
items = models.IntegerField(verbose_name=_('items'), default=1)
name = models.CharField(_('name'), max_length=127, blank=True)
email = models.EmailField(_('email'), db_index=True)
_('New order has been placed.'),
'shop/email/payed_managers.txt'
)
-getpaid.signals.payment_status_changed.connect(payment_status_changed_listener)
+getpaid.signals.payment_status_changed.connect(payment_status_changed_listener, dispatch_uid='shop.models.payment_status_changed_listener')