Skip to content

Instantly share code, notes, and snippets.

@bencleary
Created December 10, 2017 20:53
Show Gist options
  • Save bencleary/54f0a4d2bfb93ebaa03e4e6849eb2fa6 to your computer and use it in GitHub Desktop.
Save bencleary/54f0a4d2bfb93ebaa03e4e6849eb2fa6 to your computer and use it in GitHub Desktop.
from crunchy_waffles_app.models import EmailQueue
class BiddingActions():
auction = None
def __init__(self, instance):
self.auction = instance
def update_auction(self):
auction = self.auction
auction.bid_count = Bid.BidManager.current(auction).count()
auction.current_bid = format(auction.value, ".2f")
auction.save()
def send_email(self):
EmailQueue(auction=self.auction).save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment