mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Remove more mentions of reject_comment.
This commit is contained in:
+3
-10
@@ -228,8 +228,8 @@ pass the `displayed` keyword argument::
|
||||
username=username, proposal=proposal,
|
||||
displayed=False)
|
||||
|
||||
You can then create two new views to handle the moderation of comments. The
|
||||
first will be called when a moderator decides a comment should be accepted and
|
||||
You can then create a new view to handle the moderation of comments. It
|
||||
will be called when a moderator decides a comment should be accepted and
|
||||
displayed::
|
||||
|
||||
@app.route('/docs/accept_comment', methods=['POST'])
|
||||
@@ -239,14 +239,7 @@ displayed::
|
||||
support.accept_comment(comment_id, moderator=moderator)
|
||||
return 'OK'
|
||||
|
||||
The next is very similar, but used when rejecting a comment::
|
||||
|
||||
@app.route('/docs/reject_comment', methods=['POST'])
|
||||
def reject_comment():
|
||||
moderator = g.user.moderator if g.user else False
|
||||
comment_id = request.form.get('id')
|
||||
support.reject_comment(comment_id, moderator=moderator)
|
||||
return 'OK'
|
||||
Rejecting comments happens via comment deletion.
|
||||
|
||||
To perform a custom action (such as emailing a moderator) when a new comment is
|
||||
added but not displayed, you can pass callable to the :class:`~.WebSupport`
|
||||
|
||||
@@ -42,5 +42,3 @@ StorageBackend Methods
|
||||
.. automethod:: StorageBackend.update_username
|
||||
|
||||
.. automethod:: StorageBackend.accept_comment
|
||||
|
||||
.. automethod:: StorageBackend.reject_comment
|
||||
|
||||
@@ -396,7 +396,6 @@ class WebSupport(object):
|
||||
('getCommentsURL', '_get_comments'),
|
||||
('processVoteURL', '_process_vote'),
|
||||
('acceptCommentURL', '_accept_comment'),
|
||||
('rejectCommentURL', '_reject_comment'),
|
||||
('deleteCommentURL', '_delete_comment')
|
||||
]
|
||||
for key, value in comment_urls:
|
||||
|
||||
@@ -113,11 +113,3 @@ class StorageBackend(object):
|
||||
:param comment_id: The id of the comment being accepted.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def reject_comment(self, comment_id):
|
||||
"""Called when a moderator rejects a comment. The comment should
|
||||
then be deleted.
|
||||
|
||||
:param comment_id: The id of the comment being accepted.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
Reference in New Issue
Block a user