Commit graph

90 commits

Author SHA1 Message Date
c0fcde4bb4 Features: 1) Introduced extend_schema for multiple viewsets to improve OpenAPI documentation; 2) Added detailed schema definitions for blog and payments viewsets using drf-spectacular; 3) Transitioned download_digital_asset functionality to class-based DownloadDigitalAssetView for better modularity.
Fixes: 1) Standardized error responses in `DownloadDigitalAssetView`.

Extra: Improved maintainability by refactoring serializers and schema definitions into modular components; updated API URLs to use new class-based view.
2025-10-26 18:44:19 +03:00
bccf67970f Fixes: 1) Remove prefetch_related for "attributes" in queryset to fix redundant data loading;
Extra: None;
2025-10-26 16:38:53 +03:00
e894affad7 Features: 1) Add with_related method to managers for optimized prefetching; 2) Add indexes to models for enhanced query performance; 3) Introduce cached_property for feedback count and product quantity; 4) Implement Exists and OuterRef filters for active stock validation in viewsets.
Fixes: 1) Simplify rating and feedback count logic by removing caching layers; 2) Refactor price and quantity calculations for improved accuracy and simplicity; 3) Optimize total price and quantity aggregations in orders by leveraging Django ORM tools.

Extra: Adjusted import statements, removed redundant cache logic, and cleaned up methods for better readability and maintainability.
2025-10-16 14:04:18 +03:00
00e94a2b29 Features: 1) Add validation to ensure order_product_uuid is required in download_digital_asset_view.
Fixes: 1) Remove unnecessary blank line in `core/viewsets.py`.

Extra: 1) Minor cleanup in `core/views.py` to improve clarity.
2025-10-16 10:01:34 +03:00
0bfc4c2984 Features: 1) Add detailed error responses with exception messages for Order.DoesNotExist and ValueError in order-related actions; 2) Improve create_promocode_on_user_referring with stricter type check for user attributes;
Fixes: 1) Move `get_object()` call into `try` block to prevent unhandled exceptions during order retrieval;

Extra: 1) Minor code reformatting for improved readability.
2025-10-16 09:58:13 +03:00
72a96edda1 Features: 3.1.0 2025-10-14 16:46:09 +03:00
9e40323823 Features: 1) Update all locale translations for token-related messages; 2) Update all locale translations with read-only Transaction ViewSet description; 3) Update all locale translations for reset password and token validations;
Fixes: 1) Correct line references in locale files for consistency;

Extra: Improve formatting and alignment of string segments for clarity and maintainability;
2025-10-06 15:58:30 +03:00
447f70d17a Fixes: 1) Handle generic Exception in current method of viewsets to prevent 500 errors;
Extra: 1) Add fallback error response with status 400 for unexpected exceptions.
2025-10-02 13:19:21 +03:00
4bce9224fc Features: 1) Automatically create a new Order if no pending Order exists for authenticated users;
Fixes: 1) Handle `Order.DoesNotExist` exception in `current` method of viewsets;

Extra: 1) Minor improvement to user experience by ensuring an Order object is always returned.
2025-10-01 18:51:11 +03:00
c6f2029285 Features: 1) Add retrieve method to handle Address retrieval by UUID;
Fixes: None;

Extra: None;
2025-10-01 18:36:00 +03:00
d2cb4c73f0 Features: 1) Allow "retrieve" action in additional permissions for AddressViewSet;
Fixes: none;

Extra: none;
2025-10-01 18:25:31 +03:00
6a42907060 Features: 1) Update rate limit logic to dynamically adjust based on settings.DEBUG instead of hardcoded DEBUG;
Fixes: 1) Remove unused import of `DEBUG` from settings;

Extra: n/a;
2025-10-01 18:19:54 +03:00
b1c022b974 Features: 1) Add promocode_uuid field to BuyAsBusinessOrderSerializer; 2) Enhance error handling in buy_without_registration by wrapping in a try-except block and returning appropriate HTTP 2025-10-01 17:59:06 +03:00
330177f6e4 Features: 1) Add # noinspection PyUnusedLocal annotations to various viewsets, filters, and migrations to suppress unnecessary warnings; 2) Improve post method in BusinessPurchaseView to handle exceptions and inactive orders gracefully; 3) Refactor resolve_transactions and related resolvers in Graphene to include more specific typing hints; 4) Include defensive coding for attributes in several models to ensure type safety.
Fixes: 1) Correct default manager assignment in `Product` model; 2) Address potential division by zero in `AbsoluteFTPStorage`; 3) Ensure proper exception handling for missing `order` attributes in CRM gateway methods; 4) Rectify inaccurate string formatting for `Transaction` `__str__` method.

Extra: Refactor various minor code style issues, including formatting corrections in the README, alignment in the emailing utility, and suppressed pycharm-specific inspections; clean up unused imports across files; enhance error messaging consistency.
2025-10-01 17:26:07 +03:00
3324e5d36b Features: 1) Replace FeedbackDetailSerializer with FeedbackSimpleSerializer in feedback retrieval endpoint;
Fixes: none;

Extra: 1) Update API documentation to reflect serializer change;
2025-09-30 12:12:28 +03:00
e18327b920 Features: 1) Add "feedbacks" action with corresponding serializer in ProductViewSet;
Fixes: 1) Replace `lookup` with `lookup_value` in API parameter definitions;

Extra: 1) Remove unused query parameters for product listing documentation.
2025-09-30 11:54:45 +03:00
d44bbdd920 Features: 1) Add support for filtering objects by SKU in get_object method; 2) Introduce handling for new feedbacks and do_feedback in additional and serializers;
Fixes: 1) Adjust import order in `viewsets.py` to match project convention; 2) Correct schema name from `seo` to `seo_meta` in documentation;

Extra: 1) Refactor SEO schemas import order for better readability; 2) Update `additional` field structure with consistent formatting.
2025-09-30 11:37:58 +03:00
2f4cceaa6a Features: 1) Add hreflang to metadata response across viewsets; 2) Update GraphQL schema to use hreflang as a string instead of a list.
Fixes: 1) Correct `hreflang` field type in serializers and GraphQL object types.

Extra: Refactor redundant `hreflang` handling; ensure uniform `LANGUAGE_CODE` usage throughout.
2025-09-09 15:30:05 +03:00
54d8889ffa Fixes: 1) Corrected products' filtering options on interfaces 2025-08-25 00:41:02 +03:00
9e1430b05c Fixes: 1) Return filtering options to ProductViewSet 2025-08-25 00:38:05 +03:00
fe104c7ff5 Features: 1) Added custom manager for Product model 2025-08-25 00:26:06 +03:00
016b9a575a Features: 1) Update product property to reflect the highest price from stock instead of the lowest; 2) Update filter option to use price_order for consistent sorting;
Fixes: 1) Fix incorrect queryset filtering logic in the `feedbacks` endpoint; 2) Replace redundant product lookup in `feedbacks` with `get_object` for improved clarity and performance;

Extra: 1) Rename annotated field `price` to `price_order` in queryset filters for better semantics; 2) Cleanup and streamline `feedbacks` endpoint logic.
2025-08-20 06:45:46 +03:00
421e4a083f Features: 1) Add lookup_field and lookup_url_kwarg to Category and Brand viewsets;
Fixes:

Extra: 1) No changes to existing logic;
2025-08-18 15:43:30 +03:00
5c18404b53 Features: 1) Introduced get_object method for reusable object retrieval logic in Category and Brand viewsets; 2) Enhanced SEO meta retrieval using the new get_object method.
Fixes: 1) Removed reliance on suppressed exceptions for UUID lookup; 2) Improved handling of invalid or missing objects during lookup.

Extra: 1) Cleaned up unused import `suppress`; 2) Simplified code by replacing redundant lookup logic with a unified method.
2025-08-18 15:34:28 +03:00
ea22ca69a3 Features: 1) Introduce ALLOW validation for generic actions in permissions; 2) Add AllowAny permission class to seo_meta endpoints; 3) Update SEO URL patterns and breadcrumbs with language codes; 4) Improve compatibility of attributes in serializers with ListField and DictField.;
Fixes: 1) Correct dynamic URL generation for images in Open Graph (`og_image` and `logo_url`); 2) Address potential missing or empty `crumbs` handling in breadcrumbs generation;

Extra: 1) Refactor redundant action names (e.g., `seo` to `seo_meta`) for better consistency; 2) Clean up and optimize serializer structures and Graphene object fields; 3) Improve readability and maintainability of action and object implementations.;
2025-08-18 15:20:47 +03:00
d767e17f29 Features: 1) Add "seo" action with "view" permission mapping in EvibesPermission; 2) Extend action serializer classes with additional "seo" allowance in multiple viewsets.
Fixes: 1) None.

Extra: 1) Minor adjustments in viewsets for consistency in handling "seo" action.
2025-08-18 14:57:25 +03:00
ab10a7a0b7 Features: 1) Add SEO meta utilities and builder functions for schemas; 2) Implement SEO-related APIs in viewsets for categories, brands, and products; 3) Add SeoMeta model and serializer to manage SEO metadata.
Fixes: 1) Resolve annotations compatibility with mypy `type: ignore` adjustments; 2) Correct `resolve_price_with_currency` method to ensure proper float returns; 3) Handle scenarios for empty or null queryset in vendor methods.

Extra: 1) Refactor utility functions for better type annotations and robustness; 2) Minor formatting corrections and removal of redundant mypy strict setting; 3) Improve method return types for consistency.
2025-08-18 14:26:09 +03:00
954e02385c Features: 1) Add personal_orders_only field to GraphQL schema for Product; 2) Implement personal_orders_only property in Product model; 3) Include personal_orders_only in simple serializer;
Fixes: None;

Extra: 1) Remove redundant `stocks__isnull=False` filter from views and schema queries; 2) Minor formatting adjustments;
2025-07-26 14:48:21 +03:00
4160e29455 Features: 1) Add management command to delete products by description in batches;
Fixes: 1) Correct indentation in multiple locations across `viewsets.py` for better readability; 2) Resolve inconsistent logging formatting in `signals.py`;

Extra: 1) Minor formatting adjustments in `views.py` and `signals.py`; 2) Clean up trailing blank lines across files.
2025-07-09 03:13:38 +03:00
b6983b63a3 Features: 1) Enhance queryset filtering in get_queryset to include additional active checks for brand, category, stocks, and vendor; 2) Add caching and header variation for sitemap_index and sitemap_detail views; 3) Update sitemap limit settings for Category and Brand sitemaps to adjust capacity;
Fixes: 1) Replace usage of `slugify` with direct access to `obj.slug` in sitemap location methods;

Extra: 1) Remove unused `slugify` import from `core/sitemaps.py`.
2025-07-09 02:30:26 +03:00
89301d6432 Features: 1) Add support for processing chosen_products in order creation and update mutations; 2) Introduce new field chosen_products to serializers and GraphQL inputs; 3) Enhance order model to allow bulk addition of products with quantity updates;
Fixes: 1) Correct avatar resolution in `resolve_avatar` method for cases where `url` or `name` attributes are missing; 2) Refresh user object from the database after avatar update to avoid stale data;

Extra: 1) Rename `BulkActionOrderProductInput` to `BulkProductInput` for consistency; 2) Minor code refactorings and adjustments for clarity.
2025-07-08 21:02:54 +03:00
a4e4e3cd40 Features: 1) Add get_queryset method to BrandViewSet for conditional prefetching of categories.
Fixes: 1) Add missing import for `Prefetch` in `core/viewsets.py`.

Extra: n/a.
2025-07-08 15:11:38 +03:00
af127045ae Features: None;
Fixes: 1) Update logging configuration to align all logger instances to use "django" instead of "evibes"; 2) Remove unused logging configuration for "django.request";

Extra: 1) Add detailed error logging in GraphQL execution to include exception messages.
2025-07-06 17:22:14 +03:00
29005527bb Features: 1) RUFFVCKED 2025-07-03 15:00:18 +03:00
aa8f15d0ee Features: 1) RUFFVCKED 2025-07-03 02:53:01 +03:00
83cad6c1cc Features: 1) Update all logger instances across the codebase to use "evibes" instead of "django";
Fixes: 1) None;

Extra: 1) Enhance consistency in logging configuration and improve alignment with project-specific naming conventions.
2025-06-30 01:44:20 +03:00
856f2ff516 Features: 1) Add app_name attribute in multiple urls.py files across apps to support namespacing;
Fixes: 1) Simplify Prometheus and GraphQL path definitions in `evibes/api_urls.py`;

Extra: 1) Add line breaks across multiple files for improved code readability.
2025-06-29 20:03:33 +03:00
7ff62cea0e Features: 1) Add detailed class-level docstrings for multiple ViewSets and views, improving maintainability and documentation; 2) Introduce namespace for "core_b2b" in URL patterns for better URL resolution.
Fixes: 1) Remove unused "prometheus/" URL pattern for cleanup.

Extra: Update imports and formats for consistency; refine sitemap functions with explicit docstrings.
2025-06-29 19:56:52 +03:00
328ccaa615 Features: 1) 2.8.9 update
Fixes: 1) wtf go read diff;

Extra: ???
2025-06-18 15:05:58 +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
ea552fc3ba Features: 1) Add prefetch for "tags" in CategoryViewSet queryset;
Fixes: 1) Simplify `CaseInsensitiveListFilter` by removing redundant debug logs;

Extra: 1) Remove unused conditional filtering for parent category in `CategoryViewSet`.
2025-06-16 09:33:56 +03:00
fd97d8a072 Fixes: AddressViewSet 2025-06-12 09:18:20 +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
966111f0b7 Fixes: FeedbackViewSet 2025-06-08 21:21:13 +03:00
b413f98d7f Fixes: ProductViewSet 2025-06-08 17:00:05 +03:00
52b9f5fa35 Fixes: ProductViewSet 2025-06-08 16:57:32 +03:00
705bb79903 Fixes: AddressManager 2025-06-08 15:54:44 +03:00
1ab95e9fd3 Fixes: Add a debugging log for address creation 2025-06-08 14:54:35 +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