mv comment -> comments
This commit is contained in:
parent
18d7f37878
commit
1174259b27
@ -64,7 +64,7 @@ from werkzeug.contrib.fixers import ProxyFix
|
|||||||
from isso import db, migrate, views, wsgi
|
from isso import db, migrate, views, wsgi
|
||||||
from isso.core import ThreadedMixin, uWSGIMixin, Config
|
from isso.core import ThreadedMixin, uWSGIMixin, Config
|
||||||
from isso.utils import parse, http, JSONRequest
|
from isso.utils import parse, http, JSONRequest
|
||||||
from isso.views import comment
|
from isso.views import comments
|
||||||
|
|
||||||
logging.getLogger('werkzeug').setLevel(logging.ERROR)
|
logging.getLogger('werkzeug').setLevel(logging.ERROR)
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
@ -78,18 +78,18 @@ class Isso(object):
|
|||||||
|
|
||||||
salt = b"Eech7co8Ohloopo9Ol6baimi"
|
salt = b"Eech7co8Ohloopo9Ol6baimi"
|
||||||
urls = Map([
|
urls = Map([
|
||||||
Rule('/new', methods=['POST'], endpoint=views.comment.new),
|
Rule('/new', methods=['POST'], endpoint=comments.new),
|
||||||
|
|
||||||
Rule('/id/<int:id>', methods=['GET', 'PUT', 'DELETE'], endpoint=views.comment.single),
|
Rule('/id/<int:id>', methods=['GET', 'PUT', 'DELETE'], endpoint=comments.single),
|
||||||
Rule('/id/<int:id>/like', methods=['POST'], endpoint=views.comment.like),
|
Rule('/id/<int:id>/like', methods=['POST'], endpoint=comments.like),
|
||||||
Rule('/id/<int:id>/dislike', methods=['POST'], endpoint=views.comment.dislike),
|
Rule('/id/<int:id>/dislike', methods=['POST'], endpoint=comments.dislike),
|
||||||
|
|
||||||
Rule('/', methods=['GET'], endpoint=views.comment.fetch),
|
Rule('/', methods=['GET'], endpoint=comments.fetch),
|
||||||
Rule('/count', methods=['GET'], endpoint=views.comment.count),
|
Rule('/count', methods=['GET'], endpoint=comments.count),
|
||||||
Rule('/delete/<string:auth>', endpoint=views.comment.delete),
|
Rule('/delete/<string:auth>', endpoint=comments.delete),
|
||||||
Rule('/activate/<string:auth>', endpoint=views.comment.activate),
|
Rule('/activate/<string:auth>', endpoint=comments.activate),
|
||||||
|
|
||||||
Rule('/check-ip', endpoint=views.comment.checkip)
|
Rule('/check-ip', endpoint=comments.checkip)
|
||||||
])
|
])
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -17,6 +17,7 @@ from isso.compat import text_type as str
|
|||||||
|
|
||||||
from isso import utils, notify, db
|
from isso import utils, notify, db
|
||||||
from isso.utils import http, parse
|
from isso.utils import http, parse
|
||||||
|
from isso.views import requires
|
||||||
from isso.crypto import pbkdf2
|
from isso.crypto import pbkdf2
|
||||||
|
|
||||||
logger = logging.getLogger("isso")
|
logger = logging.getLogger("isso")
|
@ -18,7 +18,7 @@ from werkzeug.wrappers import Response
|
|||||||
|
|
||||||
from isso import Isso, notify, views, core
|
from isso import Isso, notify, views, core
|
||||||
from isso.utils import http
|
from isso.utils import http
|
||||||
from isso.views import comment
|
from isso.views import comments
|
||||||
|
|
||||||
class Dummy:
|
class Dummy:
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ class TestComments(unittest.TestCase):
|
|||||||
|
|
||||||
rv = loads(rv.data)
|
rv = loads(rv.data)
|
||||||
|
|
||||||
for key in comment.FIELDS:
|
for key in comments.FIELDS:
|
||||||
rv.pop(key)
|
rv.pop(key)
|
||||||
|
|
||||||
assert not any(rv.keys())
|
assert not any(rv.keys())
|
Loading…
Reference in New Issue
Block a user