Advertisement
Guest User

Untitled

a guest
Dec 26th, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #Get the database name from the config file
  2. app.config['MONGODOCS'] = data.config[0]['MONGODOCS']
  3.  
  4. if __name__ == '__main__':
  5. app.debug = True
  6. app.run(host='0.0.0.0')
  7.  
  8. # This is a webpage response
  9. @app.route('/process/')
  10. def process():
  11. return render_template('process.html')
  12.  
  13. #This is an API response
  14. @app.route('/my_app/api/v1.0/question/<string:q_id>/reject', methods = ['POST'])
  15. def question_reject(q_id):
  16. #do something here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement