diff --git a/app.log b/app.log index 631dea86..523be6f2 100644 --- a/app.log +++ b/app.log @@ -1,65 +1,58 @@ -Request: 127.0.0.1 GET http /store/stock_items?id_category=3&id_product=&is_out_of_stock=false&quantity_min=&quantity_max= Host: 127.0.0.1:5000 -User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0 -Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8 -Accept-Language: en-GB,en;q=0.5 -Accept-Encoding: gzip, deflate, br, zstd -Referer: http://127.0.0.1:5000/store/stock_items?id_category=3&id_product=3&is_out_of_stock=false&quantity_min=&quantity_max= -Dnt: 1 -Connection: keep-alive -Cookie: session=.eJytVlnPqzgS_SutSN1PnVz25ZOuZsgGJIEkhLC9ILBZzB6WLPTc_z4m3-2-_dCzSSOFYLtMnVOuclX9NguGPq1b1EXw2kXt7OO3GQgqP4Alqvyur9to9tG3Q_Trn5aH98bP1agMUDH7mEXwEbRwUSIIi6ivq65Effr3ZJIuQF3Ofp3FqO36KiixwpkZQfjCawj6YGjbqAIvH0ZxMBT97KMaiuItaqME1dVfCD4JkH-M_ckIAut9v__BsQIViiwQRBYSYsATYUAScRRPgJ3_ZuzfoxbFKIKzjzgouugtQRUoBhhB35LMH6ifdmJxNzQY6s_Gd0P73SDtd7vnl8nw2Td8Xl0b-32dRxWWg1gAbMCIPA0ZhuBogqZCigAEB4OQJ7kwZCkYEhyHKQ7f3RAAEHXdHxqi1y4NZYCOaJcHjooOq10Rlto0X2rZlTIIXVfRAwWOPqpZjQLFIICicYeXmHuO24cVTINRfeiZV3iZVx_lggkRS4IXm0LHqLUVm2FKd7UiFgtn617dFzzsYq1Rzr26GJ8usLan_Fjvjp4S3kxnpUgyw87l89Vlo-3TlTJ_v2eq_c7Ir-y-7kb_DC-I2SRjv_GsRD8YZbvpu7AW2uU6NIqIu7KR4kXD7gga1iSSw3wv1kbp1-d-wzV3F6zm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t3FP-6w_acZE7S8HwzJKRGMZleWKvLvHavr7ZLU_VxN24A5_4BBu7QydSZXy2TU0EmIfNMLdY1IuuiNHWqMawEmqcSn7a-cpwvg7CshgHFxT60IYVW0m0jP4bLGvDpeLmC-W3r1KqrFkldtKaYWanVgKbjHXNfKQdWMh8rKSmgy0XQJtf9PeoFUeK0ZfUMVXtvnqBc7SFhioW-dLqWOfm0aD3sQLzKD8xTTG1PbY-7ka-OzjLMeOtCL4W56C0FV3N3hHhEp3lLJDh_daBupsqI_ysEf2raOkZF9NNnv_Dr7J2w_P713rOMghYXvc_ah6q4fte_ARfnWSJnr_6ma_YqvaDn7chTxnm0FFsKot0O3-_Z_9KC_IvSj1PqZ47lOF7kBJxQf0-6HE1-LnQdBkj7vuk-vnyB0X1ePYKcwgU7irlUQM9qMXSLd_cxQX3BWN8bg_9MqkIg_3ebpy11BSY5H25lXekdYuTjoE-SJcVusbhBoB-mRu0Pht0iaYN70Aftm87n8AtLQzqmcP_BQ5Zi-VhgYooHAcELPBNCjvlb95URiF_ar03yC_z61vUzLf1MbfEPwOqHfXj-qbLDowgumurtcTQ57O4kWpZr2VxQ1iE-5yUdcv5RVq3xHvYqlU8bh_C_6dWGBgY97sYmZ8wogmLmJDEnSZPgP2jqg2EXNC14s2_fvv0TX22jag.ZwjUoA.pitPRgpTPJyCaDMIr0TPpBG_lIc -Upgrade-Insecure-Requests: 1 -Sec-Fetch-Dest: document -Sec-Fetch-Mode: navigate -Sec-Fetch-Site: same-origin -Sec-Fetch-User: ?1 -Sec-Gpc: 1 -Priority: u=0, i - - -Request data: b'' -Traceback: Traceback (most recent call last): - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask_cors\extension.py", line 178, in wrapped_function - return cors_after_request(app.make_response(f(*args, **kwargs))) - ^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 45, in stock_items - return render_template('pages/store/_stock_items.html', model = model, datetime = datetime) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 150, in render_template - return _render(app, template, context) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 131, in _render - rv = template.render(context) - ^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 1304, in render - self.environment.handle_exception() - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 939, in handle_exception - raise rewrite_traceback_stack(source=source) - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 1, in top-level template code - {% extends 'layouts/layout.html' %} - ^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\layouts\layout.html", line 316, in top-level template code - {% block page_body %}{% endblock %} - ^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 100, in block 'page_body' - {% include 'components/store/_row_stock_item.html' %} - ^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_row_stock_item.html", line 78, in top-level template code - {{ model.ATTR_VALUE_CURRENT }}="{{ currency.id_currency_cost }}" - ^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 487, in getattr - return getattr(obj, attribute) - ^^^^^^^^^^^^^^^^^^^^^^^ -jinja2.exceptions.UndefinedError: 'currency' is undefined - +Traceback: Traceback (most recent call last): + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 1473, in wsgi_app + response = self.full_dispatch_request() + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request + rv = self.handle_user_exception(e) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask_cors\extension.py", line 178, in wrapped_function + return cors_after_request(app.make_response(f(*args, **kwargs))) + ^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request + rv = self.dispatch_request() + ^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request + return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 45, in stock_items + return render_template('pages/store/_stock_items.html', model = model, datetime = datetime) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 150, in render_template + return _render(app, template, context) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 131, in _render + rv = template.render(context) + ^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 1304, in render + self.environment.handle_exception() + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 939, in handle_exception + raise rewrite_traceback_stack(source=source) + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 1, in top-level template code + {% extends 'layouts/layout.html' %} + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\layouts\layout.html", line 326, in top-level template code + {% block page_body %}{% endblock %} + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 127, in block 'page_body' + var products = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.category_list_filters.get_list_products()) | tojson | safe }}; + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_base.py", line 335, in convert_list_objects_to_dict_json_by_attribute_key_default + return Model_View_Base.convert_list_objects_to_dict_json_by_attribute_key(list_objects, getattr(obj_class, obj_class.FLAG_NAME_ATTR_OPTION_VALUE)) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_base.py", line 323, in convert_list_objects_to_dict_json_by_attribute_key + return {getattr(obj, key): obj.to_json() for obj in list_objects} + ^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\store\product.py", line 346, in to_json + self.ATTR_ID_PRODUCT_PERMUTATION: [permutation.to_json() for permutation in self.permutations], + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\store\product_permutation.py", line 303, in to_json + self.FLAG_PRODUCT_IMAGE: [image.to_json() for image in self.images], + ^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\store\image.py", line 99, in to_json + **self.get_shared_json_attributes(self), + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\base.py", line 68, in get_shared_json_attributes + cls.FLAG_NAME_ATTR_OPTION_TEXT: object.NAME_ATTR_OPTION_TEXT, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AttributeError: 'Image' object has no attribute 'NAME_ATTR_OPTION_TEXT'. Did you mean: 'FLAG_NAME_ATTR_OPTION_TEXT'? + diff --git a/app.log.1 b/app.log.1 index 82d34c9e..9ddd2271 100644 --- a/app.log.1 +++ b/app.log.1 @@ -1,46 +1,3 @@ -Request: 127.0.0.1 GET http /store/stock_items?id_category=3&id_product=3&is_out_of_stock=false&quantity_min=&quantity_max= Host: 127.0.0.1:5000 -User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0 -Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8 -Accept-Language: en-GB,en;q=0.5 -Accept-Encoding: gzip, deflate, br, zstd -Referer: http://127.0.0.1:5000/store/stock_items?id_category=3&id_product=&is_out_of_stock=false&quantity_min=&quantity_max= -Dnt: 1 -Connection: keep-alive -Cookie: session=.eJytVlnPqzgS_SutSN1PnVz25ZOuZsgGJIEkhLC9ILBZzB6WLPTc_z4m3-2-_dCzSSOFYLtMnVOuclX9NguGPq1b1EXw2kXt7OO3GQgqP4Alqvyur9to9tG3Q_Trn5aH98bP1agMUDH7mEXwEbRwUSIIi6ivq65Effr3ZJIuQF3Ofp3FqO36KiixwpkZQfjCawj6YGjbqAIvH0ZxMBT97KMaiuItaqME1dVfCD4JkH-M_ckIAut9v__BsQIViiwQRBYSYsATYUAScRRPgJ3_ZuzfoxbFKIKzjzgouugtQRUoBhhB35LMH6ifdmJxNzQY6s_Gd0P73SDtd7vnl8nw2Td8Xl0b-32dRxWWg1gAbMCIPA0ZhuBogqZCigAEB4OQJ7kwZCkYEhyHKQ7f3RAAEHXdHxqi1y4NZYCOaJcHjooOq10Rlto0X2rZlTIIXVfRAwWOPqpZjQLFIICicYeXmHuO24cVTINRfeiZV3iZVx_lggkRS4IXm0LHqLUVm2FKd7UiFgtn617dFzzsYq1Rzr26GJ8usLan_Fjvjp4S3kxnpUgyw87l89Vlo-3TlTJ_v2eq_c7Ir-y-7kb_DC-I2SRjv_GsRD8YZbvpu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WkdXTv6tNecCVkPG8X59CsvdMmlKvhUt5O7fa0fOmdq8DTQRt3FP-6w_acZE7S8HwzJKRGMZleWKvLvHavr7ZLU_VxN24A5_4BBu7QydSZXy2TU0EmIfNMLdY1IuuiNHWqMawEmqcSn7a-cpwvg7CshgHFxT60IYVW0m0jP4bLGvDpeLmC-W3r1KqrFkldtKaYWanVgKbjHXNfKQdWMh8rKSmgy0XQJtf9PeoFUeK0ZfUMVXtvnqBc7SFhioW-dLqWOfm0aD3sQLzKD8xTTG1PbY-7ka-OzjLMeOtCL4W56C0FV3N3hHhEp3lLJDh_daBupsqI_ysEf2raOkZF9NNnv_Dr7J2w_P713rOMghYXvc_ah6q4fte_ARfnWSJnr_6ma_YqvaDn7chTxnm0FFsKot0O3-_Z_9KC_IvSj1PqZ47lOF7kBJxQf0-6HE1-LnQdBkj7vuk-vnyB0X1ePYKcwgU7irlUQM9qMXSLd_cxQX3BWN8bg_9MqkIg_3ebpy11BSY5H25lXekdYuTjoE-SJcVusbhBoB-mRu0Pht0iaYN70Aftm87n8AtLQzqmcP_BQ5Zi-VhgYooHAcELPBNCjvlb95URiF_ar03yC_z61vUzLf1MbfEPwOqHfXj-qbLDowgumurtcTQ57O4kWpZr2VxQ1iE-5yUdcv5RVq3xHvYqlU8bh_C_6dWGBgY97sYmZ8wogmLmJDEnSZPgP2jqg2EXNC14s2_fvv0TX22jag.ZwjUoA.pitPRgpTPJyCaDMIr0TPpBG_lIc -Upgrade-Insecure-Requests: 1 -Sec-Fetch-Dest: document -Sec-Fetch-Mode: navigate -Sec-Fetch-Site: same-origin -Sec-Fetch-User: ?1 -Sec-Gpc: 1 -Priority: u=0, i - - -Request data: b'' -Traceback: Traceback (most recent call last): - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask_cors\extension.py", line 178, in wrapped_function - return cors_after_request(app.make_response(f(*args, **kwargs))) - ^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 40, in stock_items - model = Model_View_Store_Stock_Item(form_filters) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_stock_item.py", line 90, in __init__ - print(f'product: {product}\n{product[Stock_Item.ATTR_ID_PRODUCT_CATEGORY]}\{nself.form_filters.id_category.data}') - ^^^^^ -NameError: name 'nself' is not defined. Did you mean: 'self'? - Exception on /store/stock_items [GET] Traceback (most recent call last): File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 1473, in wsgi_app @@ -74,17 +31,48 @@ Traceback (most recent call last): File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 1, in top-level template code {% extends 'layouts/layout.html' %} ^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\layouts\layout.html", line 316, in top-level template code + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\layouts\layout.html", line 326, in top-level template code {% block page_body %}{% endblock %} ^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 100, in block 'page_body' - {% include 'components/store/_row_stock_item.html' %} + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 127, in block 'page_body' + var products = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.category_list_filters.get_list_products()) | tojson | safe }}; ^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_row_stock_item.html", line 78, in top-level template code - {{ model.ATTR_VALUE_CURRENT }}="{{ currency.id_currency_cost }}" - ^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 487, in getattr - return getattr(obj, attribute) - ^^^^^^^^^^^^^^^^^^^^^^^ -jinja2.exceptions.UndefinedError: 'currency' is undefined + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_base.py", line 335, in convert_list_objects_to_dict_json_by_attribute_key_default + return Model_View_Base.convert_list_objects_to_dict_json_by_attribute_key(list_objects, getattr(obj_class, obj_class.FLAG_NAME_ATTR_OPTION_VALUE)) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_base.py", line 323, in convert_list_objects_to_dict_json_by_attribute_key + return {getattr(obj, key): obj.to_json() for obj in list_objects} + ^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\store\product.py", line 346, in to_json + self.ATTR_ID_PRODUCT_PERMUTATION: [permutation.to_json() for permutation in self.permutations], + ^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\store\product_permutation.py", line 303, in to_json + self.FLAG_PRODUCT_IMAGE: [image.to_json() for image in self.images], + ^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\store\image.py", line 99, in to_json + **self.get_shared_json_attributes(self), + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\base.py", line 68, in get_shared_json_attributes + cls.FLAG_NAME_ATTR_OPTION_TEXT: object.NAME_ATTR_OPTION_TEXT, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AttributeError: 'Image' object has no attribute 'NAME_ATTR_OPTION_TEXT'. Did you mean: 'FLAG_NAME_ATTR_OPTION_TEXT'? Server Error: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. +Request: 127.0.0.1 GET http /store/stock_items? Host: 127.0.0.1:5000 +User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8 +Accept-Language: en-GB,en;q=0.5 +Accept-Encoding: gzip, deflate, br, zstd +Dnt: 1 +Connection: keep-alive +Referer: http://127.0.0.1:5000/store/stock_items +Cookie: session=.eJytVlnPqzgS_SutSN1PnVz25ZOuZsgGJIEkhLC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BWN8bg_9MqkIg_3ebpy11BSY5H25lXekdYuTjoE-SJcVusbhBoB-mRu0Pht0iaYN70Aftm87n8AtLQzqmcP_BQ5Zi-VhgYooHAcELPBNCjvlb95URiF_ar03yC_z61vUzLf1MbfEPwOqHfXj-qbLDowgumurtcTQ57O4kWpZr2VxQ1iE-5yUdcv5RVq3xHvYqlU8bh_C_6dWGBgY97sYmZ8wogmLmJDEnSZPgP2jqg2EXNC14s2_fvv0TX22jag.ZwjUoA.pitPRgpTPJyCaDMIr0TPpBG_lIc +Upgrade-Insecure-Requests: 1 +Sec-Fetch-Dest: document +Sec-Fetch-Mode: navigate +Sec-Fetch-Site: same-origin +Sec-Fetch-User: ?1 +Sec-Gpc: 1 +Priority: u=0, i + + +Request data: b'' diff --git a/app.log.2 b/app.log.2 index 54248294..27d86a6b 100644 --- a/app.log.2 +++ b/app.log.2 @@ -1,11 +1,12 @@ -Request: 127.0.0.1 GET http /store/stock_items?id_category=3&id_product=3&is_out_of_stock=false&quantity_min=&quantity_max= Host: 127.0.0.1:5000 +Server Error: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. +Request: 127.0.0.1 GET http /store/categories? Host: 127.0.0.1:5000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8 Accept-Language: en-GB,en;q=0.5 Accept-Encoding: gzip, deflate, br, zstd -Referer: http://127.0.0.1:5000/store/stock_items?id_category=3&id_product=&is_out_of_stock=false&quantity_min=&quantity_max= Dnt: 1 Connection: keep-alive +Referer: http://127.0.0.1:5000/store/categories Cookie: session=.eJytVlnPqzgS_SutSN1PnVz25ZOuZsgGJIEkhLC9ILBZzB6WLPTc_z4m3-2-_dCzSSOFYLtMnVOuclX9NguGPq1b1EXw2kXt7OO3GQgqP4Alqvyur9to9tG3Q_Trn5aH98b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gYooHAcELPBNCjvlb95URiF_ar03yC_z61vUzLf1MbfEPwOqHfXj-qbLDowgumurtcTQ57O4kWpZr2VxQ1iE-5yUdcv5RVq3xHvYqlU8bh_C_6dWGBgY97sYmZ8wogmLmJDEnSZPgP2jqg2EXNC14s2_fvv0TX22jag.ZwjUoA.pitPRgpTPJyCaDMIr0TPpBG_lIc Upgrade-Insecure-Requests: 1 Sec-Fetch-Dest: document @@ -33,36 +34,25 @@ Traceback: Traceback (most recent call last): File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 40, in stock_items - model = Model_View_Store_Stock_Item(form_filters) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_stock_item.py", line 89, in __init__ - if product.id_category != self.form_filters.id_category.data and self.form_filters.id_category.data != '': - ^^^^^^^^^^^^^^^^^^^ -AttributeError: 'dict' object has no attribute 'id_category' + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\product_category.py", line 56, in categories + model = Model_View_Store_Product_Category(form_filters) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_product_category.py", line 49, in __init__ + filters_product = Parameters_Product.from_filters_product_category(self.form_filters) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\store\product.py", line 596, in from_filters_product_category + return cls( + ^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\db_base.py", line 28, in __init__ + super().__init__(**kwargs) # a_id_user=a_id_user, + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\pydantic\main.py", line 193, in __init__ + self.__pydantic_validator__.validate_python(data, self_instance=self) +pydantic_core._pydantic_core.ValidationError: 2 validation errors for Parameters_Product +get_inactive_product_category + Input should be a valid boolean [type=bool_type, input_value=, input_type=BooleanField] + For further information visit https://errors.pydantic.dev/2.8/v/bool_type +ids_product + Input should be a valid string [type=string_type, input_value=False, input_type=bool] + For further information visit https://errors.pydantic.dev/2.8/v/string_type -Exception on /store/stock_items [GET] -Traceback (most recent call last): - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 1473, in wsgi_app - response = self.full_dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request - rv = self.handle_user_exception(e) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask_cors\extension.py", line 178, in wrapped_function - return cors_after_request(app.make_response(f(*args, **kwargs))) - ^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request - rv = self.dispatch_request() - ^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 40, in stock_items - model = Model_View_Store_Stock_Item(form_filters) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_stock_item.py", line 90, in __init__ - print(f'product: {product}\n{product[Stock_Item.ATTR_ID_PRODUCT_CATEGORY]}\{nself.form_filters.id_category.data}') - ^^^^^ -NameError: name 'nself' is not defined. Did you mean: 'self'? -Server Error: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. diff --git a/app.log.3 b/app.log.3 index f3930331..24e903c5 100644 --- a/app.log.3 +++ b/app.log.3 @@ -1,9 +1,9 @@ -Request: 127.0.0.1 GET http /store/stock_items?id_category=3&id_product=3&is_out_of_stock=false&quantity_min=&quantity_max= Host: 127.0.0.1:5000 +Request: 127.0.0.1 GET http /store/stock_items?id_category=3&id_product=&is_out_of_stock=false&quantity_min=&quantity_max= Host: 127.0.0.1:5000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8 Accept-Language: en-GB,en;q=0.5 Accept-Encoding: gzip, deflate, br, zstd -Referer: http://127.0.0.1:5000/store/stock_items?id_category=3&id_product=&is_out_of_stock=false&quantity_min=&quantity_max= +Referer: http://127.0.0.1:5000/store/stock_items?id_category=3&id_product=3&is_out_of_stock=false&quantity_min=&quantity_max= Dnt: 1 Connection: keep-alive Cookie: session=.eJytVlnPqzgS_SutSN1PnVz25ZOuZsgGJIEkhLC9ILBZzB6WLPTc_z4m3-2-_dCzSSOFYLtMnVOuclX9NguGPq1b1EXw2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Pht0iaYN70Aftm87n8AtLQzqmcP_BQ5Zi-VhgYooHAcELPBNCjvlb95URiF_ar03yC_z61vUzLf1MbfEPwOqHfXj-qbLDowgumurtcTQ57O4kWpZr2VxQ1iE-5yUdcv5RVq3xHvYqlU8bh_C_6dWGBgY97sYmZ8wogmLmJDEnSZPgP2jqg2EXNC14s2_fvv0TX22jag.ZwjUoA.pitPRgpTPJyCaDMIr0TPpBG_lIc @@ -33,15 +33,37 @@ Traceback: Traceback (most recent call last): File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 40, in stock_items - model = Model_View_Store_Stock_Item(form_filters) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_stock_item.py", line 89, in __init__ - self.form_filters.import_values(filters_stock_item) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -AttributeError: 'Filters_Stock_Item' object has no attribute 'import_values' + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 45, in stock_items + return render_template('pages/store/_stock_items.html', model = model, datetime = datetime) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 150, in render_template + return _render(app, template, context) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 131, in _render + rv = template.render(context) + ^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 1304, in render + self.environment.handle_exception() + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 939, in handle_exception + raise rewrite_traceback_stack(source=source) + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 1, in top-level template code + {% extends 'layouts/layout.html' %} + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\layouts\layout.html", line 316, in top-level template code + {% block page_body %}{% endblock %} + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 100, in block 'page_body' + {% include 'components/store/_row_stock_item.html' %} + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_row_stock_item.html", line 78, in top-level template code + {{ model.ATTR_VALUE_CURRENT }}="{{ currency.id_currency_cost }}" + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 487, in getattr + return getattr(obj, attribute) + ^^^^^^^^^^^^^^^^^^^^^^^ +jinja2.exceptions.UndefinedError: 'currency' is undefined -Exception on /store/stock_items [GET] +Exception on /store/categories [GET] Traceback (most recent call last): File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 1473, in wsgi_app response = self.full_dispatch_request() @@ -58,11 +80,24 @@ Traceback (most recent call last): File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 40, in stock_items - model = Model_View_Store_Stock_Item(form_filters) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_stock_item.py", line 89, in __init__ - if product.id_category != self.form_filters.id_category.data and self.form_filters.id_category.data != '': - ^^^^^^^^^^^^^^^^^^^ -AttributeError: 'dict' object has no attribute 'id_category' -Server Error: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\product_category.py", line 56, in categories + model = Model_View_Store_Product_Category(form_filters) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_product_category.py", line 49, in __init__ + filters_product = Parameters_Product.from_filters_product_category(self.form_filters) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\store\product.py", line 596, in from_filters_product_category + return cls( + ^^^^ + File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\db_base.py", line 28, in __init__ + super().__init__(**kwargs) # a_id_user=a_id_user, + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\pydantic\main.py", line 193, in __init__ + self.__pydantic_validator__.validate_python(data, self_instance=self) +pydantic_core._pydantic_core.ValidationError: 2 validation errors for Parameters_Product +get_inactive_product_category + Input should be a valid boolean [type=bool_type, input_value=, input_type=BooleanField] + For further information visit https://errors.pydantic.dev/2.8/v/bool_type +ids_product + Input should be a valid string [type=string_type, input_value=False, input_type=bool] + For further information visit https://errors.pydantic.dev/2.8/v/string_type diff --git a/business_objects/__pycache__/base.cpython-312.pyc b/business_objects/__pycache__/base.cpython-312.pyc index 5f33a95b..ad5c69b4 100644 Binary files a/business_objects/__pycache__/base.cpython-312.pyc and b/business_objects/__pycache__/base.cpython-312.pyc differ diff --git a/business_objects/base.py b/business_objects/base.py index 6d6c9a9a..6a2ee579 100644 --- a/business_objects/base.py +++ b/business_objects/base.py @@ -51,8 +51,10 @@ class Base(): FLAG_URL: ClassVar[str] = 'url' FLAG_VALUE_LOCAL_VAT_EXCL: ClassVar[str] = 'value_local_vat_excl' FLAG_VALUE_LOCAL_VAT_INCL: ClassVar[str] = 'value_local_vat_incl' + """ NAME_ATTR_OPTION_TEXT: ClassVar[str] = 'name-attribute-option-text' NAME_ATTR_OPTION_VALUE: ClassVar[str] = 'name-attribute-option-value' + """ @classmethod def output_bool(cls, value): diff --git a/business_objects/store/__pycache__/image.cpython-312.pyc b/business_objects/store/__pycache__/image.cpython-312.pyc index 1ecc355a..0dfe173d 100644 Binary files a/business_objects/store/__pycache__/image.cpython-312.pyc and b/business_objects/store/__pycache__/image.cpython-312.pyc differ diff --git a/business_objects/store/__pycache__/product.cpython-312.pyc b/business_objects/store/__pycache__/product.cpython-312.pyc index 3f2fa807..b4aa8f7b 100644 Binary files a/business_objects/store/__pycache__/product.cpython-312.pyc and b/business_objects/store/__pycache__/product.cpython-312.pyc differ diff --git a/business_objects/store/__pycache__/product_category.cpython-312.pyc b/business_objects/store/__pycache__/product_category.cpython-312.pyc index 88c29724..e13292a4 100644 Binary files a/business_objects/store/__pycache__/product_category.cpython-312.pyc and b/business_objects/store/__pycache__/product_category.cpython-312.pyc differ diff --git a/business_objects/store/image.py b/business_objects/store/image.py index be364066..376c052a 100644 --- a/business_objects/store/image.py +++ b/business_objects/store/image.py @@ -16,6 +16,7 @@ from extensions import db import lib.argument_validation as av # external from enum import Enum +from typing import ClassVar class Resolution_Level_Enum(Enum): @@ -48,6 +49,8 @@ class Resolution_Level_Enum(Enum): class Image(db.Model, Store_Base): + NAME_ATTR_OPTION_TEXT: ClassVar[str] = 'url' + NAME_ATTR_OPTION_VALUE: ClassVar[str] = 'id_image' id_image = db.Column(db.Integer, primary_key=True) id_product = db.Column(db.Integer) id_permutation = db.Column(db.Integer) diff --git a/business_objects/store/product.py b/business_objects/store/product.py index b04362ad..96b87743 100644 --- a/business_objects/store/product.py +++ b/business_objects/store/product.py @@ -490,10 +490,10 @@ class Parameters_Product(Get_Many_Parameters_Base): def from_form_filters_product_permutation(form): # if not (form is Filters_Product_Permutation): raise ValueError(f'Invalid form type: {type(form)}') # av.val_instance(form, 'form', 'Parameters_Product.from_form', Filters_Product_Permutation) - has_category_filter = not (form.id_category.data == '0' or form.id_category.data == '') - has_product_filter = not (form.id_product.data == '0' or form.id_product.data == '') + has_category_filter = not (form.id_category.data == '0' or form.id_category.data == '' or form.id_category.data is None) + has_product_filter = not (form.id_product.data == '0' or form.id_product.data == '' or form.id_product.data is None) get_permutations_stock_below_min = av.input_bool(form.is_out_of_stock.data, "is_out_of_stock", "Parameters_Product.from_form") - print(f'form question: {type(form.is_out_of_stock)}\nbool interpretted: {get_permutations_stock_below_min}\type form: {type(form)}') + print(f'form question: {type(form.is_out_of_stock)}\nbool interpretted: {get_permutations_stock_below_min}\ntype form: {type(form)}') return Parameters_Product( get_all_product_category = not has_category_filter, get_inactive_product_category = False, @@ -595,11 +595,11 @@ class Parameters_Product(Get_Many_Parameters_Base): def from_filters_product_category(cls, filters_category): return cls( get_all_product_category = True, - get_inactive_product_category = filters_category.active, + get_inactive_product_category = filters_category.active.data, ids_product_category = '', get_all_product = True, get_inactive_product = False, - ids_product = False, + ids_product = '', get_all_permutation = True, get_inactive_permutation = False, ids_permutation = '', diff --git a/business_objects/store/product_category.py b/business_objects/store/product_category.py index a025347a..fc2d5cb7 100644 --- a/business_objects/store/product_category.py +++ b/business_objects/store/product_category.py @@ -320,6 +320,8 @@ class Filters_Product_Category(Get_Many_Parameters_Base): """ class Product_Category_Container(Store_Base): + NAME_ATTR_OPTION_TEXT: ClassVar[str] = '' + NAME_ATTR_OPTION_VALUE: ClassVar[str] = Store_Base.FLAG_ROWS categories: list def __init__(self): self.categories = [] diff --git a/forms/store/__pycache__/product.cpython-312.pyc b/forms/store/__pycache__/product.cpython-312.pyc index 2e89a74c..73c5e222 100644 Binary files a/forms/store/__pycache__/product.cpython-312.pyc and b/forms/store/__pycache__/product.cpython-312.pyc differ diff --git a/forms/store/__pycache__/product_permutation.cpython-312.pyc b/forms/store/__pycache__/product_permutation.cpython-312.pyc index 78ec6a34..a03cfe0f 100644 Binary files a/forms/store/__pycache__/product_permutation.cpython-312.pyc and b/forms/store/__pycache__/product_permutation.cpython-312.pyc differ diff --git a/forms/store/product.py b/forms/store/product.py index b1c7c6da..702e2fcf 100644 --- a/forms/store/product.py +++ b/forms/store/product.py @@ -22,7 +22,7 @@ from flask_wtf.recaptcha import RecaptchaField class Filters_Product(FlaskForm): - id_category = SelectField('Category', validators=[Optional()], choices=[('', 'All')]) + id_category = SelectField('Category', validators=[Optional()], choices=[('', 'All')], default='') is_not_empty = BooleanField('Not empty only?') active = BooleanField("Active only?", default = True) @classmethod diff --git a/forms/store/product_permutation.py b/forms/store/product_permutation.py index c859782b..f32abac3 100644 --- a/forms/store/product_permutation.py +++ b/forms/store/product_permutation.py @@ -26,8 +26,8 @@ from abc import ABCMeta, abstractmethod class Filters_Product_Permutation(Form_Base): - id_category = SelectField('Category', validators=[Optional()], choices=[('', 'All')]) - id_product = SelectField('Product', validators=[Optional()], choices=[('', 'All')]) + id_category = SelectField('Category', validators=[Optional()], choices=[('', 'All')], default='') + id_product = SelectField('Product', validators=[Optional()], choices=[('', 'All')], default='') is_out_of_stock = BooleanField('Out of stock only?') quantity_min = FloatField('Min stock') quantity_max = FloatField('Max stock') diff --git a/static/css/pages/store/stock_items.css b/static/css/pages/store/stock_items.css index 3f980784..07fc5c2f 100644 --- a/static/css/pages/store/stock_items.css +++ b/static/css/pages/store/stock_items.css @@ -7,9 +7,9 @@ th, td { #tableMain { max-width: 90vw; } -#tableMain thead tr th.category, #tableMain tbody tr td.category { - width: 8vh; - min-width: 8vh; +#tableMain thead tr th.product_category, #tableMain tbody tr td.product_category { + width: 12vh; + min-width: 12vh; } #tableMain thead tr th.product, #tableMain tbody tr td.product, #tableMain thead tr th.storage_location, #tableMain tbody tr td.storage_location { @@ -80,6 +80,6 @@ th, td { #tableMain thead tr th.date_unsealed, #tableMain tbody tr td.date_unsealed, #tableMain thead tr th.date_expiration, #tableMain tbody tr td.date_expiration, #tableMain thead tr th.date_consumed, #tableMain tbody tr td.date_consumed { - width: 17vh; - min-width: 17vh; + width: 15vh; + min-width: 15vh; } \ No newline at end of file diff --git a/static/dist/css/store_stock_items.bundle.css b/static/dist/css/store_stock_items.bundle.css index 8ca65b65..ecdb2197 100644 --- a/static/dist/css/store_stock_items.bundle.css +++ b/static/dist/css/store_stock_items.bundle.css @@ -60,9 +60,9 @@ th, td { #tableMain { max-width: 90vw; } -#tableMain thead tr th.category, #tableMain tbody tr td.category { - width: 8vh; - min-width: 8vh; +#tableMain thead tr th.product_category, #tableMain tbody tr td.product_category { + width: 12vh; + min-width: 12vh; } #tableMain thead tr th.product, #tableMain tbody tr td.product, #tableMain thead tr th.storage_location, #tableMain tbody tr td.storage_location { @@ -133,6 +133,6 @@ th, td { #tableMain thead tr th.date_unsealed, #tableMain tbody tr td.date_unsealed, #tableMain thead tr th.date_expiration, #tableMain tbody tr td.date_expiration, #tableMain thead tr th.date_consumed, #tableMain tbody tr td.date_consumed { - width: 17vh; - min-width: 17vh; + width: 15vh; + min-width: 15vh; }