diff --git a/sith/settings.py b/sith/settings.py index 3f6fd731..a06043ef 100644 --- a/sith/settings.py +++ b/sith/settings.py @@ -95,7 +95,6 @@ INSTALLED_APPS = ( "com", "election", "forum", - "stock", "trombi", "matmat", "pedagogy", diff --git a/stock/__init__.py b/stock/__init__.py deleted file mode 100644 index d728c69f..00000000 --- a/stock/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright 2016,2017 -# - Guillaume "Lo-J" Renaud -# - Skia -# -# Ce fichier fait partie du site de l'Association des Étudiants de l'UTBM, -# http://ae.utbm.fr. -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License a published by the Free Software -# Foundation; either version 3 of the License, or (at your option) any later -# version. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Sofware Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA. -# -# diff --git a/stock/migrations/0001_initial.py b/stock/migrations/0001_initial.py deleted file mode 100644 index 08065988..00000000 --- a/stock/migrations/0001_initial.py +++ /dev/null @@ -1,188 +0,0 @@ -from __future__ import unicode_literals - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [("counter", "0011_auto_20161004_2039")] - - operations = [ - migrations.CreateModel( - name="ShoppingList", - fields=[ - ( - "id", - models.AutoField( - verbose_name="ID", - primary_key=True, - serialize=False, - auto_created=True, - ), - ), - ("date", models.DateTimeField(verbose_name="date")), - ("name", models.CharField(max_length=64, verbose_name="name")), - ("todo", models.BooleanField(verbose_name="todo")), - ( - "comment", - models.TextField(verbose_name="comment", blank=True, null=True), - ), - ], - ), - migrations.CreateModel( - name="ShoppingListItem", - fields=[ - ( - "id", - models.AutoField( - verbose_name="ID", - primary_key=True, - serialize=False, - auto_created=True, - ), - ), - ("name", models.CharField(max_length=64, verbose_name="name")), - ( - "tobuy_quantity", - models.IntegerField( - verbose_name="quantity to buy", - help_text="quantity to buy during the next shopping session", - default=6, - ), - ), - ( - "bought_quantity", - models.IntegerField( - verbose_name="quantity bought", - help_text="quantity bought during the last shopping session", - default=0, - ), - ), - ( - "shopping_lists", - models.ManyToManyField( - verbose_name="shopping lists", - related_name="shopping_items_to_buy", - to="stock.ShoppingList", - ), - ), - ], - ), - migrations.CreateModel( - name="Stock", - fields=[ - ( - "id", - models.AutoField( - verbose_name="ID", - primary_key=True, - serialize=False, - auto_created=True, - ), - ), - ("name", models.CharField(max_length=64, verbose_name="name")), - ( - "counter", - models.OneToOneField( - on_delete=django.db.models.deletion.CASCADE, - verbose_name="counter", - related_name="stock", - to="counter.Counter", - ), - ), - ], - ), - migrations.CreateModel( - name="StockItem", - fields=[ - ( - "id", - models.AutoField( - verbose_name="ID", - primary_key=True, - serialize=False, - auto_created=True, - ), - ), - ("name", models.CharField(max_length=64, verbose_name="name")), - ( - "unit_quantity", - models.IntegerField( - verbose_name="unit quantity", - help_text="number of element in one box", - default=0, - ), - ), - ( - "effective_quantity", - models.IntegerField( - verbose_name="effective quantity", - help_text="number of box", - default=0, - ), - ), - ( - "minimal_quantity", - models.IntegerField( - verbose_name="minimal quantity", - help_text=( - "if the effective quantity is less than the minimal, " - "item is added to the shopping list" - ), - default=1, - ), - ), - ( - "stock_owner", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - related_name="items", - to="stock.Stock", - ), - ), - ( - "type", - models.ForeignKey( - blank=True, - null=True, - verbose_name="type", - related_name="stock_items", - on_delete=django.db.models.deletion.SET_NULL, - to="counter.ProductType", - ), - ), - ], - ), - migrations.AddField( - model_name="shoppinglistitem", - name="stockitem_owner", - field=models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - null=True, - related_name="shopping_item", - to="stock.StockItem", - ), - ), - migrations.AddField( - model_name="shoppinglistitem", - name="type", - field=models.ForeignKey( - blank=True, - null=True, - verbose_name="type", - related_name="shoppinglist_items", - on_delete=django.db.models.deletion.SET_NULL, - to="counter.ProductType", - ), - ), - migrations.AddField( - model_name="shoppinglist", - name="stock_owner", - field=models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - null=True, - related_name="shopping_lists", - to="stock.Stock", - ), - ), - ] diff --git a/stock/migrations/0002_remove_shoppinglistitem_shopping_lists_and_more.py b/stock/migrations/0002_remove_shoppinglistitem_shopping_lists_and_more.py deleted file mode 100644 index e766ede1..00000000 --- a/stock/migrations/0002_remove_shoppinglistitem_shopping_lists_and_more.py +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by Django 4.2.16 on 2024-09-18 11:33 - -from django.db import migrations - -# This migration is here only to delete all the models -# of the stock application and will be removed in a subsequent release - - -class Migration(migrations.Migration): - dependencies = [ - ("stock", "0001_initial"), - ] - - operations = [ - migrations.RemoveField( - model_name="shoppinglistitem", - name="shopping_lists", - ), - migrations.RemoveField( - model_name="shoppinglistitem", - name="stockitem_owner", - ), - migrations.RemoveField( - model_name="shoppinglistitem", - name="type", - ), - migrations.RemoveField( - model_name="stock", - name="counter", - ), - migrations.RemoveField( - model_name="stockitem", - name="stock_owner", - ), - migrations.RemoveField( - model_name="stockitem", - name="type", - ), - migrations.DeleteModel( - name="ShoppingList", - ), - migrations.DeleteModel( - name="ShoppingListItem", - ), - migrations.DeleteModel( - name="Stock", - ), - migrations.DeleteModel( - name="StockItem", - ), - ] diff --git a/stock/migrations/__init__.py b/stock/migrations/__init__.py deleted file mode 100644 index e69de29b..00000000