Created
January 4, 2021 21:18
-
-
Save klement97/1bf16a5a533658c60d2b64cd1f718839 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_receipt(self): | |
requests.post( | |
url=settings.RECEIPT_MICROSERVICE, | |
data=prepare_receipt_data(order=self) | |
) | |
def save(self, *args, **kwargs): | |
self.price = self.total_price | |
self.print_receipt() | |
super().save(*args, **kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment