Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Item(models.Model):
- name = models.CharField(max_length = 200, )
- price = models.FloatField(max_length = 10, )
- class Action(models.Model):
- item = models.ForeignKey(Item)
- count = models.FloatField(max_length = 10, )
- price = models.FloatField(max_length = 10, ) #take from current value of item.price
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement