-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(like-dislike): Like and Dislike Articles.
- Allow a user to like and unlike an article. - Allow a user to dislike and un-dislike an article. - Allow user to turn like to dislike and reverse. [starts #162949220]
- Loading branch information
1 parent
853efb5
commit f190d87
Showing
21 changed files
with
218 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
authors/apps/articles/migrations/0002_auto_20190122_0552.py
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
authors/apps/articles/migrations/0003_auto_20190122_0621.py
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
authors/apps/articles/migrations/0004_auto_20190122_0825.py
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
authors/apps/articles/migrations/0005_auto_20190122_0943.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
|
||
from django.urls import path | ||
|
||
from authors.apps.articles.views.articles import (GetUpdateDeleteArticle, | ||
CreateArticleView) | ||
CreateArticleView, | ||
LikeDislikeArticleView) | ||
from authors.apps.articles.models import Article, LikeDislike | ||
""" | ||
Django 2.0 requires the app_name variable set when using include namespace | ||
""" | ||
|
||
app_name = 'articles' | ||
urlpatterns = [ | ||
|
||
path('', CreateArticleView.as_view(), | ||
name='article_create'), | ||
path('/<slug:slug>', GetUpdateDeleteArticle.as_view(), | ||
name='detail_article'), | ||
path('', CreateArticleView.as_view(), name='article-create'), | ||
path('/<slug>/like', | ||
LikeDislikeArticleView.as_view(vote_type=LikeDislike.LIKE), | ||
name='article-like-like'), | ||
path('/<slug>/dislike', | ||
LikeDislikeArticleView.as_view(vote_type=LikeDislike.DISLIKE), | ||
name='article-like-dislike'), | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.