Commit graph

1015 commits

Author SHA1 Message Date
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
4bd037b828 Update middleware to validate hosts and conditionally log errors
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.
2025-05-05 15:49:20 +03:00
04a89be549 Update Celery settings and worker configuration
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.
2025-05-05 15:28:20 +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
bbde0a4654 Update PostType and PostTagType field definitions
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.
2025-04-30 00:37:09 +03:00
68febcdb08 Initial Commit 2025-04-29 22:40:30 +03:00