Description:
This pull request addresses issue #46, which involves implementing a notification system.
Changes:
Created a Notification model in marketplace/models.py. This model represents a notification that can be sent to a user, with attributes such as notification_type, recipient, subject, content, is_read, is_sent, and sent_at. It also includes managers for all notifications, emailed notifications, and not emailed notifications.
Created a new file marketplace/notifications.py which includes functions for sending single and mass notifications. These functions utilize the send_single_email_notification and send_mass_email_notification tasks from marketplace/tasks.py.
The functions in notifications.py are designed to send an email to a single recipient and multiple recipients respectively.
Implemented Celery with RabbitMQ for task management and queuing.
This implementation of the notification system allows for efficient sending of single and mass notifications. All new code has been tested manually for edge cases.
Please review the changes and let me know if any modifications are required.
Title: Implement Notification System
Description: This pull request addresses issue #46, which involves implementing a notification system.
Changes:
Notification
model inmarketplace/models.py
. This model represents a notification that can be sent to a user, with attributes such asnotification_type
,recipient
,subject
,content
,is_read
,is_sent
, andsent_at
. It also includes managers for all notifications, emailed notifications, and not emailed notifications.marketplace/notifications.py
which includes functions for sending single and mass notifications. These functions utilize thesend_single_email_notification
andsend_mass_email_notification
tasks frommarketplace/tasks.py
.notifications.py
are designed to send an email to a single recipient and multiple recipients respectively.This implementation of the notification system allows for efficient sending of single and mass notifications. All new code has been tested manually for edge cases.
Please review the changes and let me know if any modifications are required.