--- a/mouchak/server.py +++ b/mouchak/server.py @@ -95,14 +95,15 @@ return flask.jsonify(error=res['err'], status='error') -#@app.route('/menu', methods=['POST']) -#def insertMenu(): -# newmenu = flask.request.json -# print newmenu -# res = siteMenu.insert(newmenu) -# print res -# return flask.jsonify(status='success')#, content=getContent()) -# +@app.route('/menu', methods=['POST']) +def insertMenu(): + #newmenu = flask.request.json + #print newmenu + #res = siteMenu.insert(newmenu) + #print res + #return flask.jsonify(status='success')#, content=getContent()) + return '200 OK' + @app.route('/menu/<_id>', methods=['PUT']) def updateMenu(_id): --- a/mouchak/static/js/editor.js +++ b/mouchak/static/js/editor.js @@ -91,7 +91,7 @@ var Pages = Backbone.Collection.extend({ model: M.types.model.Page, - url: M.PageURL() + url: M.PageURL() + '/' }); /* view to manage each page and their properties - change page properties, --- a/mouchak/static/js/models.js +++ b/mouchak/static/js/models.js @@ -117,7 +117,7 @@ customMenu: false }, url: function() { - return M.MenuURL() + this.id; + return M.MenuURL() + '/' + this.id; }, initialize: function() { this.id = this.get('id'); --- a/mouchak/templates/editor.html +++ b/mouchak/templates/editor.html @@ -38,7 +38,7 @@