replace float-based defaults with `Decimal` in Coalesce and set `DecimalField` as the output type to improve precision when aggregating monetary values.
replace `extra_urls` with `get_urls` in `SchonAdminSite` for improved URL handling and compatibility with super-class methods. Simplify `apps.py` to set `SchonAdminSite` directly as the class of `admin.site`.
- Refactored monetary fields across models to use `DecimalField` for improved precision.
- Implemented two-factor authentication (2FA) for admin logins with OTP codes.
- Added ability to generate admin OTP via management commands.
- Updated Docker Compose override for dev-specific port bindings.
- Included template for 2FA OTP verification to enhance security.
Additional changes:
- Upgraded and downgraded various dependencies (e.g., django-celery-beat and yarl).
- Replaced float-based calculations with decimal for consistent rounding behavior.
- Improved admin user management commands for activation and OTP generation.
Made `wishlist_uuid` a required argument to avoid processing without a valid identifier. Prevents potential errors caused by missing wishlist references.
This commit introduces support for uploading optional video files to products and image files to blog posts. Enhanced admin interfaces were added to preview these files directly. Also includes adjustments to GraphQL types and serializers to expose the new fields.
replace the custom Graphene mutation `RetrieveExactProducts` with a unified DRF implementation using `inline_serializer`. Updated GraphQL schema to resolve `retrieve_exact_products` query using a standardized approach.
This change improves consistency across DRF and GraphQL APIs, reduces duplicate logic, and centralizes request validations.
Added the `RetrieveExactProducts` query to the schema to enable fetching specific product details. This addition enhances the granularity of product data retrieval in the GraphQL API.
Refactored `get_or_create` calls in `demo_data.py` to use the `defaults` parameter for cleaner code and consistency. Added type annotations for `get_min_price` and `get_max_price` in serializers for improved type safety.
Add encryption for user PII fields (phone number, name, attributes) and address fields to enhance data security. Introduced timestamped activation tokens for improved validation. Included migrations to encrypt existing plaintext data.
Refactored GraphQL settings to limit query depth and optionally disable introspection for enhanced API defense. Implemented throttling to safeguard API rates.
Improved Dockerfiles for better user management and restored media migration tools for smooth instance upgrades.
introduce `exact_list` action in `viewsets.py` to retrieve products by `uuid`, `slug`, or `sku` identifiers. Includes input validation and ratelimiting. Adds corresponding schema documentation and a GraphQL mutation for similar functionality.
Replace WYSIWYG editor with Markdown editor across all relevant models and admin fields. Add utilities for rendering and stripping markdown. Adjust serializers, views, and templates to support markdown content. Introduce `PastedImage` model and upload endpoint for handling inline image uploads in markdown.
This change simplifies content formatting while enhancing flexibility with markdown support.
- Replaced `create` operations with `get_or_create` to ensure idempotency during data generation.
- Avoided redundant user, product image, and post creation when duplicates exist.
- Updated user and stock handling to leverage defaults for improved clarity.
- Prevented overwriting existing blog post and product image content.
Adjust override to use "en-gb" for consistency with regional settings. Improve fallback behavior by assigning default value to `value_ru_ru` when `value_ru` is missing, ensuring data integrity during demo data loading.
Improves code readability by restructuring the `min_price` and `max_price` methods into a more concise and consistent format. No functional changes introduced.
update `min_price` and `max_price` methods to consider only active stocks in price aggregation. This ensures more accurate price calculations by filtering out inactive stock entries.
wraps actions in a `with override("en")` block to enforce the use of the English locale during execution. This ensures consistent behavior and message formatting regardless of the server's default language settings.
update `slug` field for `Post` model using `TweakedAutoSlugField` to improve auto-slug behavior with Unicode and additional options. Add detailed `attribute_values` to demo products for enriched metadata. Update dependencies for stability and features.
remove redundant cache lookups for `min_price` and `max_price` in the category model by leveraging cached properties. minimizes complexity and improves maintainability while ensuring consistent behavior.
Replaced `django-prometheus` with the default Django components, including model mixins, database backends, and cache configuration. This change simplifies monitoring setup by removing unnecessary dependencies, reducing overhead, and improving compatibility.
**Details:**
- Removed Prometheus metrics endpoints and middleware.
- Updated database, cache, and model configurations to remove `django-prometheus`.
- Adjusted WSGI settings to integrate OpenTelemetry instrumentation instead of Prometheus.
- Updated dependency files and migration schemas accordingly.
Updated `product.slug` to use `TweakedAutoSlugField` for improved functionality, allowing unicode, overwrite capabilities, and enhanced population logic. Adjusted the corresponding migration script to ensure seamless database schema updates.
Also marked `brand.categories` as deprecated.
- Downgrade `ty` dependency from 0.0.18 to 0.0.16 in `pyproject.toml` and related files to address compatibility issues.
- Refactor `filters.py` to use safer attribute handling for field errors.
- Remove unused `TestModelDocument` and `TestModel` references from `documents.py`, reducing unnecessary overhead.
- Minor cleanup in `serializers.py` for improved readability.
Introduce templates for admin documentation, including model details, views, template tags, filters, and bookmarklets. This enhances the admin interface by providing detailed documentation directly within the application.
enable brands association with categories and allow querying of active brands within a category. Updated GraphQL schema, models, and serializers to include this relationship while deprecating redundant category-to-brand ManyToManyField.
Expanded demo content with additional images for products and blog posts, improving user experience. Added new categories such as "Jewelry" and "Services," along with their subcategories. Supported richer multilingual descriptions and included new brands, ensuring broader and detailed offerings.
ensure only active records are considered in `models.py` and `viewsets.py` by adding `is_active=True` filters. improves data integrity and prevents processing inactive entities.
Includes English and Russian versions for key topics such as platform overview, bilingual experience, gemstone certification guide, holiday gift guide, and spring 2026 collection. These posts demonstrate Schon's multilingual support and flexibility in presenting rich content.
Replaced `pyright:ignore` with `ty:ignore` for better compatibility and accuracy in type annotations. Removed inline passwords during user creation and updated logic to securely set and save passwords afterward.
Update all configurations, fixtures, scripts, and documentation to replace occurrences of `schon.fureunoir.com` with the new `schon.wiseless.xyz` domain.
This ensures consistency across the project and reflects the updated domain structure.
Includes detailed OpenAPI schemas for unsubscribe (GET and POST) and tracking pixel (GET) endpoints, supporting email compatibility and event tracking. Added support for RFC 8058-compliant one-click unsubscribe functionality and transparent image-based email tracking.
Introduce `demo_data` management command for populating or removing demo fixtures in the system, facilitating testing and demonstration. Enhancements include low stock product list UI with product images and integration of value formatting for financial KPIs.
- update `prettify_xml` to strip XML declaration for more flexibility
- prepend XML declaration explicitly in Google Merchant feed generation
- adjust pagination `page_size` max limit to 128 for stricter validation
Removed the unused `fix_prices` management command to clean up legacy code. Updated `.gitignore` to include vendor documentation files, ensuring the directory is consistent in version control.
- Prefixed internal helper methods with "_" to comply with naming conventions.
- Enhanced docstrings for improved readability and developer guidance.
- Organized the `AbstractVendor` class API into distinct categories (abstract, public, and protected methods).
This refactor improves maintainability and code clarity while preserving functionality.
Add tailored querysets and managers for `Product`, `Stock`, and `AttributeValue` models to simplify vendor-specific operations. Abstract methods were added to `AbstractVendor` for handling essential vendor processes, ensuring clear API expectations.
This change standardizes vendor-related queries, improves clarity, and ensures efficient bulk operations.
Upgrade `multidict` package version to 6.7.1 for compatibility and resolve potential dependency issues. Removed `celery-prometheus-exporter` as it is no longer required.
add feed generators for Google Merchant, Amazon Seller, Yandex Market, and Yandex Products. Includes a shared base class (`BaseFeedGenerator`) for common functionality, such as product retrieval and validation. Each generator supports format-specific output and handles platform-specific requirements.
This change simplifies the creation of product feeds for multiple marketplaces.
Introduce `EmailImage`, `EmailTemplate`, and `EmailCampaign` models for enhanced email management, including campaign tracking and one-click unsubscribe tokens. Added multilingual fields for email templates and improved accessibility with image alt text. Also adapted `Post` content fields to support translations.
ensure discount_price reflects the actual discount by using the product's price. Also, suppress type-related issues in admin action descriptions for improved linting compatibility.