Commit graph

309 commits

Author SHA1 Message Date
ef5cecedda Features: 1) Updated localization file for Czech language (cs_CZ) with extended translations and modifications;
Fixes: None;

Extra: 1) Binary format changes observed in django.mo file, potentially related to recompiled translations;
2025-05-27 16:00:32 +03:00
3ad079b3d9 Features: 1) Extra password validation;
Fixes: 1) ;

Extra: 1) Minor adjustments in binary formatting of the localization file content.
2025-05-27 15:48:40 +03:00
d86a6ed3c8 RUFF 2025-05-26 16:12:59 +03:00
475b0a0c94 Features: 1) Add support for 'create' action with explicit 'ALLOW' flag in AddressViewSet; 2) Introduce refined permission handling with scoped user actions and public model visibility checks in EvibesPermission.
Fixes: 1) Ensure 'user' is set to authenticated user in AddressSerializer.create method.

Extra: 1) Refactor EvibesPermission for clarity and comprehensive action handling; 2) Add detailed class-level docstring for EvibesPermission; 3) Simplify queryset filtering logic with USER_SCOPED_ACTIONS and explicit permission checks.
2025-05-26 15:06:24 +03:00
41f8cf55b5 Features: 1) Allow skipping address validation for fully digital products;
Fixes: 1) Correct improper logic when checking for missing addresses;

Extra: 1) Minor structural improvement to conditional logic for clarity;
2025-05-22 18:30:24 +03:00
880d7edda9 Features: 1) Add "slug" field to Category model with AutoSlugField for unique slugs; 2) Ensure slugs are populated during migration with robust error handling;
Fixes: None;

Extra: 1) Adjust migration order for proper execution;
2025-05-22 14:26:48 +03:00
fefa4746df Features: 1) Add "autocomplete" action to permissions checks.
Fixes: None;

Extra: None;
2025-05-22 00:36:32 +03:00
a8b1925aae Features: 1) Add query parameters q and limit to address autocomplete schema for enhanced filtering; 2) Update 'create' endpoint schema to use AddressCreateSerializer;
Fixes: 1) Replace `AddressAutocompleteInputSerializer` with `AddressCreateSerializer` in imports and references;

Extra: None;
2025-05-21 20:04:12 +03:00
cb66f217ac Features: ;
Fixes: 1) Correct DEEPL_API_URL to use the v2/translate endpoint;

Extra: ;
2025-05-21 15:34:54 +03:00
88133b2f93 Features: 1) Update DeepL API URL to standard endpoint in deepl_translate.py and translate_fields.py;
Fixes: 1) None;

Extra: 1) Replaced deprecated API-free URL with standard DeepL API URL for consistency.
2025-05-21 15:31:08 +03:00
797e56a0cd Features: 1) Add translate_fields management command for field translations via DeepL; 2) Add slug population script in 0022_category_slug migration.
Fixes: 1) Update locale codes in `deepl_translate.py` to lowercase for consistency.

Extra: 1) Minor refactoring to ensure compatibility and avoid undefined behavior in slug population logic.
2025-05-21 14:27:38 +03:00
a6bbbc6101 Features: 1) Add CaseInsensitiveListFilter for category_slugs to filter by category slug;
Fixes:

Extra:
2025-05-21 12:39:01 +03:00
71cb0fc2db Features: 1) Add AutoSlugField "slug" to Category model with unique and auto-populating behavior; 2) Include "slug" field in CategoryFilter and relevant serializers (detail and simple); 3) Add "slug" to GraphQL object type for categories;
Fixes: None;

Extra: Add migration for new "slug" field in Category model.
2025-05-21 12:37:30 +03:00
6b71695d86 Features: ;
Fixes: ;

Extra: 1) Standardize flag file naming convention by renaming files to lowercase locale codes (e.g., ar-AR.png to ar-ar.png).
2025-05-20 22:35:22 +03:00
4991828b9b Features: 1) Updated user language field in vibes_auth to include more language options with a default set to 'en-gb';
Fixes: 1) Standardized field names in core models by renaming locale-specific fields to lowercase format for consistency (e.g., name_en_GB to name_en_gb);

Extra: Applied migrations to reflect these changes in vibes_auth and core apps for smoother db schema alignment.
2025-05-20 22:08:04 +03:00
b18c75ccd2 Features: None;
Fixes: 1) Correct "name" field reference by replacing dynamic LANGUAGE_CODE-based key;
Extra: 1) Remove unnecessary get_prepopulated_fields method; 2) Minor cleanup of admin field logic;
2025-05-20 20:34:11 +03:00
b4b52897fb Features: 1) Dynamically adjust the 'name' field in admin based on LANGUAGE_CODE.
Fixes: 1) Add missing import for LANGUAGE_CODE from settings.

Extra: None.
2025-05-20 20:24:25 +03:00
c839c8a211 Features: ;
Fixes: ;

Extra: 1) Add `# type: ignore` comments to admin site unregister and register calls for typing compliance;
2025-05-20 19:46:53 +03:00
57a6654c89 Features: 1) Add return type annotations for admin actions.
Fixes: 1) Correct translation wrapping by converting to strings with str().

Extra: 1) Minor refactoring and cleanup in admin action methods for clarity.
2025-05-20 19:46:10 +03:00
87369b48a9 Features: 1) Add TabbedTranslationAdmin to all admin classes for translation support.
Fixes: 1) Remove unused LANGUAGES reference from ProductAdmin; 2) Eliminate redundant translatable_fields definition from ProductAdmin.

Extra: Refactor admin class imports and integrate TabbedTranslationAdmin for a centralized translation approach.
2025-05-20 19:42:48 +03:00
4f4d4c5c10 Features: 1) Add AddressViewSet to API routing; 2) Add is_publicly_visible attribute to Address model;
Fixes:

Extra: 1) Minor import addition for AddressViewSet in api_urls.py;
2025-05-20 14:12:32 +03:00
495aacc818 Features: 1) Add UploadAvatar mutation to handle avatar uploads; 2) Integrate graphene-file-upload for file upload capability.
Fixes: None;

Extra: 1) Update `poetry.lock` and `pyproject.toml` to include `graphene-file-upload`; 2) Minor formatting adjustments in `poetry.lock`.
2025-05-20 11:52:07 +03:00
5c98129a6f Features: 1) Switch Promotion creation to update_or_create to handle existing records;
Fixes: 1) Ensure Promotion update logic correctly applies changes to existing entries;

Extra: 1) Code formatting adjustments to improve readability;
2025-05-20 10:45:03 +03:00
d001e238f8 2.7.0 2025-05-20 08:56:33 +03:00
07d32de16b Features: 1) Add AddressType class above FeedbackType for organizational clarity;
Fixes: 1) Resolve duplicate declaration of AddressType by removing the redundant implementation;

Extra: Reorder and clean up code to improve structure and maintainability;
2025-05-20 08:18:35 +03:00
351b4eda00 Features: 1) Add migration to remove existing billing and shipping address columns and re-add them pointing to core.Address;
Fixes: 1) Correct on_delete parameter reference from django.db.models.deletion to models.deletion;

Extra: 1) Cleanup migration file header and remove unnecessary import; 2) Add comments for better clarity on SQL operations.
2025-05-20 08:14:00 +03:00
ed1796dbc4 Features: ;
Fixes: 1) Remove duplicate import of Address;

Extra: 1) Reformat import statements for better readability;
2025-05-20 08:00:59 +03:00
0ab8738520 Features: 1) None;
Fixes: 1) None;

Extra: 1) Removed the entire "geo" module, including migrations, model definitions, admin configurations, utilities, documentation, templates, translations, and related files. Moved functionality to "core".
2025-05-20 08:00:44 +03:00
b685c2a2b8 Features:
Fixes: 1) Correct dependency to use 'geo' app's initial migration instead of a later migration;

Extra:
2025-05-19 16:11:13 +03:00
c3c2222d99 Features: ;
Fixes: 1) Update dependency for 'geo' app in core migrations; 2) Remove redundant 'core' app dependency in vibes_auth migrations;

Extra: .
2025-05-19 15:01:57 +03:00
0b1a8550ab Features: None;
Fixes: None;

Extra: 1) Add dependency on 'geo' app in core migration initial script;
2025-05-19 14:57:09 +03:00
564ce0706b Features: Full Geo rework.
Fixes: 1) Address redundant migration logic by dropping stale migrations; 2) Cleanup swapper-based dependencies in Geo models;

Extra: Streamlined database initialization by resetting all previous migrations.
2025-05-19 14:45:53 +03:00
43c8df0c05 Features: 1) Add support for shipping and billing addresses in serializers, mutations, and models; 2) Validate address inputs during order purchasing; 3) Auto-fill billing address if only shipping address is provided and vice-versa;
Fixes: 1) Correct redundant variable and file handling in geo management commands; 2) Fix formatting inconsistencies in tqdm loops across geo management commands; 3) Remove unnecessary decorator in token verification view;

Extra: Clean up imports, line breaks, and redundant code for better readability and maintainability in multiple files;
2025-05-16 01:47:45 +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
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
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
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
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
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
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
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
0ed8a8d48e Remove unused serializer and update ignored error settings
The `BuyAsBusinessOrderSerializer` import was removed as it is no longer used. Additionally, new error types were added to the `ignore_errors` list in the base settings file to prevent unnecessary logging of expected exceptions.
2025-05-07 18:18:23 +03:00
974568cdee Fix fallback logic for object name extraction in search.
Updated the fallback chain to check for "title" if "name" is unavailable when extracting object names in Elasticsearch results. This ensures better handling of hits where "title" is present instead of "name".
2025-05-07 16:07:38 +03:00
0cb4ae42a4 Add support for search results for posts
Extended the search functionality to include results for posts. Updated `SearchResultsType` and related types to handle `posts`, adding a new `SearchPostsResultsType` with `uuid`, `name`, and `slug`. Adjusted mutations to populate posts in the search response.
2025-05-07 15:57:10 +03:00
80e1b0335b "Enhance product filtering and permissions handling
Ensure inactive products without stock are excluded from queries by updating the filter. Add 'buy_unregistered' action to permissions for better access control."
2025-05-07 15:07:48 +03:00
50fe95e713 Remove unused filters from admin panel configuration
This change eliminates redundant filters like "category", "attributes__attribute", and "brand" from the admin panel. This helps simplify the interface and improve usability.
2025-05-07 10:52:22 +03:00
e1f54304b6 Refactor error handling in auto_resolve methods.
Replaced context manager suppress(KeyError) with try-except blocks to handle both KeyError and IndexError in auto_resolve_category and auto_resolve_brand methods. This improves clarity and ensures proper handling of potential IndexError cases.
2025-05-07 10:40:40 +03:00
4d63bde7a3 Refactor attribute retrieval logic in detail serializer.
Simplify the conditional logic for fetching attributes based on user permissions. This improves code readability and maintains the same functionality.
2025-05-07 04:40:44 +03:00
87e124f614 Handle errors in vendor stock updates and inactive vendors
Add error handling during the stock update process to log and skip problematic vendors without halting execution. Additionally, ensure `get_vendor_instance` only returns active vendors, raising an error if the vendor is inactive. This improves system resilience and data integrity.
2025-05-07 03:15:23 +03:00
5aca04cf55 Reorder imports in core/vendors/__init__.py
Adjusted the import order in compliance with PEP 8 guidelines. This helps improve code readability and maintain consistency across the codebase.
2025-05-07 02:41:41 +03:00
5d007c07a2 Add auto_resolve_brand method to handle brand resolution
Introduced a new static method, auto_resolve_brand, to simplify and automate the resolution or creation of Brand objects based on a given brand name. Updated imports in core/vendors/__init__.py to include the Brand model. This enhances the system's ability to process brands effectively.
2025-05-07 02:40:23 +03:00
70cf2c23a1 Add auto_resolve_category method to vendor logic
Introduced the auto_resolve_category method to streamline category resolution using Elasticsearch. This enhances category lookup efficiency and ensures seamless creation or retrieval of categories when necessary.
2025-05-07 02:38:28 +03:00
0e86c96ad3 Set default value for is_composite_pk in admin config
Added an `is_composite_pk` attribute with a default value of `False` to the admin configuration. This ensures clarity in object definition and supports better configurability for composite primary key scenarios.
2025-05-06 19:26:47 +03:00
12ccd04943 Update API version to 2.6.0 and reformat migration files
Updated the API version from 2.5.0 to 2.6.0 in the DRF settings for consistency across configurations. Reformatted migration files for better readability, ensuring consistency in code style and improving maintainability. These changes do not alter functionality but enhance clarity and documentation.
2025-05-06 19:19:49 +03:00
7d6eb8a27a Refine API key validation in task configuration.
Previously, an "example key" could mistakenly pass the check, leading to potential misuse. This update ensures features are disabled if the API key is invalid or set to default.
2025-05-06 17:57:35 +03:00
ce66513488 Refactor email sending to use reusable connections
Updated email sending logic across multiple modules to utilize `django.core.mail.get_connection` for better email connection management and efficiency. Adjusted filters in `conditions.py` to correctly handle dictionary inputs when checking attribute lengths.
2025-05-06 17:44:55 +03:00
6fd0a48c0c Handle IntegrityError when creating orders.
Added logic to handle IntegrityError by generating unique human-readable IDs for orders during creation. This ensures no duplicate order entries are created in case of integrity constraints.
2025-05-06 17:35:35 +03:00
3e53224092 Add support for human_readable_id in filters and models
Added a `human_readable_id` filter to the `OrderFilter` class and enabled ordering by this field. Updated the `create_customer_payload` method to include the `is_business` attribute, ensuring compatibility with new functionality.
2025-05-06 17:29:02 +03:00
65812190a2 Fix is_business property to handle missing attributes
Previously, the method could raise an error if `attributes` was None. This update ensures the method returns `False` when `attributes` is not defined, preventing potential runtime issues.
2025-05-06 17:22:48 +03:00
4f322456e9 Fix order sorting by changing ordering field to UUID
Previously, orders with duplicate `human_readable_id` were sorted by `id`, which could lead to inconsistencies. Updated the code to sort by `uuid` to ensure a more reliable and unique ordering. This prevents potential issues when resolving duplicate entries.
2025-05-06 17:18:57 +03:00
ef2830d36a Fix duplicate detection by using UUID in migration script
The migration script now counts duplicates based on the "uuid" field instead of "id". This ensures more accurate identification of duplicate "human_readable_id" entries.
2025-05-06 17:16:52 +03:00
146bbc3539 Fix duplicate human_readable_id values in Order model
This migration resolves duplicate human_readable_id values by assigning unique IDs where necessary. A data migration script is introduced to identify and fix duplicates before altering the field.
2025-05-06 17:13:33 +03:00
ca60bf09a6 Increase max_length of human_readable_id to 8.
Updated the `human_readable_id` field in the `Order` model to support a maximum length of 8 instead of 6. Removed the redundant migration file `0019_alter_order_human_readable_id.py` for cleanup.
2025-05-06 17:06:39 +03:00
dc9effdd5b Update human_readable_id field in Order model
Alter the `human_readable_id` field to use a custom generator function and ensure uniqueness. This improves the readability and integrity of order identifiers.
2025-05-06 17:04:29 +03:00
4deece673f Increase max_length of human_readable_id to 8.
Updated the field definition of `human_readable_id` to allow up to 8 characters instead of 6. This change accommodates longer identifiers as required for recent updates.
2025-05-06 17:01:55 +03:00
0c1caa422c Add human-readable ID field to Order model
Introduced a `human_readable_id` field to the Order model to provide a concise and recognizable identifier, initialized with a default generator. Updated the field to enforce uniqueness to ensure consistent identification across orders.
2025-05-06 16:58:44 +03:00
ef553a94a4 Refactor Elasticsearch documents for efficiency and clarity
Simplified field definitions and improved code consistency by consolidating and aligning styles. Added `prepare_*` methods to gracefully handle None values for fields. Enhanced multilingual support and streamlined query construction for better maintainability.
2025-05-06 15:32:55 +03:00
5012727e84 Refactor DRF settings and fix schema configurations
Updated DRF settings with new TOS URL and version for consistency. Corrected API URLs in B2B schema and reorganized imports in core views for better readability. These changes ensure accurate references and maintain cleaner code structure.
2025-05-06 03:48:59 +03:00
76d490f2e2 Refactor translation command and improve order model.
Enhanced the `deepl_translate` management command with improved placeholder handling, error messages, and support for missing translations. Added `human_readable_id` and `is_business` attributes to the `Order` model, updating associated admin configurations to reflect these changes.
2025-05-06 03:28:06 +03:00
85a49c4e8b Add "DISABLED_COMMERCE" feature to disable buying functionality
Introduce a global config flag `DISABLED_COMMERCE` to toggle buy functionality availability. Raise specific `DisabledCommerceError` when buying is disabled, ensuring end-users are informed. Additionally, reformat code for readability and consistency, improving overall maintainability.
2025-05-05 17:32:57 +03:00
96c3fe23b0 Update promotion handling and logging levels
Change promotions to inactive instead of deleting them to maintain data integrity. Adjust Celery logging levels to be DEBUG/INFO based on the DEBUG setting, improving log granularity during development and clarity in production.
2025-05-05 17:16:57 +03:00
4e04caf91d Update Product slug generation to include UUID
The migration alters the `slug` field to include `uuid` in its `populate_from` attributes. This ensures more robust and unique slug generation, improving data integrity and avoiding potential collisions.
2025-05-05 15:56:21 +03:00
8f55bece81 Add slug generation and extend search results handling
Introduced slug creation using `slugify` for improved usability in search results. Extended the search results structure to include a new "posts" category alongside "products", "categories", and "brands". This enhances the flexibility and scope of the search functionality.
2025-04-30 19:24:26 +03:00
b4ef65314d Update query logic to fix invalid method chaining
Removed invalid `select_related` and `prefetch_related` chaining on the product query. This resolves potential errors in fetching related data and ensures proper functionality.
2025-04-30 17:08:43 +03:00
b924797869 Update Product slug field to use simpler populate_from sources
Revised the `populate_from` argument of the Product model's `slug` field to use only `category__name` and `name` for generation. This simplifies the slug creation logic and aligns with the updated migration `0015_alter_product_slug`.
2025-04-30 17:03:53 +03:00
3caab8f523 Add management command to populate Product slugs
Introduce a Django management command to populate the `slug` field for Product instances where it is null. The command processes products in batches, handles errors gracefully, and logs issues for troubleshooting.
2025-04-30 16:58:57 +03:00
e41ac426f4 Alter Product slug field to allow null values
Changed the `slug` field in the `Product` model to allow null values by setting `null=True`. This ensures better flexibility when handling cases where a slug might not be immediately available.
2025-04-30 16:49:54 +03:00
2c8c8ba291 Update Product slug field configuration in migrations
Made the `slug` field nullable in migration 0013 before reverting this change in migration 0014. Additionally, altered the population logic to always include `uuid`.
2025-04-30 16:46:58 +03:00
f2e319f477 Update product slug field to include UUID in generation logic
This change modifies the `slug` field in the `Product` model to also populate from the `UUID` field, ensuring enhanced uniqueness and consistency. The migration file is included to apply this change to the database schema.
2025-04-30 16:42:42 +03:00
d4928db393 Set slug field to allow null values
The slug field in the model now permits null values by adding `null=True`. This change enhances flexibility in scenarios where slugs may not always be mandatory.
2025-04-30 16:39:28 +03:00
a3eb5cf7f2 Simplify product URL structure in sitemap generation.
Removed the UUID component from product URLs in the sitemap to enhance readability and improve user experience. This change ensures cleaner, more user-friendly links without impacting functionality.
2025-04-30 16:33:28 +03:00
3ec0991aa6 Add slug field to Product and update related functionalities
Introduce a unique, auto-generated slug field to the Product model, populated from category, brand, and name. Update core filters, serializers, sitemaps, and GraphQL object types to support the new slug functionality. Also, enforce HTTP-only cookies for session, CSRF, and language for improved security.
2025-04-30 16:31:54 +03:00
68febcdb08 Initial Commit 2025-04-29 22:40:30 +03:00