<message>
- Introduced `urls_dovoodi.py` and `urls_imamjavad.py` for handling URL patterns specific to each domain.
- Implemented `SiteMiddleware` to route requests based on the request domain, ensuring clean admin URLs.
- Updated `base.py` settings to include the new middleware for domain-based routing.
- Modified Nginx configurations for both domains to support the new routing logic and SSL settings.
- Enhanced session handling by checking for active sessions before creating a new room in PlugNMeet, reducing unnecessary API calls.
- Implemented logic to reactivate ended sessions and log relevant actions for better traceability.
- Added conditional room creation to avoid duplicate rooms, improving overall efficiency and user experience.
- Updated CourseLiveSessionRoomCreateAPIView to filter out ended sessions by adding `ended_at__isnull=True` in the session creation logic.
- Introduced a new method in CourseLiveSessionTokenAPIView to build centralized metadata for room settings, ensuring client overrides are not permitted and enhancing session configuration consistency.
- Updated CourseLiveSessionRoomCreateAPIView to filter out ended sessions by adding `ended_at__isnull=True` in the session creation logic.
- Introduced a new method in CourseLiveSessionTokenAPIView to build centralized metadata for room settings, ensuring client overrides are not permitted and defining default lock settings and room features.
- Improved room verification logic in CourseLiveSessionTokenAPIView to handle both boolean and string responses for room activity status.
- Added functionality to automatically recreate inactive rooms for professors while denying token issuance for students if the room is inactive.
- Enhanced logging for better traceability of room status and actions taken during token requests.
- Introduced a new method to handle room recreation in PlugNMeet, ensuring sessions can be reactivated when necessary.
- Added TokenAuthentication to allow users to authenticate with a token while still permitting access without authentication.
- Removed redundant debug print statements related to token validation to streamline the code and improve readability.
- Added checks in get_saved_location method to ensure user is authenticated and has location_history attribute before attempting to access it.
- Improved robustness of location retrieval logic to prevent errors for unauthenticated users.
- Updated permission classes to allow any user for GET requests, enhancing accessibility.
- Added detailed logging for both GET and POST requests to track request data and processing steps.
- Improved handling of user authentication status in log messages for better traceability.
- Added detailed logging for GET and POST requests in CourseOnlineClassTokenValidateAPIView to track user actions and course validation.
- Improved logging in OnlineClassTokenManager for token generation, storage, retrieval, and deletion processes, including error handling for Redis interactions.
- Removed commented-out pip commands from entrypoint.sh for clarity.
- Enabled the /agent/ location block in dovodi.conf to properly configure proxy settings for the application.
- Commented out the entire class and method definitions for the PlugNMeetWebhookAPIView to facilitate debugging and future modifications.
- Retained the structure and docstrings for clarity on event handling and signature verification.
- Enhanced debug logging for signature verification to assist in identifying issues during development.
- Updated permission logic for course management.
- Simplified room ID setup and metadata handling.
- Enhanced PlugNMeetClient integration for room creation and token generation.
- Improved error handling and logging for API interactions.
- Adjusted response structure to include the generated access token for frontend use.
- Updated the _verify_webhook_signature method to include detailed debug logging for better traceability of signature verification issues.
- Improved error messages for missing headers and configuration settings.
- Added checks for empty request bodies to assist in identifying middleware issues.
- Adjusted logging to prevent sensitive information exposure while still providing useful debugging information.
- Implemented validation and permission checks for course management.
- Updated room ID generation to comply with NATS rules by prefixing with 'room-'.
- Integrated JWT token generation for user access to live sessions.
- Improved error handling for PlugNMeet API interactions.
- Enhanced response structure to include access token for frontend connectivity.
- Introduced a new command to evenly distribute source types across existing HadisCategory instances.
- Added a command to seed categories and collections in the library, relating existing books to them.
- Enhanced HadisCategory model to allow Unicode in slugs through a migration.
- Updated Nginx configuration to include a new location for proxying requests to a FastAPI agent.
- Added a COLOR_PALETTE dictionary to the HadisStatus model for color management.
- Introduced properties to retrieve main and light color codes based on the selected color.
- Updated HadisStatusSerializer to include read-only fields for main and light color codes.
- Enabled the population of books in the entrypoint script by uncommenting the relevant command.
- Introduced a new geolocation package containing APIs for IP-based geolocation, reverse geocoding, and region information.
- Added URL routes for geolocation endpoints in the account app.
- Implemented models, serializers, and views for handling geolocation data.
- Included GeoLite2 databases for IP to city and country lookups.
- Enhanced location history updates with optimized batch processing for improved performance.
- Updated settings to include the new geolocation package in installed apps.
- Updated the queryset filtering in TransmitterView to correctly filter by reliability slug instead of the reliability field directly.
- This change ensures that the API correctly interprets the status filter provided in the query parameters.
- Implemented HadisCategoryXMindView to retrieve a mind-map JSON structure for specific hadis categories.
- Added Swagger documentation detailing the endpoint's features, usage, and response structure.
- Updated URL routing to include the new endpoint for XMind format retrieval.
- Enhanced the HadisCategoryXMindView to support multi-language content and bookmark status for authenticated users.
- Enhanced the save methods in Hadis, HadisCategory, BookReference, Transmitter, and related models to ensure unique slug generation.
- Implemented robust error handling and fallback mechanisms for slug creation based on title fields, with timestamp-based fallbacks for empty or invalid titles.
- Removed unnecessary thumbnail handling from TransmittersAdmin and simplified the display_header method.
- Improved overall data integrity and consistency in slug management across the application.
- Introduced a new management command to seed OpinionStatus, TransmitterOpinion, and TransmitterOriginalText with multilingual data.
- Implemented logic to create opinion statuses with corresponding colors and titles in English, Farsi, and Russian.
- Added functionality to generate random opinions and original texts for transmitters, ensuring unique titles for each transmitter.
- Enhanced data handling for better integration with existing models and improved seeding process.
- Updated HadisCollectionAdmin and TransmittersAdmin to include a custom display header with thumbnail images.
- Modified list_display to show the new display_header method for better visual representation.
- Added thumbnail field to HadisCollection and Transmitters models, replacing FilerImageField with ImageField for improved image handling.
- Created a migration to alter the thumbnail fields in the database schema.
- Introduced custom forms for Hadis, HadisCollection, HadisTag, HadisStatus, HadisReference, and Transmitters models to utilize JSON editor widgets for better data management.
- Implemented schemas for various JSON fields including titles, descriptions, and addresses to enhance the admin interface.
- Updated list displays in admin classes to show the first text from JSON fields for improved readability.
- Added a management command to seed HadisStatus descriptions with multilingual definitions based on keywords.
- Introduced BookSubjectArea and BookType models with JSONField for titles.
- Added 'description' field to HadisStatus model.
- Updated BookReference model to include ManyToMany relationship with BookSubjectArea and a ForeignKey to BookType.
- Enhanced admin interfaces for HadisStatus, BookReference, and BookAuthor to accommodate new fields and improve usability.
- Introduced a new API endpoint to retrieve narrator layers associated with a specific hadis.
- Enhanced the HadisLayersView to fetch and return unique narrator layers, including their names, slugs, and descriptions.
- Updated serializers to include the slug in the TransmitterShortSerializer and added a new NarratorLayerSerializer for layer details.
- Improved response structure and Swagger documentation for better clarity on usage and expected outputs.
- Implemented inner atomic blocks to ensure that failures during the creation of NarratorLayer, TransmitterReliability, OpinionStatus, Transmitters, and related models do not affect the overall transaction.
- Improved logging to provide warnings for skipped records due to errors, enhancing feedback during the seeding process.
- Streamlined the creation process for authors and books, ensuring that existing records are utilized effectively while maintaining data integrity.