Skip to content

Commit

Permalink
remove SSL and trailing whitespace
Browse files Browse the repository at this point in the history
(SSL should be handled by nginx or another webserver.)

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jan 3, 2015
1 parent 8f84c69 commit 1a27872
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
18 changes: 9 additions & 9 deletions plugins/webapp/webapp.py
Expand Up @@ -34,7 +34,7 @@
import sys

from nikola.plugin_categories import Command
from bottle import Bottle, run, request, server_names, ServerAdapter
from bottle import Bottle, run, request
_site = None

def check(user, passwd):
Expand Down Expand Up @@ -78,7 +78,7 @@ def _execute(self, options, args):
b.run(host='localhost', port=port)
@staticmethod
@b.route('/')
@b.auth_basic(check)
@b.auth_basic(check)
def index():
context = {}
context['site'] = _site
Expand All @@ -87,7 +87,7 @@ def index():
@staticmethod
@b.route('/edit/<path:path>', method='POST')
@b.route('/edit/<path:path>', method='GET')
@b.auth_basic(check)
@b.auth_basic(check)
def edit(path):
context = {'path': path}
context['site'] = _site
Expand All @@ -104,7 +104,7 @@ def edit(path):

@staticmethod
@b.route('/save/<path:path>', method='POST')
@b.auth_basic(check)
@b.auth_basic(check)
def save(path):
# FIXME insecure pending defnull/bottle#411
context = {'path': path}
Expand All @@ -123,7 +123,7 @@ def save(path):

@staticmethod
@b.route('/delete/<path:path>')
@b.auth_basic(check)
@b.auth_basic(check)
def delete(path):
context = {'path': path}
context['site'] = _site
Expand All @@ -139,7 +139,7 @@ def delete(path):

@staticmethod
@b.route('/really_delete/<path:path>')
@b.auth_basic(check)
@b.auth_basic(check)
def really_delete(path):
# FIXME insecure pending defnull/bottle#411
os.unlink(path)
Expand All @@ -148,13 +148,13 @@ def really_delete(path):

@staticmethod
@b.route('/static/<path:path>')
@b.auth_basic(check)
@b.auth_basic(check)
def server_static(path):
return b.static_file(path, root=os.path.join(os.path.dirname(__file__), 'static'))

@staticmethod
@b.route('/new/post', method='POST')
@b.auth_basic(check)
@b.auth_basic(check)
def new_post():
title = b.request.forms['title']
# So, let's create a post with that title, lumberjack style
Expand All @@ -166,7 +166,7 @@ def new_post():

@staticmethod
@b.route('/new/page', method='POST')
@b.auth_basic(check)
@b.auth_basic(check)
def new_page():
title = b.request.forms['title']
# So, let's create a page with that title, lumberjack style
Expand Down
13 changes: 13 additions & 0 deletions posts/aeloz-zcsn.html
@@ -0,0 +1,13 @@
<!--
.. title: ąęłóż źćśń
.. slug: aeloz-zcsn
.. date: 2015-01-03 10:12:39 UTC
.. tags: ą,ę
.. category: πółśĸ→ę ĸ¶żąćżĸ→
.. link:
.. description:
.. type: text
-->

Write your post here.
<br><br><b>hello</b><br><br>ąęłóżźćśń

0 comments on commit 1a27872

Please sign in to comment.