-
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
#161967018 Set up the Follower relationships systems #14
Conversation
fae99cb
to
4d75bce
Compare
4d75bce
to
9ad060a
Compare
971894b
to
b2c1927
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 API Spec
specifies that the follow/unfollow
relationship be handled at a single endpoint, that accepts POST
and DELETE
requests to follow\unfollow
respectively.
Please amend your implementation to reflect this.
b2c1927
to
0426eff
Compare
This PR looks Okay |
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.
Awesome work.
0acb0da
to
091941b
Compare
091941b
to
a1a2837
Compare
Looks good to merge. |
f986119
to
e0ca448
Compare
e0ca448
to
331b142
Compare
authors/apps/profiles/serializers.py
Outdated
|
||
class Meta: | ||
model = Profile | ||
exclude = ('username','email',) |
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.
missing whitespace after ','
from rest_framework import serializers | ||
|
||
from authors.apps.authentication.serializers import UserSerializer | ||
from authors.apps.profiles.models import Profile, Following |
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.
redefinition of unused 'Profile' from line 2
@@ -1,8 +1,76 @@ | |||
from rest_framework import serializers | |||
from .models import Profile | |||
import logging | |||
|
|||
from rest_framework import serializers |
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.
redefinition of unused 'serializers' from line 1
authors/apps/profiles/admin.py
Outdated
@@ -4,3 +4,4 @@ | |||
from .models import Profile | |||
|
|||
admin.site.register(Profile) | |||
|
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 at end of file
331b142
to
8de8890
Compare
- Add models for profile and following - Add factory-b0y factories for the models - Move conftest.py to root directory to allow for collection of fixtures before tests run - write unit tests - update backends.py to facilitate JWT authentication - add views for following, unfollowing - add views for viewing folowers and followed - add view for viewing a user profile and the following status - remove unused imports - fix hound styling violations - fix merge conflicts with develop [Finishes #161967018] feat(reset password) Impelements password reset … - send a password reset email - update user password [finishes #161967011] feat(validation-errors): Add descriptive validation errors - write unit tests for the errors - implement the error messages on the register api [Finishes #161967009]
8de8890
to
af47cd6
Compare
What does this PR do?
It implements the follower system
Description of Task to be completed?
Endpoints for following, unfollowing, listing followers and followed users are implemented
POST /api/profile/<str:username>/follow
DELETE /api/profile/<str:username>/follow
GET /api/profile/followers/
GET /api/profile/followed/
How should this be manually tested?
git clone https://github.com/andela/ah-jumanji.git
cd ah-jumanji
git checkout ft-implement-follower-system-161967018
virtual environment
and activate itpip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
pytest -v -k "TestFollowerSystem"
What are the relevant pivotal tracker stories?
#161967018
Screenshots (if appropriate)
Checklist: