diff --git a/isso/__init__.py b/isso/__init__.py
index 61a65f6..d4f7980 100644
--- a/isso/__init__.py
+++ b/isso/__init__.py
@@ -180,7 +180,9 @@ def make_app(conf=None, threading=True, multiprocessing=False, uwsgi=False):
wrapper.append(partial(SharedDataMiddleware, exports={
'/js': join(dirname(__file__), 'js/'),
- '/css': join(dirname(__file__), 'css/')}))
+ '/css': join(dirname(__file__), 'css/'),
+ '/demo': join(dirname(__file__), 'demo/')
+ }))
wrapper.append(partial(wsgi.CORSMiddleware,
origin=origin(isso.conf.getiter("general", "host")),
diff --git a/isso/demo/index.html b/isso/demo/index.html
new file mode 100644
index 0000000..171aa26
--- /dev/null
+++ b/isso/demo/index.html
@@ -0,0 +1,16 @@
+
+
+ Isso Demo
+
+
+
+
+
+
diff --git a/isso/views/comments.py b/isso/views/comments.py
index d6a2691..eac16ff 100644
--- a/isso/views/comments.py
+++ b/isso/views/comments.py
@@ -12,6 +12,8 @@ from werkzeug.http import dump_cookie
from werkzeug.routing import Rule
from werkzeug.wrappers import Response
from werkzeug.exceptions import BadRequest, Forbidden, NotFound
+from werkzeug.wsgi import get_current_url
+from werkzeug.utils import redirect
from isso.compat import text_type as str
@@ -69,7 +71,8 @@ class API(object):
('moderate',('POST', '/id///')),
('like', ('POST', '/id//like')),
('dislike', ('POST', '/id//dislike')),
- ('checkip', ('GET', '/check-ip'))
+ ('checkip', ('GET', '/check-ip')),
+ ('demo', ('GET', '/demo'))
]
def __init__(self, isso):
@@ -375,3 +378,6 @@ class API(object):
def checkip(self, env, req):
return Response(utils.anonymize(str(req.remote_addr)), 200)
+
+ def demo(self, env, req):
+ return redirect(get_current_url(env) + '/index.html')