diff --git a/stock/__init__.py b/stock/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/stock/admin.py b/stock/admin.py new file mode 100644 index 00000000..8c38f3f3 --- /dev/null +++ b/stock/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/stock/migrations/__init__.py b/stock/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/stock/models.py b/stock/models.py new file mode 100644 index 00000000..1fdbf62a --- /dev/null +++ b/stock/models.py @@ -0,0 +1,10 @@ +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 \ No newline at end of file diff --git a/stock/tests.py b/stock/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/stock/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/stock/views.py b/stock/views.py new file mode 100644 index 00000000..91ea44a2 --- /dev/null +++ b/stock/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.