Skip to content

Instantly share code, notes, and snippets.

@arecker
Created November 13, 2015 01:26
Show Gist options
  • Save arecker/2fe210d0e75a0b94df7d to your computer and use it in GitHub Desktop.
Save arecker/2fe210d0e75a0b94df7d to your computer and use it in GitHub Desktop.
Transact Daily
class TransactionQuerySet(TransactionBaseQuerySet):
def transact_rate_balance(self):
transaction = self.model()
transaction.description = ('Rate Balance for {0}'
.format(get_timestamp()
.strftime("%m/%d/%Y")))
transaction.amount = Rate.objects.total()
return transaction.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment