- Removed `light_color_code` from the Hadis and Transmitter serializers to streamline the API response.
- Updated the `ColorPaletteMixin` to simplify color management by eliminating the light color property, focusing on the main color code.
- Adjusted the serializers to reflect these changes, enhancing clarity and reducing redundancy in color representation.
- Introduced `SimilarArticleSerializer` to provide a structured representation of similar articles, including categories and thumbnail.
- Updated `ArticleDetailSerializer` to include a new `similar_articles` field, which fetches articles from the same categories, excluding the current article.
- Implemented a method to retrieve similar articles, improving the article detail view with relevant content suggestions.
- Introduced `ColorPaletteMixin` to centralize color choice fields and hex code properties across `HadisStatus`, `TransmitterReliability`, and `OpinionStatus` models.
- Updated the `color` field in these models to use the mixin, enhancing code reusability and maintainability.
- Modified serializers to include `main_color_code` and `light_color_code` properties for better color representation in API responses.
- Added a new migration to adjust the database schema for the updated models.
- Introduced the `EmbeddingSession` model to track the status and progress of embedding tasks, including fields for status, progress, processed items, and error messages.
- Created `EmbeddingSessionAdmin` to manage embedding sessions in the admin interface, featuring custom display methods for status badges and progress bars.
- Implemented background processing to trigger a FastAPI agent upon creating a new embedding session, enhancing the system's responsiveness and user experience.
- Added migrations to establish the new model in the database.
- Introduced a `share_link` property in the `Article`, `Hadis`, `Book`, `Podcast`, `Video`, and `Transmitter` models to generate shareable links based on their slugs.
- Updated corresponding serializers to include the `share_link` field as read-only.
- Added a management command to refresh share links for existing Hadis models, ensuring all instances have updated slugs and share links.
- Adjusted the `settings` to define `DOVODI_DOMAIN` for consistent link generation across models.
- Changed `TabularInline` to `StackedInline` for better layout of `AgentPrompt` entries.
- Adjusted the `AdminTextareaWidget` to enhance user experience with improved styling and sizing.
- Ensured the inline management of prompts remains user-friendly and visually appealing in the admin interface.
- Updated `AgentSettings` model to serve as a singleton container, removing unnecessary fields and adding an `updated_at` timestamp.
- Introduced `AgentPrompt` model to manage instruction prompts associated with agent settings.
- Enhanced `AgentSettingsAdmin` to include inline management of prompts, improving the admin interface for better usability.
- Created migrations to reflect the updated model structure and ensure database integrity.
- Introduced `seed_occasions.py` management command to populate the database with a comprehensive list of Persian, International, and Religious calendar occasions.
- Created `__init__.py` files in the management and commands directories to ensure proper package structure.
- Enhanced the seeding process with transaction management for data integrity during the creation of occasions.
- Introduced `OccasionsList` view to retrieve calendar occasions with filtering options for month and last updated timestamp.
- Updated URL patterns to include a new endpoint for syncing occasions and modified the existing occasions endpoint.
- Enhanced the `get_queryset` method to support filtering by month and last updated date, improving data retrieval flexibility.
- Created `Agent` app including models, admin configuration, and migrations for managing agent settings.
- Introduced `AgentSettings` model to store configuration parameters such as system prompt and model settings.
- Implemented `AgentSettingsAdmin` to provide a singleton admin interface for managing agent configurations.
- Registered the app in the project settings for integration.
- Updated `get_children_count` method to calculate the total number of Hadiths in a category and its descendants instead of counting active children categories.
- Enhanced code clarity by removing commented-out code and providing detailed docstrings for the new logic.
- Introduced `add_english_context_category.py` to populate missing English titles and descriptions for HadisCategory.
- Added `english_context.py` to fill in missing English context for Hadith fields including title, narrator, translation, and description.
- Created `arabic_text.py` to replace Hadith text with authentic Arabic texts.
- Updated `CategorySerializer` to calculate the total number of Hadiths in a category and its descendants.
- Removed dependency on `get_admin_namespace` and replaced it with direct language-based URL redirection for admin login in both `AdminAccessMiddleware` and `enhanced_auth_middleware`.
- Improved code clarity by utilizing Django's `get_language` to dynamically construct the redirect URL based on the user's language preference.
- Enhanced user experience by ensuring consistent access to the admin login page across different languages.
- Eliminated the inline `get_admin_namespace` function to streamline the code and improve readability.
- The function is now imported from the centralized `config.middleware` module, enhancing code organization and reusability.