fnschool 20251011.82005.807__py3-none-any.whl → 20251012.81427.834__py3-none-any.whl

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.

fnschoo1/__init__.py CHANGED
@@ -6,7 +6,7 @@ import random
6
6
  import sys
7
7
  from pathlib import Path
8
8
 
9
- __version__ = "20251011.82005.807"
9
+ __version__ = "20251012.81427.834"
10
10
 
11
11
  FNSCHOOL_PATH = Path(__file__).parent
12
12
  if FNSCHOOL_PATH.as_posix() not in sys.path:
@@ -1603,7 +1603,17 @@ class CanteenWorkBook:
1603
1603
  ]
1604
1604
  month_days.append(self.date_end)
1605
1605
 
1606
- sundays = [d for d in month_days if d.weekday() == 6]
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, ingredient.name)
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,7 @@
1
1
  import re
2
2
 
3
- from django.utils.translation import gettext as _
3
+ from django.utils.translation import gettext as _
4
+
4
5
  # from django.utils.translation import gettext_lazy as _
5
6
 
6
7
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fnschool
3
- Version: 20251011.82005.807
3
+ Version: 20251012.81427.834
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>
@@ -1,5 +1,4 @@
1
- fnschoo1/__init__.py,sha256=eLqO0x1gqSWrEqF8dFYMX8Sf5k2_kuT3lla69Ty4If4,1506
2
- fnschoo1/db.sqlite3,sha256=k8mhvHCeeE98o8mdCTIJqFsdbGkjUYtBn7ZrFzMdp1I,176128
1
+ fnschoo1/__init__.py,sha256=T2T3r4M0B848PqXzWVZxgczEaLgO_Ex901nVZLrFaHg,1506
3
2
  fnschoo1/manage.py,sha256=pMv0yE2eTcNrgskSHDUdRrnY51iTm1DXg32I8mWDDqw,696
4
3
  fnschoo1/canteen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
4
  fnschoo1/canteen/admin.py,sha256=suMo4x8I3JBxAFBVIdE-5qnqZ6JAZV0FESABHOSc-vg,63
@@ -40,8 +39,8 @@ fnschoo1/canteen/templates/canteen/meal_type/delete.html,sha256=1UmCyXD-6lbYl-IE
40
39
  fnschoo1/canteen/templates/canteen/meal_type/list.html,sha256=c5kJUE1OgpRtSrMV4wFwL_gbRSaX_XMM4Zt1JTx34_g,1907
41
40
  fnschoo1/canteen/templates/canteen/meal_type/update.html,sha256=Rfv1TamSFIKHzvUNlgnmrPmfmzrehPpuo5Hv8VF0yek,818
42
41
  fnschoo1/canteen/workbook/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
43
- fnschoo1/canteen/workbook/generate.py,sha256=o6dCRE7Ne8tSCZkdu8MIsgvt4UEuf9YiefsBBAGMVec,81958
44
- fnschoo1/fnschool/__init__.py,sha256=71nfNRSJdwE_7r6s5hkoPOyQ0iSYDNhv3CcbiSwg9fw,287
42
+ fnschoo1/canteen/workbook/generate.py,sha256=347Wg5WB90dLoQb5ZkMlCo4aV0L59FsWmKoE6BptGDg,82705
43
+ fnschoo1/fnschool/__init__.py,sha256=TmHhzykpKNMoMf6eD-EKvbvmnlzs1XGHtvD55ae1sXs,287
45
44
  fnschoo1/fnschool/asgi.py,sha256=kzkqosS10uBlyBX53EXcsATcvEZmac6nsPzyOHCuucE,393
46
45
  fnschoo1/fnschool/settings.py,sha256=l9Y1iQCivSfmsNfnHltfXLzxP6gG4VMIL4GEZgAp8YM,4357
47
46
  fnschoo1/fnschool/urls.py,sha256=8WPemtCUuStd0R9gDP70c-NRQ5k7G4ksq6dYGH6xCDM,1036
@@ -93,9 +92,9 @@ fnschoo1/templates/includes/_navigation.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
93
92
  fnschoo1/templates/includes/_paginator.html,sha256=Z-Hxcdmun4SJ1YcHnWTDLfW8wrngROiBTwr4NZWaPP4,1246
94
93
  fnschoo1/templates/registration/logged_out.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
95
94
  fnschoo1/templates/registration/login.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
- fnschool-20251011.82005.807.dist-info/licenses/LICENSE,sha256=2n6rt7r999OuXp8iOqW9we7ORaxWncIbOwN1ILRGR2g,7651
97
- fnschool-20251011.82005.807.dist-info/METADATA,sha256=2cW6dqYnTCBW73v2-Ca5icWqIlEetTKnQPmYS1AbPYg,4752
98
- fnschool-20251011.82005.807.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
99
- fnschool-20251011.82005.807.dist-info/entry_points.txt,sha256=To2PDA9r0qhE0Wq1-M8hEE8uXxTrTe16BOcpKPT-q5g,47
100
- fnschool-20251011.82005.807.dist-info/top_level.txt,sha256=s6ZKnNm94Q0-247a50eI7jDK98uPF6P2kC9Ovd3LUlM,9
101
- fnschool-20251011.82005.807.dist-info/RECORD,,
95
+ fnschool-20251012.81427.834.dist-info/licenses/LICENSE,sha256=2n6rt7r999OuXp8iOqW9we7ORaxWncIbOwN1ILRGR2g,7651
96
+ fnschool-20251012.81427.834.dist-info/METADATA,sha256=usJgEjLKK9z8Y45ehDz2izOqhT3sWiTAyrNW8PFTe1g,4752
97
+ fnschool-20251012.81427.834.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
98
+ fnschool-20251012.81427.834.dist-info/entry_points.txt,sha256=To2PDA9r0qhE0Wq1-M8hEE8uXxTrTe16BOcpKPT-q5g,47
99
+ fnschool-20251012.81427.834.dist-info/top_level.txt,sha256=s6ZKnNm94Q0-247a50eI7jDK98uPF6P2kC9Ovd3LUlM,9
100
+ fnschool-20251012.81427.834.dist-info/RECORD,,
fnschoo1/db.sqlite3 DELETED
Binary file