fnschool 20251013.81919.815__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 (111) hide show
  1. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/PKG-INFO +1 -1
  2. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/__init__.py +1 -1
  3. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/consumption/create.html +23 -12
  4. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/views.py +1 -0
  5. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschool.egg-info/PKG-INFO +1 -1
  6. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/LICENSE +0 -0
  7. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/README.md +0 -0
  8. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/pyproject.toml +0 -0
  9. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/setup.cfg +0 -0
  10. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/__init__.py +0 -0
  11. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/admin.py +0 -0
  12. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/apps.py +0 -0
  13. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/forms.py +0 -0
  14. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0001_initial.py +0 -0
  15. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0002_ingredient_is_disabled.py +0 -0
  16. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0003_consumption_is_disabled_alter_ingredient_is_disabled.py +0 -0
  17. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0004_alter_ingredient_name_category_and_more.py +0 -0
  18. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0005_alter_category_created_at_alter_category_name_and_more.py +0 -0
  19. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0006_category_is_disabled_alter_category_user_and_more.py +0 -0
  20. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0007_alter_consumption_amount_used_and_more.py +0 -0
  21. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0008_category_abbreviation_mealtype.py +0 -0
  22. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0009_alter_category_abbreviation_and_more.py +0 -0
  23. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0010_alter_consumption_options_alter_ingredient_options_and_more.py +0 -0
  24. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0011_category_pin_to_consumptions_top.py +0 -0
  25. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0012_alter_ingredient_storage_date.py +0 -0
  26. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/0013_alter_consumption_options_alter_ingredient_options_and_more.py +0 -0
  27. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/migrations/__init__.py +0 -0
  28. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/models.py +0 -0
  29. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/category/create.html +0 -0
  30. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/category/delete.html +0 -0
  31. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/category/list.html +0 -0
  32. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/category/update.html +0 -0
  33. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/close.html +0 -0
  34. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/consumption/_create.html +0 -0
  35. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/close.html +0 -0
  36. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/create.html +0 -0
  37. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/create_one.html +0 -0
  38. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/delete.html +0 -0
  39. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/list.html +0 -0
  40. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/ingredient/update.html +0 -0
  41. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/meal_type/create.html +0 -0
  42. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/meal_type/delete.html +0 -0
  43. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/meal_type/list.html +0 -0
  44. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/templates/canteen/meal_type/update.html +0 -0
  45. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/tests.py +0 -0
  46. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/urls.py +0 -0
  47. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/workbook/__init__.py +0 -0
  48. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/canteen/workbook/generate.py +0 -0
  49. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/__init__.py +0 -0
  50. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/asgi.py +0 -0
  51. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/settings.py +0 -0
  52. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/templatetags/__init__.py +0 -0
  53. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/templatetags/fnschool_tags.py +0 -0
  54. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/urls.py +0 -0
  55. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/views.py +0 -0
  56. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/fnschool/wsgi.py +0 -0
  57. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/locale/en/LC_MESSAGES/django.mo +0 -0
  58. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  59. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/manage.py +0 -0
  60. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/__init__.py +0 -0
  61. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/admin.py +0 -0
  62. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/apps.py +0 -0
  63. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/forms.py +0 -0
  64. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/0001_initial.py +0 -0
  65. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/0002_alter_profile_bio.py +0 -0
  66. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/0003_alter_profile_options_alter_profile_address_and_more.py +0 -0
  67. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/0004_profile_gender.py +0 -0
  68. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/0005_alter_profile_gender.py +0 -0
  69. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/migrations/__init__.py +0 -0
  70. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/models.py +0 -0
  71. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/signals.py +0 -0
  72. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/templates/profiles/create.html +0 -0
  73. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/templates/profiles/detail.html +0 -0
  74. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/templates/profiles/edit.html +0 -0
  75. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/templates/profiles/log_in.html +0 -0
  76. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/templates/profiles/log_out.html +0 -0
  77. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/tests.py +0 -0
  78. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/urls.py +0 -0
  79. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/profiles/views.py +0 -0
  80. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/static/css/bootstrap.min.css +0 -0
  81. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/static/css/fnschool.css +0 -0
  82. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/static/images/favicon.ico +0 -0
  83. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/bootstrap.bundle.min.js +0 -0
  84. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/bootstrap.min.js +0 -0
  85. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/fnschool.js +0 -0
  86. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/jquery.min.js +0 -0
  87. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/jquery.slim.min.js +0 -0
  88. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/static/js/popper.min.js +0 -0
  89. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/base/_content.html +0 -0
  90. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/base/_css.html +0 -0
  91. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/base/_js.html +0 -0
  92. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/base/content.html +0 -0
  93. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/base/header_content_footer.html +0 -0
  94. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/close.html +0 -0
  95. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/home.html +0 -0
  96. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/includes/_footer.html +0 -0
  97. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/includes/_header.html +0 -0
  98. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/includes/_navigation.html +0 -0
  99. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/includes/_paginator.html +0 -0
  100. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/registration/logged_out.html +0 -0
  101. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschoo1/templates/registration/login.html +0 -0
  102. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschool.egg-info/SOURCES.txt +0 -0
  103. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschool.egg-info/SOURCES.txt.py +0 -0
  104. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschool.egg-info/dependency_links.txt +0 -0
  105. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschool.egg-info/dependency_links.txt.py +0 -0
  106. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschool.egg-info/entry_points.txt +0 -0
  107. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschool.egg-info/entry_points.txt.py +0 -0
  108. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschool.egg-info/requires.txt +0 -0
  109. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschool.egg-info/requires.txt.py +0 -0
  110. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/src/fnschool.egg-info/top_level.txt +0 -0
  111. {fnschool-20251013.81919.815 → fnschool-20251013.81959.843}/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: 20251013.81919.815
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>
@@ -6,4 +6,4 @@ import random
6
6
  import sys
7
7
  from pathlib import Path
8
8
 
9
- __version__ = "20251013.81919.815"
9
+ __version__ = "20251013.81959.843"
@@ -22,8 +22,8 @@
22
22
  <input class=" form-control"
23
23
  onkeydown="if(event.keyCode==13){list_consumptions();}"
24
24
  title="{% trans 'The starting date of storage.' %}"
25
- id="storage_date_start"
26
- value="{{ request.COOKIES.storage_date_start }}">
25
+ id="storage_date_start_input"
26
+ value="{{ storage_date_start|date:"Y/m/d" }}">
27
27
  </input>
28
28
  </div>
29
29
  <div class="col col-3 col-md-2 col-lg-2">
@@ -96,14 +96,18 @@
96
96
  {{ months|json_script:'months' }}
97
97
  {{ meal_types|json_script:'meal_types' }}
98
98
  {{ date_range|json_script:'date_range' }}
99
+ {{ storage_date_start|json_script:'storage_date_start' }}
99
100
  <script>
100
101
  var ingredient_ids = JSON.parse($("#ingredient_ids").text())
101
102
  var ingredient_ids_length = ingredient_ids.length
102
103
  var months = JSON.parse($("#months").text())
103
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
+
104
109
  var dont_submit = false
105
110
 
106
- date_range = JSON.parse($("#date_range").text())
107
111
 
108
112
  function list_consumptions_rapidly() {
109
113
  query = {
@@ -154,6 +158,13 @@
154
158
 
155
159
  });
156
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
+ });
157
168
 
158
169
  $(document).ready(function() {
159
170
  var last_meal_type = ""
@@ -391,20 +402,20 @@
391
402
  });
392
403
 
393
404
  function list_consumptions() {
394
- var storage_date_start = $('#storage_date_start').val()
395
- 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()
396
407
  query = {}
397
- if (storage_date_start) {
398
- query["storage_date_start"] = storage_date_start
399
- 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)
400
411
  } else {
401
412
  query["storage_date_start"] = ""
402
413
  delete_cookie("storage_date_start")
403
414
  }
404
415
 
405
- if (storage_date_end) {
406
- query["storage_date_end"] = storage_date_end
407
- 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)
408
419
  } else {
409
420
  query["storage_date_end"] = ""
410
421
  delete_cookie("storage_date_end")
@@ -420,7 +431,7 @@
420
431
  position: absolute;
421
432
  }
422
433
 
423
- #storage_date_start,
434
+ #storage_date_start_input,
424
435
  #storage_date_end {
425
436
  text-align: center;
426
437
  font-family: Mono;
@@ -297,6 +297,7 @@ def create_consumptions(request, ingredient_id=None):
297
297
  "meal_types": meal_types,
298
298
  "ingredient_ids": ingredient_ids,
299
299
  "months": months,
300
+ "storage_date_start": date_start,
300
301
  },
301
302
  )
302
303
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fnschool
3
- Version: 20251013.81919.815
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>