having a simple ordinary model like this
class Order(models.Model):
open = models.DecimalField(max_digits=10, decimal_places=8)
high = models.DecimalField(max_digits=10, decimal_places=8)
low = models.DecimalField(max_digits=10, decimal_places=8)
close = models.DecimalField(max_digits=10, decimal_places=8)
time = models.DateTimeField()
active = models.BooleanField(default=False)
complete = models.BooleanField(default=False)
works for my case but as there's only up to 1 active order at the same time, keeping it consistent is a challenge. don't wanna use transaction so the idea of separating active attribute would be a solution. I wondered if there's any better idea? for example, adding active as a database related attribute or something like a hook (believe me when I say I don't know if that's an option)