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.
Increased `task_soft_time_limit` to 7200 seconds and `task_time_limit` to 10800 seconds in both `celery.py` and `docker-compose.yml`. This change allows longer-running tasks to complete without premature termination.
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.
Updated `task_soft_time_limit` to 3600 seconds and `task_time_limit` to 7200 seconds in both `celery.py` and `docker-compose.yml`. This allows tasks to run longer before being terminated, ensuring support for extended processing requirements.
Added Elasticsearch as a dependency for 'app' and 'database' services to ensure proper startup order. Removed unnecessary Redis dependency from the Flower service to streamline configuration. These changes improve service interactions and startup stability.
Included the core.b2b_urls module in the main B2B URL patterns to organize and modularize URL configurations. This change enhances code maintainability and improves routing logic clarity.
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.
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.
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.
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.
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.
Replaced hardcoded host checks with a dynamic check using `ALLOWED_HOSTS` from environment variables. Adjusted exception logging to include tracebacks only when the `DEBUG` environment variable is enabled.
Refactored Celery configurations to enhance task reliability, including changes to prefetch multiplier and timeout settings. Updated the worker command in `docker-compose.yml` to specify concurrency, memory limits, and task timeouts. Added a memory limit for the worker service to improve resource management.
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.
Removed invalid `select_related` and `prefetch_related` chaining on the product query. This resolves potential errors in fetching related data and ensures proper functionality.
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`.
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.
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.
Made the `slug` field nullable in migration 0013 before reverting this change in migration 0014. Additionally, altered the population logic to always include `uuid`.
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.
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.
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.
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.
Replaced `fields = "__all__"` with specific fields for better control and security. Removed unused `filter_fields` to clean up the code and align with actual requirements. These changes improve maintainability and clarity.