-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#161967021 Implement the notification system #34
Conversation
authors/apps/profiles/models.py
Outdated
|
||
message = """ | ||
You have a new follower @%s . | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
authors/apps/notifier/views.py
Outdated
# Create your views here. | ||
import logging | ||
|
||
from django.contrib.auth import get_user_model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'django.contrib.auth.get_user_model' imported but unused
# create an article for user2 | ||
ArticlesFactory(author=user2) | ||
|
||
notification = Notification.objects.all()[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local variable 'notification' is assigned to but never used
authors/apps/notifier/urls.py
Outdated
@@ -0,0 +1,20 @@ | |||
from django.urls import path | |||
|
|||
from authors.apps.notifier.views import GetMailingList, ViewUpdateMailingList, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
authors/apps/notifier/admin.py
Outdated
@@ -0,0 +1,3 @@ | |||
from django.contrib import admin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'django.contrib.admin' imported but unused
authors/apps/favourite/tests.py
Outdated
@@ -0,0 +1,3 @@ | |||
from django.test import TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'django.test.TestCase' imported but unused
authors/apps/favourite/models.py
Outdated
subject = "New Article favourite Notification" | ||
Message = """ | ||
Your article %s has been favourited by %s. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
authors/apps/favourite/admin.py
Outdated
@@ -0,0 +1,3 @@ | |||
from django.contrib import admin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'django.contrib.admin' imported but unused
authors/apps/articles/models.py
Outdated
You are seeing this email because you are subscribed to /n | ||
receive email notifications.To unsubscribe from this emails | ||
login and unsubscribe by following %s | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
authors/apps/articles/models.py
Outdated
subject = "New Publication Notification" | ||
message = """ | ||
%s published a new article.Check it out at %s . | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
f7b88dc
to
a3b8e3e
Compare
a3b8e3e
to
7eabb8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functionality works in an epic way. Good work!
I have tested the functionality and is good with me.
Nice work! |
7eabb8e
to
5d402c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pr works fine. This can be merged.
b5c8ef7
to
dbfc617
Compare
- add unit tests - implement notifications system - set up an asyncronuos task queing system - update the Read.me - Update requirements.txt - Update the .procfile for monitoring of the asyncronous tasks
dbfc617
to
4fea9ce
Compare
What does this PR do?
It implements the notifications endpoint and email notifications
The notifications generated are for:
Description of Task to be completed?
USers are able to ::
check or update their mailing status
GET /api/mailing_status/
PUT /api/mailing_status/
View the Mailing List
GET /api/mailing_List/
check read and unread notifications
GET /api/notifications/unread
GET /api/notifications/read
read and unmark a specific notification as read
GET /api/notifications/<int:id>
GET /api/notifications/unmark/<int:id>
Mark all notifications as read
GET /api/notifications/mark_read
How should this be manually tested?
Any background context you want to provide?
The project employs django-q as an asyscronous task backend and DjangoORM/Postgres as the broker. This reliance on third party packages is to make sure emails can be sent asyncronously without halting server requests execution.
Notification responses contain ;
They can be decoded as shown in the following example:
justquick (actor) closed (verb) issue 2 (action_object) on activity-stream (target) 12 hours ago
What are the relevant pivotal tracker stories?
#161967021
Screenshots (if appropriate)
Django Cluster service
![image](https://user-images.githubusercontent.com/20369585/50282702-b3b90a80-0464-11e9-9520-89a565b37ac5.png)
![image](https://user-images.githubusercontent.com/20369585/50282801-fe3a8700-0464-11e9-9fa4-92a8d1a60195.png)
Django cluster monitoring service
Mailing List
![image](https://user-images.githubusercontent.com/20369585/50296199-00174100-048b-11e9-9278-a59c50b9a4cd.png)
Mailing List status
![image](https://user-images.githubusercontent.com/20369585/50283051-cbdd5980-0465-11e9-85c6-cd53e28e8ebf.png)
notifications
![image](https://user-images.githubusercontent.com/20369585/50283170-21196b00-0466-11e9-908b-7000696ce581.png)
Checklist: