mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-13 06:06:06 +00:00
Stock application creation
This commit is contained in:
1 parent
a90a553939
commit
402a14d69a
6 files changed
+19
No files matched your search
Whitespace-only changes.
@@ -0,0 +1,3 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
# Register your models here.
|
||||||
Whitespace-only changes.
@@ -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
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
# Create your views here.
|
||||||
Reference in new issue
Block a user