Commit graph

111 commits

Author SHA1 Message Date
0a81b12100 Features: 1) Add support for fine-tuned boosts in Elasticsearch scoring for title and related fields; 2) Adjust product, brand, and category scoring multipliers to improve search ranking flexibility.
Fixes: 1) Correct `total_orders` calculation in `Product` model to count only relevant statuses.

Extra: 1) Refactor comments for clarity in Elasticsearch configuration; 2) Minor formatting adjustments.
2025-06-23 16:52:39 +03:00
35ac700a44 Features: 1) Add verbose_name attribute to multiple Slug fields for better clarity;
Fixes: 1) Correct conditional handling of `fieldsets` to avoid duplicate `metadata` fields in admin view;

Extra: n/a;
2025-06-22 17:12:59 +03:00
a91ba0c41a Features: 1) Add priority field to Category model; 2) Update priority field in Brand model to improve consistency.
Fixes: 1) Ensure correct handling of query results in category/brand auto-resolve methods; 2) Fix PO formatting issues across multiple locales.

Extra: 1) Add `priority` field to Django admin for categories; 2) Suppress specific type-checking warnings in settings and utilities.
2025-06-22 00:48:06 +03:00
5d7075ee2e **Features**: 1) Add unicode_slugify_function for advanced slugify handling; 2) Replace default slugify method with unicode_slugify_function in models; 3) Introduce python-slugify as a project dependency for Unicode slugification;
**Fixes**: 1) Remove redundant `slugify` import from `core/models.py`;

**Extra**: 1) Update `poetry.lock` and `pyproject.toml` to lock `python-slugify@8.0.4` and refine dependency definitions; 2) Improve readability of debug logging in `TweakedAutoSlugField`.
2025-06-21 22:49:34 +03:00
9eb4ee72df Features: 1) Add support for custom slugify_function across models; 2) Introduce logging for debug output in get_slug_fields; 3) Enhance help text for key fields to improve clarity;
Fixes: 1) Correct type hints and comments for better accuracy; 2) Address formatting inconsistencies in exception messages and queries;

Extra: Refactor long lines for improved readability and maintainability across functions and methods;
2025-06-21 22:23:54 +03:00
fdd92dbf8b Features: 1) Introduced strict parameter for zip function in widgets.py; 2) Added EXTENSIONS_MAX_UNIQUE_QUERY_ATTEMPTS setting;
Fixes: 1) Resolved redundant lines and formatting inconsistencies across multiple files; 2) Corrected Collection typing imports and Optional replacements with union types (e.g., `str | None`);

Extra: Improved formatting and readability by consolidating single-line code sections and simplifying expressions.
2025-06-21 20:38:37 +03:00
67794a7997 Features: 1) Add overwrite=True and max_length=88 to slugs in Brand, Category, and Product models with enhanced slug generation logic; 2) Extend process_query function to include additional fields rating and brand_priority for product results.
Fixes: 1) Add missing type annotation for the return value of `process_query` in `core/elasticsearch/__init__.py`.

Extra: 1) Update migration file to reflect new slug field changes; 2) Minor refactor to improve clarity in query result construction.
2025-06-21 20:19:08 +03:00
4b367944b9 Features: 1) Update product.slug to use AutoSlugField with adjusted populate_from order in migrations and model;
Fixes: 1) None;

Extra: Refactor `product.slug` field declaration for improved readability in `models.py`.
2025-06-21 19:42:16 +03:00
b6ab56624b Features: 1) Update slug field in Category model to populate from both uuid and name.
Fixes: 1) None.

Extra: 1) Add Django migration to reflect `slug` field changes in the database.
2025-06-21 19:34:16 +03:00
e99ae9e85c Features: 1) Alter category.slug to populate only from name and enable null values in migration.
Fixes: 1) None.

Extra: 1) Removed `parent__slug` from `populate_from` in `category.slug` field in models for consistency.
2025-06-21 19:29:43 +03:00
3ab95e9b56 Features: 1) Added icons, divider titles, priorities, and hide settings to apps; 2) Introduced Daisy settings file for customizable UI configuration; 3) Implemented new CSS styles for paginator component with hover and active states.
Fixes: 1) Updated AutoSlugField to enhance slug generation logic in core models.

Extra: 1) Removed redundant Daisy settings from base configurations; 2) Minor code cleanup and organization.
2025-06-21 18:35:34 +03:00
2840370c3e Features: 1) Add priority field to Brand model to support ranking functionality; 2) Enhance ProductDocument with brand_priority field in Elasticsearch for improved sorting; 3) Integrate function score query with brand_priority in Elasticsearch search logic;
Fixes: None;

Extra: 1) Update migrations for Brand model changes; 2) Refactor Elasticsearch query logic for clarity;
2025-06-20 05:26:03 +03:00
570990fd87 Fixes: 1) Remove unnecessary order__status="FINISHED" filter in total_orders property for accurate counts;
Extra: None;
2025-06-19 15:06:12 +03:00
432e4bf110 Features: 1) Add SearchAsYouTypeField to name field in ProductDocument for improved search capabilities; 2) Introduce product_type and sales_rank fields to ProductDocument with preparation methods; 3) Add total_orders property to model for calculating product order count;
Fixes: 1) Enhance `raw` field in `name` with `lc` normalizer for consistent lowercase processing;

Extra: 1) Define custom `lc` normalizer in Elasticsearch settings; 2) General code formatting and minor cleanup.
2025-06-19 14:27:57 +03:00
b15df3b72a Features: 1) Add is_digital field to ProductAdmin for filtering and display; 2) Extend admin search fields to include slug for products; 3) Introduce slug field in readonly and form layout sections for products.
Fixes: 1) Add `# type: ignore` comments for ForeignKey fields to resolve type-checking warnings in models.

Extra: 1) Refactor admin field formatting for better readability; 2) Add `# noinspection PyProtectedMember` annotation in `rebuild_slugs` management command; 3) Clean up spacing and alignment in various files.
2025-06-18 23:41:28 +03:00
8c906a2880 Features: 1) Add support for auto-generating slugs for Brand, Category, and Product models; 2) Extend Elasticsearch documents with slug indexing and response processing; 3) Introduce image fetching in search results.
Fixes: 1) Update slug population logic in management commands.

Extra: Refactor renderer class formatting, query processing, and formatting for readability across multiple files.
2025-06-18 22:23:14 +03:00
d616d2e18b Features: 1) Improved support for nested multi-line typing hints across numerous functions; 2) Refactored variable assignments for enhanced readability within bulk_add_products and bulk_remove_products; 3) Updated token-related test methods to ensure consistent styling;
Fixes: 1) Removed unused imports including `Order` from `payments/models.py` and `health_check.contrib.redis` from settings; 2) Fixed inconsistent formatting and parameter alignment in method definitions; 3) Corrected type annotations and adjusted verbose text handling;

Extra: Cleaned up formatting in docstrings, comments, and JSON field help text across multiple files for better code style compliance and readability.
2025-06-18 16:55:49 +03:00
8fb4ca3362 Features: 1) Add type annotations for various models and methods; 2) Introduce refined graphene resolvers to enhance permission handling; 3) Include type checking suppression with # type: ignore for unsupported cases.
Fixes: 1) Correct `urlsafe_base64_encode` decoding logic in tests; 2) Fix queryset access issues in resolvers; 3) Address missing or incorrect imports across multiple files.

Extra: Improve code readability with consistent naming and formatting; Add `# noinspection` annotations to suppress IDE warnings; Update `pyproject.toml` to exclude `drf.py` in MyPy checks.
2025-06-18 16:38:07 +03:00
a33be30098 Features: 1) Added vendor, product tag, category tag models and metadata; 2) Introduced proper noinspection comments for Mypy warnings; 3) Extended Markdown linting rules.
Fixes: 1) Corrected `ForeignKey` type assertions across models; 2) Resolved typos and formatting inconsistencies in `.env` and README; 3) Fixed explicit boolean checks in user manager methods.

Extra: Updated type hints in multiple models, serializers, and views.
2025-06-18 15:58:49 +03:00
328ccaa615 Features: 1) 2.8.9 update
Fixes: 1) wtf go read diff;

Extra: ???
2025-06-18 15:05:58 +03:00
0153157653 Features: None;
Fixes: 1) Correct indentation in multiple modules, including mutations, models, and utility methods to maintain consistency; 2) Fix typos in function parameters and update alignment for readability;

Extra: Refactored for improved code readability and adherence to PEP 8 style guidelines.
2025-06-17 11:34:02 +03:00
6ee3870ab0 Features: 1) Add a management command to fix product stock prices; 2) Introduce 'products' field to CategoryType in GraphQL schema to fetch products associated with a category; 3) Enable GraphQL resolvers to utilize type hinting for better clarity.
Fixes: 1) Correct multiple unaligned code blocks in various Python scripts and GraphQL resolvers; 2) Improve condition formatting for readability in mutations and queries; 3) Resolve missing related_name in product model.

Extra: Simplify and refactor Windows scripts removing legacy spinner logic for clarity and better user feedback; adjust spacing, comments, and formatting across various files; update imports for unused QuerySet.
2025-06-17 11:13:11 +03:00
3ce54ef027 Features: 1) Add optional celery-stubs and django-stubs dependencies to pyproject.toml; 2) Update worker extras to include celery-stubs; 3) Improve URL formatting in digital asset logic.
Fixes: 1) Rename `Adress` to `Address` in `core/viewsets.py`; 2) Fix incorrect argument usage in filter methods; 3) Correct file formatting in lockfile.

Extra: Code cleanup for consistent file format in `poetry.lock`, adding comments (`# noqa`) where necessary.
2025-06-16 09:52:35 +03:00
18f3b9d2e8 Features:
1) Userless orders will be merged on user's registration by their phone number and/or email. Added Viewset action "merge_recently_viewed" so recently viewed products may be stored on server's side.
2) Added comprehensive products' filtering by category(support for including subcategories)
Fixes: I18N
2025-06-10 05:40:07 +03:00
e775b8233d Fixes: Add a debugging log for address creation 2025-06-08 14:43:19 +03:00
4148d9e02c Features: Added feedbacks support for OrderProducts 2025-06-08 14:18:26 +03:00
beb1673cbb Fixes: OrderViewSet fixes 2025-06-07 19:08:04 +03:00
affe75c0af Fixes: Order model orderproducts operations 2025-06-07 18:00:39 +03:00
e76d5c1732 Fixes: __str__ for OrderProduct 2025-06-07 17:49:58 +03:00
1f5481d47b Fixes: __str__ for Order 2025-06-07 17:39:35 +03:00
39989aa1d4 Fixes: buy_without_registration for Order 2025-06-07 17:33:26 +03:00
10effefff5 Fixes: add_product for Order 2025-06-07 17:27:30 +03:00
2d96ec9637 Fixes: add_product for Order 2025-06-07 17:27:12 +03:00
44e8ad6307 Fixes: add_product for Order 2025-06-07 17:26:41 +03:00
56e33474dc Fixes: buy_without_registration... 2025-06-07 17:21:15 +03:00
2b181b18cd Fixes: I18N 2025-06-07 17:15:55 +03:00
2022797834 Fixes: buy_unregistered in Order model fix 2025-06-07 16:44:30 +03:00
9e06fa3419 Fixes: save() method for Order model fix 2025-06-07 16:33:55 +03:00
613cbc50e1 Features: Prometheus addons 2025-06-05 16:05:15 +03:00
79c97b7e5a Features: 1) Add address_line field to Address model for enhanced customer address representation; 2) Extend serializers with address_line_1 and address_line_2 fields; 3) Update address parsing logic to include house number in street and support address_line storage;
Fixes: None;

Extra: Refactor address manager to construct `address_line` from parsed data;
2025-05-28 22:07:06 +03:00
4e269dc801 Features: 1) Add BulkOrderAction mutation to handle bulk addition/removal of order products; 2) Introduce bulk_add_order_products and bulk_remove_order_products endpoints in viewset; 3) Add BulkAddOrderProductsSerializer and BulkRemoveOrderProductsSerializer.
Fixes: 1) Update `remove_product` model method to handle zero quantity removal; 2) Correct permission check in order product removal.

Extra: 1) Add `autocomplete_fields` for products in admin; 2) Enhance docs with bulk add/remove schemas; 3) Various code refactorings and minor tweaks for improved maintainability.
2025-05-28 14:48:16 +03:00
d86a6ed3c8 RUFF 2025-05-26 16:12:59 +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
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
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
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
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
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
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
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
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
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
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
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
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