sidebar is now much cleaner than before
make slug and urls logic updated to support the unicode slugs in multilanguage panel
index.html updated to support dashboards
- 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.
- 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.
- 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.
- Moved the `get_admin_namespace` function from `admin_access.py` to a new `config.middleware` module for better organization and reusability.
- Updated `AdminAccessMiddleware` to utilize the centralized `get_admin_namespace` function, enhancing code maintainability.
- Improved documentation for the `get_admin_namespace` function to clarify its usage and purpose.
- Introduced a new function `get_admin_namespace` to determine the appropriate admin namespace based on the request domain (Dovoodi or Imam Javad).
- Updated `AdminAccessMiddleware` and `enhanced_auth_middleware` to utilize the new function for redirecting users to the correct admin login page, enhancing access control based on the domain.
- Improved code readability and maintainability by centralizing the logic for admin namespace resolution.
- Introduced a new URL pattern to redirect "/admin/" to the appropriate language-prefixed admin URL.
- Updated admin links for both Dovoodi and Imam Javad to remove language-specific paths, simplifying access.
- Refactored HomeView to streamline the redirection logic based on the current language.
<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.
- 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.
- 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.
- Introduced SubdomainRoutingMiddleware to handle routing based on subdomains.
- Added URL configuration for the admin subdomain, including Swagger/Redoc support.
- Updated settings to include the new middleware for proper request handling.
- Implemented SubdomainRoutingMiddleware to route requests based on subdomains.
- Created urls_admin.py for handling admin-related URLs and Swagger documentation.
- Updated base settings to include the new middleware for subdomain handling.
- Updated `ArticleCollectionAdminBase` and `PodcastCollectionAdminBase` to include a new `get_display_position` method for better visual distinction between pinned and regular collections.
- Modified verbose names for `PinnedArticleCollection` and `MiddleArticleCollection` to clarify their purpose in the admin interface.
- Added a new README for podcast collections to provide guidance on managing collections and highlight key differences between pinned and regular collections.
- Updated settings to improve sidebar navigation for article and podcast collections, ensuring clear access to both collection types.
- Introduced UploadChatMedia and UploadChatMediaSerializer to handle permanent file uploads to /media/chat/.
- Updated urls.py to include a new endpoint for chat media uploads.
- Enhanced file handling with thumbnail generation for images and videos.
- Adjusted UploadTmpSerializer to maintain existing temporary upload functionality.
- add CourseLiveSession.room_id field with unique index
- introduce LiveSessionRoomCreateSerializer and LiveSessionTokenSerializer
- add URLs for room creation and token:
- <slug>/online/room/create
- online/room/token
- enhance token validation metadata with:
- can_create_live_session, can_join_live_session flags
- live session context (active_room_id, timings, details)
- improve logging and token error handling in validation flow
- add PlugNMeet configuration settings (URL, API key/secret, timeout)
This introduces the endpoints and data structures needed to create and
join live sessions, and surfaces richer metadata for frontend usage. A
database migration is required for the new model field and index.
- create CourseLiveSession, LiveSessionUser, LiveSessionRecording with
indexes and unique constraints
- register new models in admin and add UNFOLD navigation entries
- update token validation to derive is_online and include
livesession_started_at, livesession_ended_at, and can_start_online_class
- extend online class entry flow documentation with new fields
- add migration for new live session tables
- Created a new markdown file for the online class entry flow, detailing the process for obtaining and validating tokens for online classes.
- Added a new HTML file for the prayer times calculation guide, including detailed explanations, code examples, and styling.
- Updated the multilang JSON widget HTML and Python files to include additional spacing for readability.
- Implemented a new `OnlineClassTokenManager` class in the Redis utility module to handle the generation, storage, retrieval, and deletion of temporary tokens for online classes, including methods for building entry URLs.
- Removed the API documentation README file as it is no longer needed.
- Added a new script to optimize Hadis transmitter chains, ensuring a maximum of 5 transmitters and exactly one gap.
- Enhanced the Hadis data seeding script for better performance with batch operations and duplicate checks.
- Updated utility functions to streamline thumbnail generation and improve code readability.
- Created a new HTML template for API documentation with a responsive design and interactive elements.
- Added an authentication page for Swagger UI, allowing users to enter their API token.
- Implemented a custom Swagger UI template with a fixed authentication banner and user information display.
- Introduced a pagination utility class to return all items without pagination, enhancing data retrieval flexibility.
- Added seed images and test files for future development and testing purposes.