fnschool 20251013.81959.843__tar.gz → 20251014.81348.830__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.
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/PKG-INFO +1 -1
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/__init__.py +1 -1
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/forms.py +10 -0
- fnschool-20251014.81348.830/src/fnschoo1/canteen/migrations/0014_category_priority.py +27 -0
- fnschool-20251014.81348.830/src/fnschoo1/canteen/migrations/0015_alter_category_options_alter_category_priority.py +28 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/models.py +29 -7
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/category/delete.html +4 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/category/list.html +2 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/consumption/create.html +1 -1
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/views.py +0 -1
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/workbook/generate.py +13 -0
- fnschool-20251014.81348.830/src/fnschoo1/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/js/fnschool.js +2 -4
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/PKG-INFO +1 -1
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/SOURCES.txt +2 -0
- fnschool-20251013.81959.843/src/fnschoo1/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/LICENSE +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/README.md +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/pyproject.toml +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/setup.cfg +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/__init__.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/admin.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/apps.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0001_initial.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0002_ingredient_is_disabled.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0003_consumption_is_disabled_alter_ingredient_is_disabled.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0004_alter_ingredient_name_category_and_more.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0005_alter_category_created_at_alter_category_name_and_more.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0006_category_is_disabled_alter_category_user_and_more.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0007_alter_consumption_amount_used_and_more.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0008_category_abbreviation_mealtype.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0009_alter_category_abbreviation_and_more.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0010_alter_consumption_options_alter_ingredient_options_and_more.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0011_category_pin_to_consumptions_top.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0012_alter_ingredient_storage_date.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/0013_alter_consumption_options_alter_ingredient_options_and_more.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/migrations/__init__.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/category/create.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/category/update.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/close.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/consumption/_create.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/ingredient/close.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/ingredient/create.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/ingredient/create_one.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/ingredient/delete.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/ingredient/list.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/ingredient/update.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/meal_type/create.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/meal_type/delete.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/meal_type/list.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/templates/canteen/meal_type/update.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/tests.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/urls.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/canteen/workbook/__init__.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/fnschool/__init__.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/fnschool/asgi.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/fnschool/settings.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/fnschool/templatetags/__init__.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/fnschool/templatetags/fnschool_tags.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/fnschool/urls.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/fnschool/views.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/fnschool/wsgi.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/locale/en/LC_MESSAGES/django.mo +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/manage.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/__init__.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/admin.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/apps.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/forms.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/migrations/0001_initial.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/migrations/0002_alter_profile_bio.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/migrations/0003_alter_profile_options_alter_profile_address_and_more.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/migrations/0004_profile_gender.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/migrations/0005_alter_profile_gender.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/migrations/__init__.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/models.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/signals.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/templates/profiles/create.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/templates/profiles/detail.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/templates/profiles/edit.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/templates/profiles/log_in.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/templates/profiles/log_out.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/tests.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/urls.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/profiles/views.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/css/bootstrap.min.css +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/css/fnschool.css +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/images/favicon.ico +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/js/bootstrap.bundle.min.js +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/js/bootstrap.min.js +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/js/jquery.min.js +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/js/jquery.slim.min.js +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/js/popper.min.js +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/base/_content.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/base/_css.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/base/_js.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/base/content.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/base/header_content_footer.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/close.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/home.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/includes/_footer.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/includes/_header.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/includes/_navigation.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/includes/_paginator.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/registration/logged_out.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/registration/login.html +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/SOURCES.txt.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/dependency_links.txt +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/dependency_links.txt.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/entry_points.txt +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/entry_points.txt.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/requires.txt +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/requires.txt.py +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/top_level.txt +0 -0
- {fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/top_level.txt.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fnschool
|
|
3
|
-
Version:
|
|
3
|
+
Version: 20251014.81348.830
|
|
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>
|
|
@@ -70,9 +70,19 @@ class CategoryForm(forms.ModelForm):
|
|
|
70
70
|
fields = [
|
|
71
71
|
"name",
|
|
72
72
|
"abbreviation",
|
|
73
|
+
"priority",
|
|
73
74
|
"pin_to_consumptions_top",
|
|
74
75
|
"is_disabled",
|
|
75
76
|
]
|
|
77
|
+
widgets = {
|
|
78
|
+
"priority": forms.NumberInput(
|
|
79
|
+
attrs={
|
|
80
|
+
"title": _(
|
|
81
|
+
"Numbers with smaller values have higher priority."
|
|
82
|
+
),
|
|
83
|
+
},
|
|
84
|
+
),
|
|
85
|
+
}
|
|
76
86
|
|
|
77
87
|
|
|
78
88
|
class MealTypeForm(forms.ModelForm):
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Generated by Django 4.2.25 on 2025-10-14 04:46
|
|
2
|
+
|
|
3
|
+
import django.core.validators
|
|
4
|
+
from django.db import migrations, models
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
dependencies = [
|
|
10
|
+
(
|
|
11
|
+
"canteen",
|
|
12
|
+
"0013_alter_consumption_options_alter_ingredient_options_and_more",
|
|
13
|
+
),
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
operations = [
|
|
17
|
+
migrations.AddField(
|
|
18
|
+
model_name="category",
|
|
19
|
+
name="priority",
|
|
20
|
+
field=models.IntegerField(
|
|
21
|
+
blank=True,
|
|
22
|
+
null=True,
|
|
23
|
+
validators=[django.core.validators.MinValueValidator(0)],
|
|
24
|
+
verbose_name="Category Priority",
|
|
25
|
+
),
|
|
26
|
+
),
|
|
27
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Generated by Django 4.2.25 on 2025-10-14 05:48
|
|
2
|
+
|
|
3
|
+
import django.core.validators
|
|
4
|
+
from django.db import migrations, models
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
dependencies = [
|
|
10
|
+
("canteen", "0014_category_priority"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterModelOptions(
|
|
15
|
+
name="category",
|
|
16
|
+
options={"ordering": ["priority"]},
|
|
17
|
+
),
|
|
18
|
+
migrations.AlterField(
|
|
19
|
+
model_name="category",
|
|
20
|
+
name="priority",
|
|
21
|
+
field=models.IntegerField(
|
|
22
|
+
blank=True,
|
|
23
|
+
null=True,
|
|
24
|
+
validators=[django.core.validators.MinValueValidator(0)],
|
|
25
|
+
verbose_name="优先级",
|
|
26
|
+
),
|
|
27
|
+
),
|
|
28
|
+
]
|
|
@@ -45,10 +45,22 @@ class Category(models.Model):
|
|
|
45
45
|
is_disabled = models.BooleanField(
|
|
46
46
|
default=False, verbose_name=_("Is Disabled")
|
|
47
47
|
)
|
|
48
|
+
priority = models.IntegerField(
|
|
49
|
+
null=True,
|
|
50
|
+
blank=True,
|
|
51
|
+
validators=[
|
|
52
|
+
MinValueValidator(0),
|
|
53
|
+
],
|
|
54
|
+
verbose_name=_("Category Priority"),
|
|
55
|
+
)
|
|
56
|
+
|
|
48
57
|
pin_to_consumptions_top = models.BooleanField(
|
|
49
58
|
default=False, verbose_name=_("Pin to Consumptions Top")
|
|
50
59
|
)
|
|
51
60
|
|
|
61
|
+
class Meta:
|
|
62
|
+
ordering = ["priority"]
|
|
63
|
+
|
|
52
64
|
def __str__(self):
|
|
53
65
|
return self.name
|
|
54
66
|
|
|
@@ -110,12 +122,6 @@ class Ingredient(models.Model):
|
|
|
110
122
|
@property
|
|
111
123
|
def cleaned_consumptions(self):
|
|
112
124
|
consumptions = self.consumptions.all()
|
|
113
|
-
for c1 in consumptions:
|
|
114
|
-
for c2 in consumptions:
|
|
115
|
-
if c1.date_of_using == c2.date_of_using and c1.id != c2.id:
|
|
116
|
-
c1.is_disabled = False
|
|
117
|
-
c1.save()
|
|
118
|
-
c2.delete()
|
|
119
125
|
return consumptions
|
|
120
126
|
|
|
121
127
|
@property
|
|
@@ -128,6 +134,22 @@ class Ingredient(models.Model):
|
|
|
128
134
|
)
|
|
129
135
|
return quantity
|
|
130
136
|
|
|
137
|
+
def get_consuming_quantity(self, date_end):
|
|
138
|
+
consumptions = self.cleaned_consumptions
|
|
139
|
+
if not consumptions:
|
|
140
|
+
return 0
|
|
141
|
+
quantity = sum(
|
|
142
|
+
[
|
|
143
|
+
c.amount_used
|
|
144
|
+
for c in consumptions
|
|
145
|
+
if not c.is_disabled and c.date_of_using <= date_end
|
|
146
|
+
]
|
|
147
|
+
)
|
|
148
|
+
return quantity
|
|
149
|
+
|
|
150
|
+
def get_remaining_quantity(self, date_end):
|
|
151
|
+
return self.quantity - self.get_consuming_quantity(date_end)
|
|
152
|
+
|
|
131
153
|
@property
|
|
132
154
|
def remaining_quantity(self):
|
|
133
155
|
consumptions = self.cleaned_consumptions
|
|
@@ -156,7 +178,7 @@ class Consumption(models.Model):
|
|
|
156
178
|
|
|
157
179
|
date_of_using = models.DateField(verbose_name=_("Date"))
|
|
158
180
|
amount_used = models.IntegerField(
|
|
159
|
-
verbose_name="
|
|
181
|
+
verbose_name=_("Consuming Quantity"),
|
|
160
182
|
validators=[MinValueValidator(0)],
|
|
161
183
|
)
|
|
162
184
|
is_disabled = models.BooleanField(
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
<th>{% trans "Abbreviation" %}</th>
|
|
19
19
|
<th>{% trans "Created at" %}</th>
|
|
20
20
|
<th>{% trans "Pin to consumptions top" %}</th>
|
|
21
|
+
<th>{% trans "Priority" %}</th>
|
|
21
22
|
<th>{% trans "Is Disabled" %}</th>
|
|
22
23
|
<th>#</th>
|
|
23
24
|
</tr>
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
{% trans "Yes" %}
|
|
35
36
|
{% endif %}
|
|
36
37
|
</td>
|
|
38
|
+
<td>{{ category.priority|default_if_none:'0' }}</td>
|
|
37
39
|
<td>
|
|
38
40
|
{% if category.is_disabled %}
|
|
39
41
|
{% trans "Yes" %}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<input class="form-control "
|
|
31
31
|
onkeydown="if(event.keyCode==13){list_consumptions();}"
|
|
32
32
|
title="{% trans 'The end date of storage.' %}"
|
|
33
|
-
id="
|
|
33
|
+
id="storage_date_end_input"
|
|
34
34
|
value="{{ request.COOKIES.storage_date_end }}">
|
|
35
35
|
</input>
|
|
36
36
|
</div>
|
|
@@ -2106,6 +2106,19 @@ class CanteenWorkBook:
|
|
|
2106
2106
|
]:
|
|
2107
2107
|
set_column_width_in_inches(sheet, col, width)
|
|
2108
2108
|
|
|
2109
|
+
def fill_in_food_sheets(self):
|
|
2110
|
+
user = self.request.user
|
|
2111
|
+
date_start = self.date_start
|
|
2112
|
+
date_end = self.date_end
|
|
2113
|
+
meal_type = self.meal_type
|
|
2114
|
+
|
|
2115
|
+
ingredients = Ingredient.objects.filter(
|
|
2116
|
+
Q(is_disabled=False)
|
|
2117
|
+
& Q(is_ignorable=False)
|
|
2118
|
+
& Q(user=user)
|
|
2119
|
+
& Q(meal_type=meal_type)
|
|
2120
|
+
).all()
|
|
2121
|
+
|
|
2109
2122
|
def fill_in(self):
|
|
2110
2123
|
self.fill_in_cover_sheet()
|
|
2111
2124
|
self.fill_in_storage_sheet()
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/js/fnschool.js
RENAMED
|
@@ -9,9 +9,7 @@ function get_cookie(name) {
|
|
|
9
9
|
return null
|
|
10
10
|
}
|
|
11
11
|
function delete_cookie(name) {
|
|
12
|
-
document.cookie =
|
|
13
|
-
name +
|
|
14
|
-
`=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=${window.location.pathname}`
|
|
12
|
+
document.cookie = name + `=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
function set_cookies(cookies) {
|
|
@@ -28,7 +26,7 @@ function set_simple_cookie(key, value) {
|
|
|
28
26
|
}
|
|
29
27
|
const expiryDate = new Date()
|
|
30
28
|
expiryDate.setFullYear(expiryDate.getFullYear() + 20)
|
|
31
|
-
document.cookie = `${key}=${value}; expires=${expiryDate.toUTCString()}; path
|
|
29
|
+
document.cookie = `${key}=${value}; expires=${expiryDate.toUTCString()}; path=/`
|
|
32
30
|
}
|
|
33
31
|
function update_href(query) {
|
|
34
32
|
query = new Map(Object.entries(query))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fnschool
|
|
3
|
-
Version:
|
|
3
|
+
Version: 20251014.81348.830
|
|
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-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/SOURCES.txt
RENAMED
|
@@ -24,6 +24,8 @@ src/fnschoo1/canteen/migrations/0010_alter_consumption_options_alter_ingredient_
|
|
|
24
24
|
src/fnschoo1/canteen/migrations/0011_category_pin_to_consumptions_top.py
|
|
25
25
|
src/fnschoo1/canteen/migrations/0012_alter_ingredient_storage_date.py
|
|
26
26
|
src/fnschoo1/canteen/migrations/0013_alter_consumption_options_alter_ingredient_options_and_more.py
|
|
27
|
+
src/fnschoo1/canteen/migrations/0014_category_priority.py
|
|
28
|
+
src/fnschoo1/canteen/migrations/0015_alter_category_options_alter_category_priority.py
|
|
27
29
|
src/fnschoo1/canteen/migrations/__init__.py
|
|
28
30
|
src/fnschoo1/canteen/templates/canteen/close.html
|
|
29
31
|
src/fnschoo1/canteen/templates/canteen/category/create.html
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/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
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/fnschool/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/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
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/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-20251013.81959.843 → fnschool-20251014.81348.830}/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-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/css/fnschool.css
RENAMED
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/images/favicon.ico
RENAMED
|
File without changes
|
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/js/bootstrap.min.js
RENAMED
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/js/jquery.min.js
RENAMED
|
File without changes
|
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/static/js/popper.min.js
RENAMED
|
File without changes
|
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/base/_css.html
RENAMED
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/base/_js.html
RENAMED
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/base/content.html
RENAMED
|
File without changes
|
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschoo1/templates/close.html
RENAMED
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/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
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/SOURCES.txt.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/requires.txt
RENAMED
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/requires.txt.py
RENAMED
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/top_level.txt
RENAMED
|
File without changes
|
{fnschool-20251013.81959.843 → fnschool-20251014.81348.830}/src/fnschool.egg-info/top_level.txt.py
RENAMED
|
File without changes
|