-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(comments): implement threaded comments
users can comment articles and reply to comments add tests for comment functionality [Delivers #162163270]
- Loading branch information
1 parent
b62bcca
commit ab1e2fe
Showing
16 changed files
with
503 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
""" | ||
Write customized exception classes here | ||
""" | ||
from rest_framework.exceptions import APIException | ||
|
||
class PermisionDenied(APIException): | ||
status_code = 403 | ||
default_detail = 'You dont have permission to perform this action' | ||
|
||
class CommentDoesNotExist(APIException): | ||
status_code = 404 | ||
default_detail = "Failed, comment or article doesnot exist" | ||
|
||
|
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 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.