You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Adjust the Following system for UserProfile.
Add the isPublished field to Articles and adjust logic for that.
Describe the solution you'd like
Adjust the UserProfile class function follow to append to the followings column.
(Hackathon) Add the following columns to the User model in backend/conduit/user/models.py:
occupation: Text
githubLink: String(100)
twitterLink: String(100)
linkedInLink: String(100)
website: Text
The default for all of them should be an empty string
Add bookmarkers field to Articles. This should be a relationship between Articles and UserProfiles
(Hackathon) Modify the update_user route in backend/conduit/user/views.py to take account of the newly added fields.
(Hackathon) Create a route to return the user's followers in backend/conduit/profile/views.py
This should return the user's follows column.
(Hackathon) Create a route to return the user's followings in backend/conduit/profile/views.py
This should return all the users that follow the targeted user but the targeted user does not follow them back
Create a route to add an Article to the bookmarks column for UserProfile
You should create a class function to add the article to the bookmarks column
Add the isPublished column to the Article model in backend/conduit/articles/models.py
Add the published field in the get_articles route in backend/conduit/articles/views.py kwargs.
If the published field is "true", return published articles only, else return unpublished articles. If it is "false" return unpublished articles only. If it is "all", then return all articles from the author.
Adjust the test_get_articles_by_author in backend/tests/test_articles.py to account for the new query changes
Additional context
(Hackathon) If the current user that the person is following allows follows the current user, then append the user to the followers column and remove from the following column. Should adjust the UserProfile follow class function
If the current user unfollows someone, then removed that user from the followers column to the following column. Should adjust the UserProfile unfollow class function.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Adjust the Following system for UserProfile.
Add the isPublished field to Articles and adjust logic for that.
Describe the solution you'd like
backend/conduit/user/models.py
:update_user
route inbackend/conduit/user/views.py
to take account of the newly added fields.backend/conduit/profile/views.py
backend/conduit/profile/views.py
backend/conduit/articles/models.py
get_articles
route inbackend/conduit/articles/views.py
kwargs.test_get_articles_by_author
inbackend/tests/test_articles.py
to account for the new query changesAdditional context
The text was updated successfully, but these errors were encountered: