Sith/stock/models.py

10 lines
381 B
Python
Raw Normal View History

2016-10-26 15:20:42 +00:00
from django.db import models
from django.counter import Counter
class Stock(models.Model):
""" The Stock class, this one is used to know how many products are left for a specific counter """
name = models.CharField(_('name'), max_length=64)
counter = models.OneToOneField(Counter, verbose_name=_('counter'), related_name='stock')
def __str__(self):
return self.name