Commits

Anonymous committed fa03bd8

use empty title (page path) as the start page, so that all path to the page
are consistent.

Comments (0)

Files changed (1)

 
 @app.route('/')
 def index():
-    return redirect(url_for("page", title='StartPage'))
+    return redirect(url_for("page", title=''))
 
 
+@app.route('/save/', defaults={'title': ''}, methods=['POST'])
 @app.route('/save/<path:title>/', methods=['POST'])
 def save(title):
     print request.method, request.args
     return redirect(url_for("page", title=title))
 
 
+@app.route('/edit/', defaults={'title': ''})
 @app.route('/edit/<path:title>/', methods=['GET', 'POST'])
 def edit(title):
     body = g.db.execute('select body from pages where title = ?',
                            title=title,
                            text=body[0] if body else '')
 
+@app.route('/page/', defaults={'title': ''})
 @app.route('/page/<path:title>/')
 def page(title):
     body = g.db.execute('select body from pages where title = ?',