diff --git a/isso/__init__.py b/isso/__init__.py index 83b6a35..e6bf450 100644 --- a/isso/__init__.py +++ b/isso/__init__.py @@ -59,7 +59,7 @@ from jinja2 import Environment, FileSystemLoader from isso import db, migrate, views, wsgi from isso.core import ThreadedMixin, uWSGIMixin, Config from isso.utils import parse, http -from isso.views import comment, admin +from isso.views import comment logging.getLogger('werkzeug').setLevel(logging.ERROR) logging.basicConfig( @@ -80,7 +80,6 @@ rules = Map([ Rule('/count', methods=['GET'], endpoint=views.comment.count), Rule('/delete/', endpoint=views.comment.delete), Rule('/activate/', endpoint=views.comment.activate), - Rule('/admin/', endpoint=views.admin.index), Rule('/check-ip', endpoint=views.comment.checkip) ]) @@ -173,7 +172,6 @@ def make_app(conf=None): logger.warn("unable to connect to HTTP server") app = ProxyFix(wsgi.SubURI(SharedDataMiddleware(isso.wsgi_app, { - '/static': join(dirname(__file__), 'static/'), '/js': join(dirname(__file__), 'js/'), '/css': join(dirname(__file__), 'css/') }))) diff --git a/isso/static/post.html b/isso/static/post.html deleted file mode 100644 index 10e0b95..0000000 --- a/isso/static/post.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - Hello World - - - - - - - - -
- -
-

Hello World. Finally!

-
- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse - cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non - proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse - cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non - proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

- -
-
-
- -
- -
- - diff --git a/isso/templates/admin.j2 b/isso/templates/admin.j2 deleted file mode 100644 index a7eb72d..0000000 --- a/isso/templates/admin.j2 +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "base.j2" %} - -{% block body %} - -
-
- -

Overview

- -
    -
  • N approved
  • -
  • N pending
  • -
- -
    -
  • N Threads
  • -
- - -
-
- -

Recent Comments

- -
-
- -{% endblock %} diff --git a/isso/templates/base.j2 b/isso/templates/base.j2 deleted file mode 100644 index 42f5082..0000000 --- a/isso/templates/base.j2 +++ /dev/null @@ -1,82 +0,0 @@ - - - - - Isso: Admin Console - - - - - - - - - - - - - - - - -
- - {% block body %} - - {% endblock %} - - -
- -
-
-

Isso – Ich schrei sonst!

-
-
- -
- -
- - - - - - - diff --git a/isso/templates/login.j2 b/isso/templates/login.j2 deleted file mode 100644 index 61d248c..0000000 --- a/isso/templates/login.j2 +++ /dev/null @@ -1,69 +0,0 @@ - - - - - Sign in · Isso - - - - - - - - - - - - - - - -
- - - -
- - - diff --git a/isso/views/admin.py b/isso/views/admin.py deleted file mode 100644 index 348b60a..0000000 --- a/isso/views/admin.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- encoding: utf-8 -*- - -from os.path import join, dirname - -from werkzeug.wrappers import Response -from werkzeug.exceptions import abort -from werkzeug.utils import redirect - -from itsdangerous import SignatureExpired, BadSignature - - -def index(app, environ, request): - - if request.method == 'POST': - if request.form.get('password') == app.PASSPHRASE: - resp = redirect('/admin/', 301) - resp.set_cookie('admin', app.signer.dumps('*'), max_age=app.MAX_AGE) - return resp - else: - return abort(403) - else: - try: - app.unsign(request.cookies.get('admin', '')) - except (SignatureExpired, BadSignature): - return Response(app.render('login.j2'), content_type='text/html') - - ctx = {'app': app, 'request': request} - return Response(app.render('admin.j2', app=app, request=request), content_type='text/html')