Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Get the database name from the config file
- app.config['MONGODOCS'] = data.config[0]['MONGODOCS']
- if __name__ == '__main__':
- app.debug = True
- app.run(host='0.0.0.0')
- # This is a webpage response
- @app.route('/process/')
- def process():
- return render_template('process.html')
- #This is an API response
- @app.route('/my_app/api/v1.0/question/<string:q_id>/reject', methods = ['POST'])
- def question_reject(q_id):
- #do something here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement