def _apply(self, command, stock, price, shares): application = Application(stock = stock, applicant = self, price = price, command = command, shares = shares) application.clean() application.save() application_updated.send(self, application = application) return application
def save(self, send = False, *args, **kwargs): if send and self.id is not None: application_updated.send(self, application = self) super(Application, self).save(*args, **kwargs)