fnschool 20251011.82005.807__tar.gz → 20251012.81520.855__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fnschool might be problematic. Click here for more details.
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/PKG-INFO +1 -1
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/pyproject.toml +1 -1
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/__init__.py +2 -2
- fnschool-20251012.81520.855/src/fnschoo1/canteen/migrations/0013_alter_consumption_options_alter_ingredient_options_and_more.py +197 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/views.py +2 -2
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/workbook/generate.py +30 -10
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/fnschool/__init__.py +2 -1
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschool.egg-info/PKG-INFO +1 -1
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschool.egg-info/SOURCES.txt +1 -1
- fnschool-20251011.82005.807/src/fnschoo1/db.sqlite3 +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/LICENSE +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/README.md +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/setup.cfg +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/__init__.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/admin.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/apps.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/forms.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0001_initial.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0002_ingredient_is_disabled.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0003_consumption_is_disabled_alter_ingredient_is_disabled.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0004_alter_ingredient_name_category_and_more.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0005_alter_category_created_at_alter_category_name_and_more.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0006_category_is_disabled_alter_category_user_and_more.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0007_alter_consumption_amount_used_and_more.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0008_category_abbreviation_mealtype.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0009_alter_category_abbreviation_and_more.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0010_alter_consumption_options_alter_ingredient_options_and_more.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0011_category_pin_to_consumptions_top.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/0012_alter_ingredient_storage_date.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/migrations/__init__.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/models.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/category/create.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/category/delete.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/category/list.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/category/update.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/close.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/consumption/_create.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/consumption/create.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/ingredient/close.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/ingredient/create.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/ingredient/create_one.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/ingredient/delete.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/ingredient/list.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/ingredient/update.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/meal_type/create.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/meal_type/delete.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/meal_type/list.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/templates/canteen/meal_type/update.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/tests.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/urls.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/workbook/__init__.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/fnschool/asgi.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/fnschool/settings.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/fnschool/templatetags/__init__.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/fnschool/templatetags/fnschool_tags.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/fnschool/urls.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/fnschool/views.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/fnschool/wsgi.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/locale/en/LC_MESSAGES/django.mo +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/manage.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/__init__.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/admin.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/apps.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/forms.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/migrations/0001_initial.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/migrations/0002_alter_profile_bio.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/migrations/0003_alter_profile_options_alter_profile_address_and_more.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/migrations/0004_profile_gender.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/migrations/0005_alter_profile_gender.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/migrations/__init__.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/models.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/signals.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/templates/profiles/create.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/templates/profiles/detail.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/templates/profiles/edit.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/templates/profiles/log_in.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/templates/profiles/log_out.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/tests.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/urls.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/views.py +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/css/bootstrap.min.css +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/css/fnschool.css +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/images/favicon.ico +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/js/bootstrap.bundle.min.js +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/js/bootstrap.min.js +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/js/fnschool.js +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/js/jquery.min.js +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/js/jquery.slim.min.js +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/js/popper.min.js +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/base/_content.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/base/_css.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/base/_js.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/base/content.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/base/header_content_footer.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/close.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/home.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/includes/_footer.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/includes/_header.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/includes/_navigation.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/includes/_paginator.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/registration/logged_out.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/registration/login.html +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschool.egg-info/dependency_links.txt +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschool.egg-info/entry_points.txt +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschool.egg-info/requires.txt +0 -0
- {fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschool.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fnschool
|
|
3
|
-
Version:
|
|
3
|
+
Version: 20251012.81520.855
|
|
4
4
|
Summary: Just some school related scripts, without any ambition.
|
|
5
5
|
Author-email: larryw3i <larryw3i@163.com>, Larry Wei <larryw3i@126.com>, Larry W3i <larryw3i@yeah.net>
|
|
6
6
|
Maintainer-email: larryw3i <larryw3i@163.com>, Larry Wei <larryw3i@126.com>
|
|
@@ -58,7 +58,7 @@ version = {attr = "fnschoo1.__version__"}
|
|
|
58
58
|
where = ["src"]
|
|
59
59
|
|
|
60
60
|
[tool.setuptools.package-data]
|
|
61
|
-
"*" = ["*.mo","*.xlsx","*.toml","*.html","*.js", "*.css", "
|
|
61
|
+
"*" = ["*.mo","*.xlsx","*.toml","*.html","*.js", "*.css", "*.ico"]
|
|
62
62
|
|
|
63
63
|
[tool.setuptools.exclude-package-data]
|
|
64
64
|
"*" = ["*.po"]
|
|
@@ -6,7 +6,7 @@ import random
|
|
|
6
6
|
import sys
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
|
|
9
|
-
__version__ = "
|
|
9
|
+
__version__ = "20251012.81520.855"
|
|
10
10
|
|
|
11
11
|
FNSCHOOL_PATH = Path(__file__).parent
|
|
12
12
|
if FNSCHOOL_PATH.as_posix() not in sys.path:
|
|
@@ -37,7 +37,7 @@ def main():
|
|
|
37
37
|
"forget to activate a virtual environment?"
|
|
38
38
|
) from exc
|
|
39
39
|
|
|
40
|
-
if
|
|
40
|
+
if len(sys.argv) < 2:
|
|
41
41
|
local_port = str(random.randint(8080, 65530))
|
|
42
42
|
local_url = "http://127.0.0.1:" + local_port
|
|
43
43
|
sys.argv.append("runserver")
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Generated by Django 4.2.25 on 2025-10-12 07:14
|
|
2
|
+
|
|
3
|
+
import django.core.validators
|
|
4
|
+
import django.db.models.deletion
|
|
5
|
+
import django.utils.timezone
|
|
6
|
+
from django.conf import settings
|
|
7
|
+
from django.db import migrations, models
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Migration(migrations.Migration):
|
|
11
|
+
|
|
12
|
+
dependencies = [
|
|
13
|
+
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
14
|
+
("canteen", "0012_alter_ingredient_storage_date"),
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
operations = [
|
|
18
|
+
migrations.AlterModelOptions(
|
|
19
|
+
name="consumption",
|
|
20
|
+
options={
|
|
21
|
+
"ordering": ["-date_of_using"],
|
|
22
|
+
"verbose_name": "消耗记录",
|
|
23
|
+
"verbose_name_plural": "消耗记录列表",
|
|
24
|
+
},
|
|
25
|
+
),
|
|
26
|
+
migrations.AlterModelOptions(
|
|
27
|
+
name="ingredient",
|
|
28
|
+
options={
|
|
29
|
+
"verbose_name": "Ingredient",
|
|
30
|
+
"verbose_name_plural": "食材列表",
|
|
31
|
+
},
|
|
32
|
+
),
|
|
33
|
+
migrations.AlterField(
|
|
34
|
+
model_name="category",
|
|
35
|
+
name="abbreviation",
|
|
36
|
+
field=models.CharField(
|
|
37
|
+
blank=True, max_length=100, null=True, verbose_name="简称"
|
|
38
|
+
),
|
|
39
|
+
),
|
|
40
|
+
migrations.AlterField(
|
|
41
|
+
model_name="category",
|
|
42
|
+
name="created_at",
|
|
43
|
+
field=models.DateField(verbose_name="创建日期"),
|
|
44
|
+
),
|
|
45
|
+
migrations.AlterField(
|
|
46
|
+
model_name="category",
|
|
47
|
+
name="is_disabled",
|
|
48
|
+
field=models.BooleanField(default=False, verbose_name="已禁用"),
|
|
49
|
+
),
|
|
50
|
+
migrations.AlterField(
|
|
51
|
+
model_name="category",
|
|
52
|
+
name="name",
|
|
53
|
+
field=models.CharField(max_length=100, verbose_name="食材大类名"),
|
|
54
|
+
),
|
|
55
|
+
migrations.AlterField(
|
|
56
|
+
model_name="category",
|
|
57
|
+
name="pin_to_consumptions_top",
|
|
58
|
+
field=models.BooleanField(default=False, verbose_name="置顶出库"),
|
|
59
|
+
),
|
|
60
|
+
migrations.AlterField(
|
|
61
|
+
model_name="category",
|
|
62
|
+
name="user",
|
|
63
|
+
field=models.ForeignKey(
|
|
64
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
65
|
+
related_name="Categories",
|
|
66
|
+
to=settings.AUTH_USER_MODEL,
|
|
67
|
+
verbose_name="大类",
|
|
68
|
+
),
|
|
69
|
+
),
|
|
70
|
+
migrations.AlterField(
|
|
71
|
+
model_name="consumption",
|
|
72
|
+
name="date_of_using",
|
|
73
|
+
field=models.DateField(verbose_name="日期"),
|
|
74
|
+
),
|
|
75
|
+
migrations.AlterField(
|
|
76
|
+
model_name="consumption",
|
|
77
|
+
name="ingredient",
|
|
78
|
+
field=models.ForeignKey(
|
|
79
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
80
|
+
related_name="consumptions",
|
|
81
|
+
to="canteen.ingredient",
|
|
82
|
+
verbose_name="食材",
|
|
83
|
+
),
|
|
84
|
+
),
|
|
85
|
+
migrations.AlterField(
|
|
86
|
+
model_name="consumption",
|
|
87
|
+
name="is_disabled",
|
|
88
|
+
field=models.BooleanField(default=False, verbose_name="已禁用"),
|
|
89
|
+
),
|
|
90
|
+
migrations.AlterField(
|
|
91
|
+
model_name="ingredient",
|
|
92
|
+
name="category",
|
|
93
|
+
field=models.ForeignKey(
|
|
94
|
+
on_delete=django.db.models.deletion.PROTECT,
|
|
95
|
+
related_name="ingredients",
|
|
96
|
+
to="canteen.category",
|
|
97
|
+
verbose_name="大类",
|
|
98
|
+
),
|
|
99
|
+
),
|
|
100
|
+
migrations.AlterField(
|
|
101
|
+
model_name="ingredient",
|
|
102
|
+
name="is_disabled",
|
|
103
|
+
field=models.BooleanField(default=False, verbose_name="禁用"),
|
|
104
|
+
),
|
|
105
|
+
migrations.AlterField(
|
|
106
|
+
model_name="ingredient",
|
|
107
|
+
name="is_ignorable",
|
|
108
|
+
field=models.BooleanField(default=False, verbose_name="不入库"),
|
|
109
|
+
),
|
|
110
|
+
migrations.AlterField(
|
|
111
|
+
model_name="ingredient",
|
|
112
|
+
name="meal_type",
|
|
113
|
+
field=models.ForeignKey(
|
|
114
|
+
on_delete=django.db.models.deletion.PROTECT,
|
|
115
|
+
related_name="ingredients",
|
|
116
|
+
to="canteen.mealtype",
|
|
117
|
+
verbose_name="餐类",
|
|
118
|
+
),
|
|
119
|
+
),
|
|
120
|
+
migrations.AlterField(
|
|
121
|
+
model_name="ingredient",
|
|
122
|
+
name="name",
|
|
123
|
+
field=models.CharField(max_length=100, verbose_name="食材名"),
|
|
124
|
+
),
|
|
125
|
+
migrations.AlterField(
|
|
126
|
+
model_name="ingredient",
|
|
127
|
+
name="quantity",
|
|
128
|
+
field=models.IntegerField(
|
|
129
|
+
validators=[django.core.validators.MinValueValidator(0)],
|
|
130
|
+
verbose_name="数量",
|
|
131
|
+
),
|
|
132
|
+
),
|
|
133
|
+
migrations.AlterField(
|
|
134
|
+
model_name="ingredient",
|
|
135
|
+
name="quantity_unit_name",
|
|
136
|
+
field=models.CharField(
|
|
137
|
+
blank=True, max_length=20, null=True, verbose_name="数量单位"
|
|
138
|
+
),
|
|
139
|
+
),
|
|
140
|
+
migrations.AlterField(
|
|
141
|
+
model_name="ingredient",
|
|
142
|
+
name="storage_date",
|
|
143
|
+
field=models.DateField(
|
|
144
|
+
default=django.utils.timezone.now, verbose_name="入库日期"
|
|
145
|
+
),
|
|
146
|
+
preserve_default=False,
|
|
147
|
+
),
|
|
148
|
+
migrations.AlterField(
|
|
149
|
+
model_name="ingredient",
|
|
150
|
+
name="total_price",
|
|
151
|
+
field=models.DecimalField(
|
|
152
|
+
decimal_places=2, max_digits=10, verbose_name="总价"
|
|
153
|
+
),
|
|
154
|
+
),
|
|
155
|
+
migrations.AlterField(
|
|
156
|
+
model_name="ingredient",
|
|
157
|
+
name="user",
|
|
158
|
+
field=models.ForeignKey(
|
|
159
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
160
|
+
related_name="ingredients",
|
|
161
|
+
to=settings.AUTH_USER_MODEL,
|
|
162
|
+
verbose_name="用户",
|
|
163
|
+
),
|
|
164
|
+
),
|
|
165
|
+
migrations.AlterField(
|
|
166
|
+
model_name="mealtype",
|
|
167
|
+
name="abbreviation",
|
|
168
|
+
field=models.CharField(
|
|
169
|
+
blank=True, max_length=100, null=True, verbose_name="简称"
|
|
170
|
+
),
|
|
171
|
+
),
|
|
172
|
+
migrations.AlterField(
|
|
173
|
+
model_name="mealtype",
|
|
174
|
+
name="created_at",
|
|
175
|
+
field=models.DateField(verbose_name="创建日期"),
|
|
176
|
+
),
|
|
177
|
+
migrations.AlterField(
|
|
178
|
+
model_name="mealtype",
|
|
179
|
+
name="is_disabled",
|
|
180
|
+
field=models.BooleanField(default=False, verbose_name="已禁用"),
|
|
181
|
+
),
|
|
182
|
+
migrations.AlterField(
|
|
183
|
+
model_name="mealtype",
|
|
184
|
+
name="name",
|
|
185
|
+
field=models.CharField(max_length=100, verbose_name="餐类名称"),
|
|
186
|
+
),
|
|
187
|
+
migrations.AlterField(
|
|
188
|
+
model_name="mealtype",
|
|
189
|
+
name="user",
|
|
190
|
+
field=models.ForeignKey(
|
|
191
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
192
|
+
related_name="meal_types",
|
|
193
|
+
to=settings.AUTH_USER_MODEL,
|
|
194
|
+
verbose_name="餐类",
|
|
195
|
+
),
|
|
196
|
+
),
|
|
197
|
+
]
|
|
@@ -421,7 +421,7 @@ def list_ingredients(request):
|
|
|
421
421
|
if c.get("category__name") in search_query
|
|
422
422
|
]
|
|
423
423
|
for category in categories:
|
|
424
|
-
queries &= Q(
|
|
424
|
+
queries &= Q(category__name__icontains=category)
|
|
425
425
|
search_query = search_query.replace(category, "")
|
|
426
426
|
|
|
427
427
|
meal_types = Ingredient.objects.values("meal_type__name").distinct()
|
|
@@ -431,7 +431,7 @@ def list_ingredients(request):
|
|
|
431
431
|
if m.get("meal_type__name") in search_query
|
|
432
432
|
]
|
|
433
433
|
for meal_type in meal_types:
|
|
434
|
-
queries &= Q(
|
|
434
|
+
queries &= Q(meal_type__name__icontains=meal_type)
|
|
435
435
|
search_query = search_query.replace(meal_type, "")
|
|
436
436
|
|
|
437
437
|
names = re.split(r"\s+", search_query)
|
|
@@ -1603,7 +1603,17 @@ class CanteenWorkBook:
|
|
|
1603
1603
|
]
|
|
1604
1604
|
month_days.append(self.date_end)
|
|
1605
1605
|
|
|
1606
|
-
|
|
1606
|
+
min_storage_date = min(
|
|
1607
|
+
[
|
|
1608
|
+
i.storage_date
|
|
1609
|
+
for i in ingredients
|
|
1610
|
+
if i.storage_date >= self.date_start
|
|
1611
|
+
]
|
|
1612
|
+
)
|
|
1613
|
+
print("min_storage_date", min_storage_date)
|
|
1614
|
+
sundays = [
|
|
1615
|
+
d for d in month_days if d.weekday() == 6 and d >= min_storage_date
|
|
1616
|
+
]
|
|
1607
1617
|
|
|
1608
1618
|
formed_ingredients = []
|
|
1609
1619
|
for sunday in sundays:
|
|
@@ -1628,6 +1638,11 @@ class CanteenWorkBook:
|
|
|
1628
1638
|
fake_ingredients_len = (
|
|
1629
1639
|
ingredient_rows_count - surplus_ingredients_len
|
|
1630
1640
|
)
|
|
1641
|
+
|
|
1642
|
+
sunday_ingredients = sorted(
|
|
1643
|
+
sunday_ingredients, key=lambda i: i.category.name
|
|
1644
|
+
)
|
|
1645
|
+
|
|
1631
1646
|
s_ingredient0 = sunday_ingredients[0]
|
|
1632
1647
|
sunday_ingredients += [
|
|
1633
1648
|
Ingredient(
|
|
@@ -1644,10 +1659,6 @@ class CanteenWorkBook:
|
|
|
1644
1659
|
)
|
|
1645
1660
|
for i in range(fake_ingredients_len)
|
|
1646
1661
|
]
|
|
1647
|
-
|
|
1648
|
-
sunday_ingredients = sorted(
|
|
1649
|
-
sunday_ingredients, key=lambda i: i.category.name
|
|
1650
|
-
)
|
|
1651
1662
|
for index in range(
|
|
1652
1663
|
0, len(sunday_ingredients), ingredient_rows_count
|
|
1653
1664
|
):
|
|
@@ -1776,12 +1787,21 @@ class CanteenWorkBook:
|
|
|
1776
1787
|
)
|
|
1777
1788
|
summary_total_price += ingredient_total_price
|
|
1778
1789
|
|
|
1779
|
-
sheet.cell(ingredient_row_num, 1
|
|
1790
|
+
ingredient_name_cell = sheet.cell(ingredient_row_num, 1)
|
|
1791
|
+
ingredient_name_cell.value = ingredient.name
|
|
1792
|
+
if ingredient.name:
|
|
1793
|
+
ingredient_name_cell.comment = Comment(
|
|
1794
|
+
_("{meal_type} ({category})").format(
|
|
1795
|
+
meal_type=ingredient.meal_type,
|
|
1796
|
+
category=ingredient.category,
|
|
1797
|
+
),
|
|
1798
|
+
user.username,
|
|
1799
|
+
)
|
|
1780
1800
|
sheet.cell(ingredient_row_num, 2, ingredient.quantity_unit_name)
|
|
1781
|
-
sheet.cell(ingredient_row_num, 3, ingredient_quantity)
|
|
1782
|
-
sheet.cell(ingredient_row_num, 4, ingredient_total_price)
|
|
1783
|
-
sheet.cell(ingredient_row_num, 5, ingredient_quantity)
|
|
1784
|
-
sheet.cell(ingredient_row_num, 6, ingredient_total_price)
|
|
1801
|
+
sheet.cell(ingredient_row_num, 3, ingredient_quantity or "")
|
|
1802
|
+
sheet.cell(ingredient_row_num, 4, ingredient_total_price or "")
|
|
1803
|
+
sheet.cell(ingredient_row_num, 5, ingredient_quantity or "")
|
|
1804
|
+
sheet.cell(ingredient_row_num, 6, ingredient_total_price or "")
|
|
1785
1805
|
sheet.cell(ingredient_row_num, 7, "")
|
|
1786
1806
|
sheet.cell(ingredient_row_num, 8, "")
|
|
1787
1807
|
sheet.cell(ingredient_row_num, 9, "")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fnschool
|
|
3
|
-
Version:
|
|
3
|
+
Version: 20251012.81520.855
|
|
4
4
|
Summary: Just some school related scripts, without any ambition.
|
|
5
5
|
Author-email: larryw3i <larryw3i@163.com>, Larry Wei <larryw3i@126.com>, Larry W3i <larryw3i@yeah.net>
|
|
6
6
|
Maintainer-email: larryw3i <larryw3i@163.com>, Larry Wei <larryw3i@126.com>
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschool.egg-info/SOURCES.txt
RENAMED
|
@@ -2,7 +2,6 @@ LICENSE
|
|
|
2
2
|
README.md
|
|
3
3
|
pyproject.toml
|
|
4
4
|
src/fnschoo1/__init__.py
|
|
5
|
-
src/fnschoo1/db.sqlite3
|
|
6
5
|
src/fnschoo1/manage.py
|
|
7
6
|
src/fnschoo1/canteen/__init__.py
|
|
8
7
|
src/fnschoo1/canteen/admin.py
|
|
@@ -24,6 +23,7 @@ src/fnschoo1/canteen/migrations/0009_alter_category_abbreviation_and_more.py
|
|
|
24
23
|
src/fnschoo1/canteen/migrations/0010_alter_consumption_options_alter_ingredient_options_and_more.py
|
|
25
24
|
src/fnschoo1/canteen/migrations/0011_category_pin_to_consumptions_top.py
|
|
26
25
|
src/fnschoo1/canteen/migrations/0012_alter_ingredient_storage_date.py
|
|
26
|
+
src/fnschoo1/canteen/migrations/0013_alter_consumption_options_alter_ingredient_options_and_more.py
|
|
27
27
|
src/fnschoo1/canteen/migrations/__init__.py
|
|
28
28
|
src/fnschoo1/canteen/templates/canteen/close.html
|
|
29
29
|
src/fnschoo1/canteen/templates/canteen/category/create.html
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/canteen/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/fnschool/settings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/profiles/signals.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/css/fnschool.css
RENAMED
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/images/favicon.ico
RENAMED
|
File without changes
|
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/js/bootstrap.min.js
RENAMED
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/js/fnschool.js
RENAMED
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/js/jquery.min.js
RENAMED
|
File without changes
|
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/static/js/popper.min.js
RENAMED
|
File without changes
|
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/base/_css.html
RENAMED
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/base/_js.html
RENAMED
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/base/content.html
RENAMED
|
File without changes
|
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/close.html
RENAMED
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschoo1/templates/home.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschool.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschool.egg-info/requires.txt
RENAMED
|
File without changes
|
{fnschool-20251011.82005.807 → fnschool-20251012.81520.855}/src/fnschool.egg-info/top_level.txt
RENAMED
|
File without changes
|