Commit graph

106 commits

Author SHA1 Message Date
1b252baf78 Features: 1) Allow referrer field to accept a string instead of UUID;
Fixes: None;

Extra: 1) Fix indentation inconsistencies in `mutate` method and attribute check block;
2025-05-15 11:26:53 +03:00
11071996af Features: 1) Add return self to bulk_add_products; 2) Add return self to bulk_remove_products;
Fixes: None;

Extra: None;
2025-05-14 12:38:40 +03:00
631d0b503e Features: 1) Pass wishlist to WishlistDetailSerializer for correct data serialization;
Fixes: None;

Extra: None;
2025-05-14 12:26:50 +03:00
190fb479be Features: 1) Enhance host validation in middleware to allow wildcard "*" in ALLOWED_HOSTS;
Fixes: 1) Correct .gitignore entries for static files to improve exclusion logic;

Extra: 1) Minor refactor in middleware for readability;
2025-05-14 03:38:39 +03:00
4a9c147149 Features:
Fixes: 1) Correct syntax for updating schema responses in `update` method;
Extra:
2025-05-13 23:16:03 +03:00
8f46c19b53 Features: 1) Add schema documentation using extend_schema_view decorators for TokenObtainPairView, TokenRefreshView, and TokenVerifyView.
Fixes: 1) Remove unused imports for serializers and inline_serializer from drf_spectacular.utils.

Extra: Refactor and simplify code by replacing inline schema definitions with centralized schema references (TOKEN_OBTAIN_SCHEMA, TOKEN_REFRESH_SCHEMA, TOKEN_VERIFY_SCHEMA) and removing redundant response examples.
2025-05-13 23:13:09 +03:00
7040c97791 Features: 1) Update default message for token validation in TokenVerifyResponse serializer;
Fixes: None;

Extra: None;
2025-05-13 23:05:53 +03:00
8375ef41db Features: 1) Add save method to enforce single pending order per user in Order model;
Fixes: 1) Adjust import order in `core/models.py` for better consistency;

Extra: Refactor formatting for better readability in `core/models.py`; Update `pyproject.toml` version to 2.6.2; Update compiled translation file `cs_CZ/LC_MESSAGES/django.mo`.
2025-05-13 23:02:16 +03:00
6cf2903c74 Features: 1) Replace AllValuesFieldListFilter with RelatedOnlyFieldListFilter for "tags" and "stocks__vendor" in list filters;
Fixes: 1) Remove unnecessary import of AllValuesFieldListFilter;

Extra: 1) Minor cleanup of unused imports in admin.py;
2025-05-13 16:46:04 +03:00
e5c0649725 Features: 1) Add AllValuesFieldListFilter import to enhance admin filtering options.
Fixes: 1) Replace RelatedOnlyFieldListFilter with AllValuesFieldListFilter for "tags__tag_name" and "stocks__vendor__name" to fix filter behavior.

Extra: None;
2025-05-13 16:41:12 +03:00
c92cd1d72c Features: 1) Replace custom TagNameListFilter with RelatedOnlyFieldListFilter for tags; 2) Replace custom VendorNameListFilter with RelatedOnlyFieldListFilter for vendors;
Fixes: None;

Extra: 1) Remove redundant custom list filter classes for tags and vendors; 2) Streamline ProductAdmin list_filter configuration;
2025-05-13 07:10:44 +03:00
abc91c599e Features: 1) Refactor vendor lookup logic to improve code readability; 2) Enhance queryset filtering to handle both string and list inputs for vendor names;
Fixes: None;

Extra: 1) Minor reformatting and alignment for better code clarity;
2025-05-13 06:55:22 +03:00
ba9e5080bc Features: 1) Add error handlers for Attribute, AttributeGroup, and AttributeValue DoesNotExist exceptions;
Fixes: 1) None;

Extra: None;
2025-05-13 05:55:49 +03:00
f69de19720 Features: 1) Rename variable 'tags' to 'vendors' for better clarity in admin lookup functionality;
Fixes: 1) None;

Extra: 1) Improve variable naming for readability in admin.py;
2025-05-13 05:53:56 +03:00
859fa7290e Features: ;
Fixes: 1) Correct filtering logic to use stocks__vendor__name instead of vendor__name in admin query;

Extra: ;
2025-05-13 05:24:45 +03:00
ea0d14bfc8 Features: 1) Add "Stock.DoesNotExist" and "ProductImage.DoesNotExist" to ignored exceptions in base settings;
Fixes: 1) Ensure auto_resolver_helper returns only the created or fetched instance by accessing tuple index [0];

Extra: None;
2025-05-13 03:15:15 +03:00
2e9659a562 Features: 1) Update project version to 2.6.1 in pyproject.toml and settings.
Fixes: none;

Extra: none;
2025-05-13 03:03:26 +03:00
2d67b69b42 Features: ;
Fixes: ;

Extra: 1) Update environment variable values to "development" and "production" for clarity;
2025-05-13 02:53:15 +03:00
4a97779139 Features: 1) Extend ignored errors in Sentry when DEBUG mode is enabled;
Fixes: None;

Extra: 1) Refactor ignored errors list to conditionally include additional exceptions in DEBUG mode;
2025-05-13 02:50:27 +03:00
37c0867ab7 Features: 1) Add support for defaults in get_or_create for auto_resolver_helper; 2) Modularize Sentry ignore_errors configuration with a dedicated variable;
Fixes: None;

Extra: 1) Minor code refactor to streamline `ignore_errors` handling in Sentry setup;
2025-05-13 02:48:56 +03:00
78db5e1f96 Features: ;
Fixes: ;

Extra: 1) Simplify ignore_errors list by consolidating NotFoundErrorHandler entries.
2025-05-13 02:21:07 +03:00
87c355474c Features: 1) Enable Elasticsearch DSL autosync and switch to CelerySignalProcessor; 2) Extract common logic into auto_resolver_helper for resolving brands and categories; 3) Add conditional CACHEOPS_ENABLED based on sys arguments;
Fixes: 1) Add missing sys import in caches.py; 2) Ensure CACHEOPS_REDIS is only declared when CACHEOPS_ENABLED is True;

Extra: 1) Formatting and cleanup for readability in settings and auto-resolve methods; 2) Rearrange cacheops import in base settings;
2025-05-13 02:09:10 +03:00
8bdb74b80c Features: 1) Add prefetch_related for "attributes" in CategoryViewSet queryset;
Fixes: None;

Extra: None;
2025-05-12 20:22:31 +03:00
ae17cc1371 Features: 1) Add populate_index function for Elasticsearch indexing and integrate it into update_products; 2) Enhance CategoryViewSet queryset with prefetching of "parent" and "children";
Fixes: 1) Refine logic in vendor category and brand handling to correctly handle multiple active/inactive entries;

Extra: 1) Add missing import for `registry` in Elasticsearch module; 2) Minor cleanup and spacing adjustments in Elasticsearch and vendor modules.
2025-05-12 20:22:01 +03:00
c9d2881f99 Features: 1) Add TagNameListFilter for filtering products by tag names in admin panel; 2) Add VendorNameListFilter for filtering products by vendor names in admin panel;
Fixes: None;

Extra: 1) Replace redundant `list_filter` entries with new custom list filters for cleaner code structure;
2025-05-12 16:11:27 +03:00
4d2961bc81 Features: 1) Enhance admin list filters to support "__in" lookups for "is_active", "tags__tag_name", and "stocks__vendor__name";
Fixes:

Extra:
2025-05-12 16:02:32 +03:00
b18f962677 Features: 1) Add "stocks__vendor__name" to admin list filters;
Fixes:

Extra:
2025-05-12 15:08:23 +03:00
ee94464a7a Features:
Fixes:

Extra: 1) Add db_backups/ to .dockerignore file;
2025-05-12 15:02:13 +03:00
ad2e2f40ee Features:
Fixes:

Extra: 1) Remove unused sentry extra from Poetry install command in Dockerfile;
2025-05-12 10:17:05 +03:00
88a8c2e898 Features: 1) Activate translation based on request locale in CustomLocaleCommonMiddleware; 2) Activate translation within GrapheneJWTAuthorizationMiddleware;
Fixes: None;

Extra: None;
2025-05-12 10:16:31 +03:00
03eb6d03ca Features: 1) Replace hardcoded API version with dynamic EVIBES_VERSION; 2) Enhance Sentry SDK configuration to include Celery, OpenTelemetry, and Redis integration;
Fixes: 1) Correct file formatting for consistency in poetry.lock;

Extra: Perform general cleanup of file structure and hash formatting in poetry.lock for better readability;
2025-05-12 10:09:30 +03:00
11cca3b9f0 Features: 1) Add process_attribute method for handling product attributes in vendors module; 2) Introduce blocked_attributes list to manage excluded attributes; 3) Add dependency zeep to pyproject.toml.
Fixes: 1) Correctly handle `IntegrityError` and `MultipleObjectsReturned` exceptions in `process_attribute` to prevent crashes; 2) Add missing imports for `django.db.IntegrityError`, `Attribute`, and `AttributeGroup`.

Extra: Cleanup formatting in `poetry.lock` for consistent style.
2025-05-12 01:51:56 +03:00
ddeafdbd53 Features: 1) Replace CelerySignalProcessor with RealTimeSignalProcessor for Elasticsearch signal processing;
Fixes: None;

Extra: 1) Update indentation for improved readability; 2) Set ELASTICSEARCH_DSL_AUTOSYNC and ELASTICSEARCH_DSL_PARALLEL to False for configuration change;
2025-05-11 22:52:45 +03:00
be76a3bb8d Features: 1) Introduce conditional check ensuring instance.finalize() execution only when no order product errors exist;
Fixes: 1) Prevent potential incorrect execution of `instance.finalize()` by adding else block;

Extra: 1) Add spacing for improved readability; 2) Minor formatting tweaks in signal logic.
2025-05-11 22:46:45 +03:00
82667216f2 Features: None;
Fixes: 1) Prevent error by adding user check when processing non-PENDING orders; 2) Remove redundant status assignment and save for CREATED orders; 3) Add missing error handler for POST requests in settings;

Extra: None;
2025-05-11 22:43:38 +03:00
3185eb8188 Features: None;
Fixes: 1) Correct typo in 'exclude' method call for categories; 2) Correct typo in 'exclude' method call for brands;

Extra: None;
2025-05-09 06:57:41 +03:00
695058128e Features: 1) Add exception handling for Category.MultipleObjectsReturned and Brand.MultipleObjectsReturned; 2) Add aiosmtpd dependency to pyproject.toml.
Fixes: None;

Extra: 1) Update poetry.lock for the new aiosmtpd package; 2) Perform formatting changes to json and hash entries in poetry.lock for consistency.
2025-05-09 06:53:53 +03:00
fb91243718 Features: 1) Add management command to clear unwanted data including duplicate stocks and categories; 2) Automatically deactivate products without stocks; 3) Remove orphaned stocks.
Fixes: 1) None.

Extra: Refactored logic for grouped deletions and added success messages for better logging.
2025-05-09 04:51:21 +03:00
60c70e50f2 Features:
1) Add "created" and "modified" fields to list_filter in CategoryAdmin;

Fixes:
(none);

Extra:
(none);
2025-05-09 04:35:07 +03:00
ed16a4fd3d Revert "Features:"
This reverts commit a31ce44dfc.
2025-05-09 04:31:48 +03:00
a31ce44dfc Features:
1) Add Celery shared_task decorator to `update_stock` method for asynchronous execution.

Fixes:
1) Replace direct `update_stock()` calls with `update_stock.delay()` to enable task queuing.

Extra:
1) Add missing import for `shared_task` in `core/vendors/__init__.py`.
2025-05-09 04:29:07 +03:00
60240d4cd9 Features:
1) Extend worker task time limits (soft: 10800 seconds, hard: 21600 seconds);

Fixes:
(none);

Extra:
1) Update `docker-compose.yml` to reflect new task time limits in Celery command;
2025-05-09 04:19:13 +03:00
0a9a6dfd6c Features:
1) Add error handling with logger and custom error message for holiday API requests;

Fixes:
(none);

Extra:
1) Replace direct API response raising with try-except block for better robustness and logging;
2025-05-09 04:17:47 +03:00
7ef0dc6fa9 Features:
1) Add `BrandProductDetailSerializer` with logo fields (small_logo, big_logo);
2) Replace `BrandDetailSerializer` with `BrandProductDetailSerializer` in `ProductDetailSerializer`;

Fixes:
(none);

Extra:
1) Minor structural adjustments for code clarity;
2025-05-08 17:57:23 +03:00
ce5c475b71 Features:
1) Enhance `OpenApiParameter` usage by introducing structured keyword arguments to improve readability and maintainability;

Fixes:
1) Remove redundant `location` parameter for consistency in parameter definitions;

Extra:
1) Refactor `extend_schema` definitions with a uniform formatting style for better clarity and alignment;
2) Update response structures to improve readability and maintain consistent indentation.
2025-05-08 17:52:30 +03:00
0b25389d39 Features:
1) Add fallback to use `msgid` when user input is empty during translation prompt.

Fixes:
1) Fix alignment and indentation issues in API request data formatting.

Extra:
1) Minor formatting and whitespace cleanup in placeholder regex and related functions;
2) Regenerate `.mo` file for `cs_CZ` locale.
2025-05-08 17:45:00 +03:00
f5c1d64d46 Features:
1) Enhance lookup logic to support UUID validation for products in viewsets;
2) Add extensive filtering, sorting, and attributes documentation for product endpoints;
3) Define new OpenAPI parameters for querying products with detailed constraints.

Fixes:
1) Add missing import for `UUID` in core viewsets.

Extra:
1) Refactor and reorganize product API schema for clarity and consistency.
2025-05-08 17:33:40 +03:00
9941b45bd3 Features:
1) Add PRODUCT_SCHEMA to supported schemas;
2) Implement @extend_schema_view decorator for ProductViewSet;

Fixes:
1) None;

Extra:
1) None;
2025-05-08 17:25:14 +03:00
9f64b4214b Features:
1) None;

Fixes:
1) Corrected formatting of "fuzzy" flags in multiple locale `.po` files for consistent syntax;

Extra:
1) No functional changes, only formatting updates in translation files;
2025-05-08 17:15:33 +03:00
808e2aae25 Refactor category and brand resolution logic.
Improve handling of duplicate and inactive objects during category and brand resolution. Ensures only the most relevant entry is retained while unused duplicates are deleted. Fixes potential issues with object retrieval and creation logic.
2025-05-07 19:55:36 +03:00