fnschool 20251013.81257.813__tar.gz → 20251013.81959.843__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.

Files changed (114) hide show
  1. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/PKG-INFO +1 -1
  2. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/pyproject.toml +1 -1
  3. fnschool-20251013.81959.843/src/fnschoo1/__init__.py +9 -0
  4. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/consumption/create.html +56 -20
  5. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/views.py +97 -93
  6. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/workbook/generate.py +4 -2
  7. fnschool-20251013.81959.843/src/fnschoo1/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  8. fnschool-20251013.81257.813/src/fnschoo1/__init__.py → fnschool-20251013.81959.843/src/fnschoo1/manage.py +8 -3
  9. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/fnschool.js +11 -2
  10. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschool.egg-info/PKG-INFO +1 -1
  11. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschool.egg-info/SOURCES.txt +6 -1
  12. fnschool-20251013.81959.843/src/fnschool.egg-info/SOURCES.txt.py +104 -0
  13. fnschool-20251013.81959.843/src/fnschool.egg-info/dependency_links.txt.py +1 -0
  14. fnschool-20251013.81959.843/src/fnschool.egg-info/entry_points.txt +2 -0
  15. fnschool-20251013.81959.843/src/fnschool.egg-info/entry_points.txt.py +2 -0
  16. fnschool-20251013.81959.843/src/fnschool.egg-info/requires.txt.py +13 -0
  17. fnschool-20251013.81959.843/src/fnschool.egg-info/top_level.txt.py +1 -0
  18. fnschool-20251013.81257.813/src/fnschoo1/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  19. fnschool-20251013.81257.813/src/fnschoo1/manage.py +0 -25
  20. fnschool-20251013.81257.813/src/fnschool.egg-info/entry_points.txt +0 -2
  21. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/LICENSE +0 -0
  22. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/README.md +0 -0
  23. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/setup.cfg +0 -0
  24. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/__init__.py +0 -0
  25. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/admin.py +0 -0
  26. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/apps.py +0 -0
  27. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/forms.py +0 -0
  28. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0001_initial.py +0 -0
  29. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0002_ingredient_is_disabled.py +0 -0
  30. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0003_consumption_is_disabled_alter_ingredient_is_disabled.py +0 -0
  31. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0004_alter_ingredient_name_category_and_more.py +0 -0
  32. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0005_alter_category_created_at_alter_category_name_and_more.py +0 -0
  33. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0006_category_is_disabled_alter_category_user_and_more.py +0 -0
  34. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0007_alter_consumption_amount_used_and_more.py +0 -0
  35. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0008_category_abbreviation_mealtype.py +0 -0
  36. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0009_alter_category_abbreviation_and_more.py +0 -0
  37. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0010_alter_consumption_options_alter_ingredient_options_and_more.py +0 -0
  38. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0011_category_pin_to_consumptions_top.py +0 -0
  39. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0012_alter_ingredient_storage_date.py +0 -0
  40. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0013_alter_consumption_options_alter_ingredient_options_and_more.py +0 -0
  41. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/__init__.py +0 -0
  42. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/models.py +0 -0
  43. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/category/create.html +0 -0
  44. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/category/delete.html +0 -0
  45. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/category/list.html +0 -0
  46. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/category/update.html +0 -0
  47. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/close.html +0 -0
  48. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/consumption/_create.html +0 -0
  49. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/close.html +0 -0
  50. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/create.html +0 -0
  51. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/create_one.html +0 -0
  52. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/delete.html +0 -0
  53. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/list.html +0 -0
  54. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/update.html +0 -0
  55. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/meal_type/create.html +0 -0
  56. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/meal_type/delete.html +0 -0
  57. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/meal_type/list.html +0 -0
  58. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/meal_type/update.html +0 -0
  59. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/tests.py +0 -0
  60. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/urls.py +0 -0
  61. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/workbook/__init__.py +0 -0
  62. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/__init__.py +0 -0
  63. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/asgi.py +0 -0
  64. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/settings.py +0 -0
  65. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/templatetags/__init__.py +0 -0
  66. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/templatetags/fnschool_tags.py +0 -0
  67. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/urls.py +0 -0
  68. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/views.py +0 -0
  69. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/wsgi.py +0 -0
  70. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/locale/en/LC_MESSAGES/django.mo +0 -0
  71. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/__init__.py +0 -0
  72. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/admin.py +0 -0
  73. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/apps.py +0 -0
  74. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/forms.py +0 -0
  75. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/0001_initial.py +0 -0
  76. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/0002_alter_profile_bio.py +0 -0
  77. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/0003_alter_profile_options_alter_profile_address_and_more.py +0 -0
  78. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/0004_profile_gender.py +0 -0
  79. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/0005_alter_profile_gender.py +0 -0
  80. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/__init__.py +0 -0
  81. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/models.py +0 -0
  82. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/signals.py +0 -0
  83. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/templates/profiles/create.html +0 -0
  84. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/templates/profiles/detail.html +0 -0
  85. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/templates/profiles/edit.html +0 -0
  86. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/templates/profiles/log_in.html +0 -0
  87. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/templates/profiles/log_out.html +0 -0
  88. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/tests.py +0 -0
  89. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/urls.py +0 -0
  90. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/views.py +0 -0
  91. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/static/css/bootstrap.min.css +0 -0
  92. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/static/css/fnschool.css +0 -0
  93. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/static/images/favicon.ico +0 -0
  94. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/bootstrap.bundle.min.js +0 -0
  95. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/bootstrap.min.js +0 -0
  96. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/jquery.min.js +0 -0
  97. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/jquery.slim.min.js +0 -0
  98. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/popper.min.js +0 -0
  99. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/base/_content.html +0 -0
  100. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/base/_css.html +0 -0
  101. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/base/_js.html +0 -0
  102. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/base/content.html +0 -0
  103. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/base/header_content_footer.html +0 -0
  104. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/close.html +0 -0
  105. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/home.html +0 -0
  106. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/includes/_footer.html +0 -0
  107. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/includes/_header.html +0 -0
  108. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/includes/_navigation.html +0 -0
  109. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/includes/_paginator.html +0 -0
  110. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/registration/logged_out.html +0 -0
  111. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschoo1/templates/registration/login.html +0 -0
  112. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschool.egg-info/dependency_links.txt +0 -0
  113. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/src/fnschool.egg-info/requires.txt +0 -0
  114. {fnschool-20251013.81257.813 → fnschool-20251013.81959.843}/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: 20251013.81257.813
3
+ Version: 20251013.81959.843
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>
@@ -41,7 +41,7 @@ gui=[]
41
41
  cli=[]
42
42
 
43
43
  [project.scripts]
44
- fnschool-cli = "fnschoo1:main"
44
+ fnschool-cli = "fnschoo1.manage:main"
45
45
 
46
46
  [build-system]
47
47
  requires = [
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env python3
2
+ """Django's command-line utility for administrative tasks."""
3
+ import os
4
+ import platform
5
+ import random
6
+ import sys
7
+ from pathlib import Path
8
+
9
+ __version__ = "20251013.81959.843"
@@ -8,15 +8,22 @@
8
8
  <hr>
9
9
  <div class="container">
10
10
  <div class="row justify-content-end">
11
- <button class="btn btn-success col-md-1 col-lg-1 col-2"
12
- onclick="list_consumptions();">{% trans "Refresh" %}</button>
11
+ <button class="btn btn-outline-success col-md-1 col-lg-1 col-2 mx-2"
12
+ onclick="list_consumptions_by_week();">{% trans "Consume by Week" %}</button>
13
+
14
+ <button class="btn btn-outline-success col-md-1 col-lg-1 col-2"
15
+ onclick="list_consumptions_rapidly();">{% trans "Rapid Consumption" %}</button>
16
+
17
+ <a class="btn btn-success col-md-1 col-lg-1 col-2 mx-2"
18
+ target="canteen_list_categories"
19
+ href="{% url "canteen:list_categories" %}">{% trans "Ingredient Categories" %}</a>
13
20
 
14
21
  <div class="col col-3 col-md-2 col-lg-2">
15
22
  <input class=" form-control"
16
23
  onkeydown="if(event.keyCode==13){list_consumptions();}"
17
24
  title="{% trans 'The starting date of storage.' %}"
18
- id="storage_date_start"
19
- value="{{ request.COOKIES.storage_date_start }}">
25
+ id="storage_date_start_input"
26
+ value="{{ storage_date_start|date:"Y/m/d" }}">
20
27
  </input>
21
28
  </div>
22
29
  <div class="col col-3 col-md-2 col-lg-2">
@@ -89,14 +96,36 @@
89
96
  {{ months|json_script:'months' }}
90
97
  {{ meal_types|json_script:'meal_types' }}
91
98
  {{ date_range|json_script:'date_range' }}
99
+ {{ storage_date_start|json_script:'storage_date_start' }}
92
100
  <script>
93
101
  var ingredient_ids = JSON.parse($("#ingredient_ids").text())
94
102
  var ingredient_ids_length = ingredient_ids.length
95
103
  var months = JSON.parse($("#months").text())
96
104
  var meal_types = JSON.parse($("#meal_types").text())
105
+ var date_range = JSON.parse($("#date_range").text())
106
+
107
+ var storage_date_start = $('#storage_date_start').text().replace(new RegExp('"', 'g'), "")
108
+
97
109
  var dont_submit = false
98
110
 
99
- date_range = JSON.parse($("#date_range").text())
111
+
112
+ function list_consumptions_rapidly() {
113
+ query = {
114
+ 'by_week': 'false',
115
+ "rapidly": 'true'
116
+ }
117
+ set_cookies(query)
118
+ update_href(query)
119
+ }
120
+
121
+ function list_consumptions_by_week() {
122
+ query = {
123
+ 'by_week': 'true',
124
+ "rapidly": 'false'
125
+ }
126
+ set_cookies(query)
127
+ update_href(query)
128
+ }
100
129
 
101
130
  function get_previous_month_date(date = new Date()) {
102
131
  const prevMonthDate = new Date(date);
@@ -110,6 +139,12 @@
110
139
  return dayOfWeek === 0 || dayOfWeek === 6;
111
140
  }
112
141
 
142
+ $(document).ready(function() {
143
+ var td1 = $(".table tr > :nth-child(1):first")
144
+ $(".table tr > :nth-child(2)").css("left", td1.width() * 1.05)
145
+ });
146
+
147
+
113
148
  $(document).ready(function() {
114
149
  $(months).each(function(index, value) {
115
150
  $('.workbook-month-select').append(`<option>${value}</option>`)
@@ -123,6 +158,13 @@
123
158
 
124
159
  });
125
160
 
161
+ $(document).ready(function() {
162
+ if (get_cookie('storage_date_start') === null) {
163
+ set_cookies({
164
+ "storage_date_start": storage_date_start
165
+ })
166
+ }
167
+ });
126
168
 
127
169
  $(document).ready(function() {
128
170
  var last_meal_type = ""
@@ -200,12 +242,6 @@
200
242
  }
201
243
 
202
244
 
203
-
204
- $(document).ready(function() {
205
- var td1 = $(".table tr > :nth-child(1):first")
206
- $(".table tr > :nth-child(2)").css("left", td1.width() * 1.05)
207
- });
208
-
209
245
  $(document).ready(function() {
210
246
  dont_submit = true
211
247
  var progress = 0
@@ -366,20 +402,20 @@
366
402
  });
367
403
 
368
404
  function list_consumptions() {
369
- var storage_date_start = $('#storage_date_start').val()
370
- var storage_date_end = $('#storage_date_end').val()
405
+ var new_storage_date_start = $('#storage_date_start_input').val()
406
+ var new_storage_date_end = $('#storage_date_end_input').val()
371
407
  query = {}
372
- if (storage_date_start) {
373
- query["storage_date_start"] = storage_date_start
374
- set_simple_cookie("storage_date_start", storage_date_start)
408
+ if (new_storage_date_start) {
409
+ query["storage_date_start"] = new_storage_date_start
410
+ set_simple_cookie("storage_date_start", new_storage_date_start)
375
411
  } else {
376
412
  query["storage_date_start"] = ""
377
413
  delete_cookie("storage_date_start")
378
414
  }
379
415
 
380
- if (storage_date_end) {
381
- query["storage_date_end"] = storage_date_end
382
- set_simple_cookie("storage_date_end", storage_date_end)
416
+ if (new_storage_date_end) {
417
+ query["storage_date_end"] = new_storage_date_end
418
+ set_simple_cookie("storage_date_end", new_storage_date_end)
383
419
  } else {
384
420
  query["storage_date_end"] = ""
385
421
  delete_cookie("storage_date_end")
@@ -395,7 +431,7 @@
395
431
  position: absolute;
396
432
  }
397
433
 
398
- #storage_date_start,
434
+ #storage_date_start_input,
399
435
  #storage_date_end {
400
436
  text-align: center;
401
437
  font-family: Mono;
@@ -156,113 +156,40 @@ def split_price(total_price, quantity, prec=2):
156
156
  return [[total_price0, quantity0], [total_price1, quantity1]]
157
157
 
158
158
 
159
- def get_consumption_ingredients(request):
159
+ @login_required
160
+ def create_consumptions(request, ingredient_id=None):
160
161
  date_start = request.GET.get(
161
162
  "storage_date_start", None
162
163
  ) or request.COOKIES.get("storage_date_start", None)
163
- date_end = request.GET.get("storage_date_end", None) or request.COOKIES.get(
164
- "storage_date_end", None
165
- )
166
- ingredients = Ingredient.objects
167
- queries = Q()
168
- queries = (
169
- Q(user=request.user) & Q(is_disabled=False) & Q(is_ignorable=False)
170
- )
171
- if date_start:
172
- date_start = date_parser.parse(date_start).date()
173
- queries &= Q(storage_date__gte=date_start)
174
- if date_end:
175
- date_end = date_parser.parse(date_end).date()
176
- queries &= Q(storage_date__lte=date_end)
177
-
178
- if not date_start and not date_end:
179
- queries &= Q(quantity__gt=F("total_consumed"))
180
- ingredients = ingredients.annotate(
164
+ if not date_start:
165
+ ingredients = Ingredient.objects.annotate(
181
166
  total_consumed=Coalesce(
182
167
  Sum("consumptions__amount_used"), 0, output_field=IntegerField()
183
168
  )
184
- )
185
-
186
- ingredients = ingredients.filter(queries).order_by(
187
- "name", "storage_date", "meal_type__name", "category__name"
188
- )
189
-
190
- return ingredients
191
-
192
-
193
- def get_date_range(ingredients):
194
- date_start = ingredients.order_by("storage_date").first().storage_date
195
- today = datetime.now().date()
196
- date_end = (today.replace(day=1) + relativedelta(months=2)) - relativedelta(
197
- days=1
198
- )
199
- date_range = list(pd.date_range(start=date_start, end=date_end))
200
- date_range = [d.date() for d in date_range]
201
-
202
- return date_range
203
-
204
-
205
- @login_required
206
- @require_POST
207
- def new_consumption(request, consumption_id=None):
208
- form = None
209
- if consumption_id:
210
- consumption = Consumption.objects.filter(
211
- Q(pk=consumption_id)
212
- & Q(ingredient__user=request.user)
169
+ ).filter(
170
+ Q(quantity__gt=F("total_consumed"))
213
171
  & Q(is_disabled=False)
214
- ).first()
215
- if consumption:
216
-
217
- posted_amount_used = request.POST.get("amount_used")
218
- if (
219
- posted_amount_used.replace(".", "").isnumeric()
220
- and Decimal(posted_amount_used).is_zero()
221
- ):
222
- consumption.delete()
223
- return HttpResponse("OK", status=201)
224
-
225
- form = ConsumptionForm(request.POST, instance=consumption)
226
- else:
227
- return HttpResponse("Accepted", status=202)
172
+ & Q(is_ignorable=False)
173
+ & Q(user=request.user)
174
+ )
175
+ date_start = ingredients.order_by("storage_date").first().storage_date
228
176
 
229
177
  else:
230
- ingredient = Ingredient.objects.filter(
231
- Q(user=request.user) & Q(pk=request.POST.get("ingredient"))
232
- ).first()
233
- if not ingredient:
234
- return HttpResponse("Accepted", status=202)
235
-
236
- consumption = Consumption()
237
- consumption.ingredient = ingredient
238
- form = ConsumptionForm(request.POST, instance=consumption)
239
-
240
- if form.is_valid() and not form.instance.is_disabled:
241
- consumption = form.save(commit=False)
242
- consumption.save()
243
- return HttpResponse("OK", status=201)
244
-
245
- return HttpResponse("Accepted", status=202)
246
-
247
-
248
- @login_required
249
- def create_consumptions(request, ingredient_id=None):
250
- ingredients = get_consumption_ingredients(request)
251
- date_range = None
252
- if not ingredients:
253
- return render(
254
- request,
255
- "canteen/consumption/create.html",
256
- {"ingredients": ingredients, "date_range": date_range},
257
- )
178
+ date_start = date_parser.parse(date_start).date()
258
179
 
259
- date_range = get_date_range(ingredients)
260
180
  date_end = request.GET.get("storage_date_end", None) or request.COOKIES.get(
261
181
  "storage_date_end", None
262
182
  )
263
- if date_end:
183
+ if not date_end:
184
+ today = datetime.now().date()
185
+ date_end = (
186
+ today.replace(day=1) + relativedelta(months=2)
187
+ ) - relativedelta(days=1)
188
+ else:
264
189
  date_end = date_parser.parse(date_end).date()
265
- date_range = [d for d in date_range if d <= date_end]
190
+
191
+ date_range = list(pd.date_range(start=date_start, end=date_end))
192
+ date_range = [d.date() for d in date_range]
266
193
 
267
194
  if ingredient_id:
268
195
  ingredient = get_object_or_404(Ingredient, pk=ingredient_id)
@@ -304,8 +231,41 @@ def create_consumptions(request, ingredient_id=None):
304
231
  "canteen/consumption/_create.html",
305
232
  {"form_list": form_list},
306
233
  )
234
+ by_week = (
235
+ request.GET.get("by_week", "") or request.COOKIES.get("by_week", "")
236
+ ) == "true"
237
+ rapidly = (
238
+ request.GET.get("rapidly", "") or request.COOKIES.get("rapidly", "")
239
+ ) == "true" or not by_week
240
+
241
+ queries = (
242
+ Q(storage_date__gte=date_start)
243
+ & Q(storage_date__lte=date_end)
244
+ & Q(user=request.user)
245
+ & Q(is_disabled=False)
246
+ & Q(is_ignorable=False)
247
+ )
248
+ ingredients = Ingredient.objects
249
+ print("by_week", by_week, "rapidly", rapidly)
250
+ ingredients = (
251
+ ingredients.filter(queries).order_by(
252
+ "name", "storage_date", "meal_type__name", "category__name"
253
+ )
254
+ if rapidly
255
+ else ingredients.filter(queries).order_by(
256
+ "storage_date", "meal_type__name", "name", "category__name"
257
+ )
258
+ )
307
259
 
308
260
  ingredients = ingredients.all()
261
+
262
+ if not ingredients:
263
+ return render(
264
+ request,
265
+ "canteen/consumption/create.html",
266
+ {"ingredients": ingredients, "date_range": date_range},
267
+ )
268
+
309
269
  ingredients_pinned = []
310
270
  ingredients_unpinned = []
311
271
  categories_top = Category.objects.filter(
@@ -337,10 +297,54 @@ def create_consumptions(request, ingredient_id=None):
337
297
  "meal_types": meal_types,
338
298
  "ingredient_ids": ingredient_ids,
339
299
  "months": months,
300
+ "storage_date_start": date_start,
340
301
  },
341
302
  )
342
303
 
343
304
 
305
+ @login_required
306
+ @require_POST
307
+ def new_consumption(request, consumption_id=None):
308
+ form = None
309
+ if consumption_id:
310
+ consumption = Consumption.objects.filter(
311
+ Q(pk=consumption_id)
312
+ & Q(ingredient__user=request.user)
313
+ & Q(is_disabled=False)
314
+ ).first()
315
+ if consumption:
316
+
317
+ posted_amount_used = request.POST.get("amount_used")
318
+ if (
319
+ posted_amount_used.replace(".", "").isnumeric()
320
+ and Decimal(posted_amount_used).is_zero()
321
+ ):
322
+ consumption.delete()
323
+ return HttpResponse("OK", status=201)
324
+
325
+ form = ConsumptionForm(request.POST, instance=consumption)
326
+ else:
327
+ return HttpResponse("Accepted", status=202)
328
+
329
+ else:
330
+ ingredient = Ingredient.objects.filter(
331
+ Q(user=request.user) & Q(pk=request.POST.get("ingredient"))
332
+ ).first()
333
+ if not ingredient:
334
+ return HttpResponse("Accepted", status=202)
335
+
336
+ consumption = Consumption()
337
+ consumption.ingredient = ingredient
338
+ form = ConsumptionForm(request.POST, instance=consumption)
339
+
340
+ if form.is_valid() and not form.instance.is_disabled:
341
+ consumption = form.save(commit=False)
342
+ consumption.save()
343
+ return HttpResponse("OK", status=201)
344
+
345
+ return HttpResponse("Accepted", status=202)
346
+
347
+
344
348
  @login_required()
345
349
  def delete_ingredient(request, ingredient_id):
346
350
  ingredient = get_object_or_404(Ingredient, pk=ingredient_id)
@@ -1819,10 +1819,12 @@ class CanteenWorkBook:
1819
1819
  ingredient_name_cell.value = ingredient.name
1820
1820
  if ingredient.name:
1821
1821
  ingredient_name_cell.comment = Comment(
1822
- _("{meal_type} ({category}, Checked/Storaged at {storage_date})").format(
1822
+ _(
1823
+ "{meal_type} ({category}, Checked/Storaged at {storage_date})"
1824
+ ).format(
1823
1825
  meal_type=ingredient.meal_type,
1824
1826
  category=ingredient.category,
1825
- storage_date = ingredient.storage_date,
1827
+ storage_date=ingredient.storage_date,
1826
1828
  ),
1827
1829
  user.username,
1828
1830
  )
@@ -6,8 +6,6 @@ import random
6
6
  import sys
7
7
  from pathlib import Path
8
8
 
9
- __version__ = "20251013.81257.813"
10
-
11
9
  FNSCHOOL_PATH = Path(__file__).parent
12
10
  if FNSCHOOL_PATH.as_posix() not in sys.path:
13
11
  sys.path.insert(0, FNSCHOOL_PATH.as_posix())
@@ -37,6 +35,9 @@ def main():
37
35
  "forget to activate a virtual environment?"
38
36
  ) from exc
39
37
 
38
+ os.chdir(FNSCHOOL_PATH)
39
+ sys.argv[0] = "manage.py"
40
+
40
41
  if len(sys.argv) < 2:
41
42
  local_port = str(random.randint(8080, 65530))
42
43
  local_url = "http://127.0.0.1:" + local_port
@@ -46,8 +47,12 @@ def main():
46
47
  if is_windows:
47
48
  os.startfile(local_url)
48
49
  else:
49
- os.system("sleep 5 && open " + local_url)
50
+ os.system("open " + local_url + "&")
50
51
  except Exception as e:
51
52
  print(e)
52
53
 
53
54
  execute_from_command_line(sys.argv)
55
+
56
+
57
+ if __name__ == "__main__":
58
+ main()
@@ -9,7 +9,16 @@ function get_cookie(name) {
9
9
  return null
10
10
  }
11
11
  function delete_cookie(name) {
12
- document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'
12
+ document.cookie =
13
+ name +
14
+ `=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=${window.location.pathname}`
15
+ }
16
+
17
+ function set_cookies(cookies) {
18
+ cookies = new Map(Object.entries(cookies))
19
+ for (var [key, value] of cookies) {
20
+ set_simple_cookie(key, value)
21
+ }
13
22
  }
14
23
 
15
24
  function set_simple_cookie(key, value) {
@@ -19,7 +28,7 @@ function set_simple_cookie(key, value) {
19
28
  }
20
29
  const expiryDate = new Date()
21
30
  expiryDate.setFullYear(expiryDate.getFullYear() + 20)
22
- document.cookie = `${key}=${value}; expires=${expiryDate.toUTCString()}; path=/`
31
+ document.cookie = `${key}=${value}; expires=${expiryDate.toUTCString()}; path=${window.location.pathname}`
23
32
  }
24
33
  function update_href(query) {
25
34
  query = new Map(Object.entries(query))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fnschool
3
- Version: 20251013.81257.813
3
+ Version: 20251013.81959.843
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>
@@ -98,7 +98,12 @@ src/fnschoo1/templates/registration/logged_out.html
98
98
  src/fnschoo1/templates/registration/login.html
99
99
  src/fnschool.egg-info/PKG-INFO
100
100
  src/fnschool.egg-info/SOURCES.txt
101
+ src/fnschool.egg-info/SOURCES.txt.py
101
102
  src/fnschool.egg-info/dependency_links.txt
103
+ src/fnschool.egg-info/dependency_links.txt.py
102
104
  src/fnschool.egg-info/entry_points.txt
105
+ src/fnschool.egg-info/entry_points.txt.py
103
106
  src/fnschool.egg-info/requires.txt
104
- src/fnschool.egg-info/top_level.txt
107
+ src/fnschool.egg-info/requires.txt.py
108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XXXXXXXXXXXXXXXXXXXX
98
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
99
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
100
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
101
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
102
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
103
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
104
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ fnschool-cli = fnschoo1.manage:main
@@ -0,0 +1,2 @@
1
+ XXXXXXXXXXXXXXXXX
2
+ XXXXXXXXXXXX X XXXXXXXXXXXXX
@@ -0,0 +1,13 @@
1
+ XXXXXX
2
+ XXXXXX
3
+ XXXXXXXXXX
4
+ XXXXX
5
+ XXXXXXXX
6
+ XXXXXXXXXXXX
7
+ XXXXXXX
8
+ XXXXXXXXXXXXXXXXXXX
9
+ XXXXXXXXXXXXXXXXX
10
+
11
+ XXXXX
12
+
13
+ XXXXX
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Django's command-line utility for administrative tasks."""
3
- import os
4
- import platform
5
- import random
6
- import sys
7
-
8
-
9
- def main():
10
- """Run administrative tasks."""
11
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fnschool.settings")
12
- try:
13
- from django.core.management import execute_from_command_line
14
- except ImportError as exc:
15
- raise ImportError(
16
- "Couldn't import Django. Are you sure it's installed and "
17
- "available on your PYTHONPATH environment variable? Did you "
18
- "forget to activate a virtual environment?"
19
- ) from exc
20
-
21
- execute_from_command_line(sys.argv)
22
-
23
-
24
- if __name__ == "__main__":
25
- main()
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- fnschool-cli = fnschoo1:main