def show(rabid=None): if rabid is None: raise Exception("No rabid provided") fisFac = FisFaculty.find(rabid=rabid) return jsonify(fisfac) @app.route('/rabdata/api/v0.1/fisfeed/faculty/<rabid>', methods=['PUT']) def update(params): fisFac = FisFaculty.find(rabid=rabid) if fisFac.update(params=params): redirect(url_for(rabid)) else: pass if __name__ == '__main__': app.run(host='0.0.0.0', debug=True)
def update(params): fisFac = FisFaculty.find(rabid=rabid) if fisFac.update(params=params): redirect(url_for(rabid)) else: pass
def create(params): fisFac = FisFaculty.new(params) if fisFac.save(): redirect(url_for('faculty')) else: pass
def index(): allFisFac = FisFaculty.all() return jsonify(allFisFac)