Advertisement
Guest User

python/flask

a guest
Feb 28th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. from flask import Flask, render_template, request
  2. from BeautifulSoup import BeautifulSoup
  3. import urllib2
  4. import json
  5.  
  6. app = Flask(__name__,
  7. template_folder='views')
  8.  
  9. @app.route('/')
  10. def hello_world():
  11. return 'Hello world'
  12.  
  13.  
  14.  
  15. @app.route('/pastebin',methods = ['GET', 'POST'])
  16. def pastebin():
  17.  
  18.  
  19. #print request.forms['textarea']
  20. if __name__ == '__main__':
  21. app.run(debug=True, host="127.0.0.1", port="1337", use_reloader=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement