daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest May 16th, 2018 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from flask import Flask, render_template
  2.  
  3. app = Flask(__name__)
  4.  
  5. @app.route('/')
  6. def webprint():
  7.     return "<center><font size = '28pt'><h1>Hello world</h1></font></center>"
  8.  
  9.  
  10. @app.route('/profile/<name>')
  11. def profile(name):
  12.     return render_template("profile.html", name=name, count=count)
  13.  
  14.  
  15. def counter(count):
  16.     with open("visitors.txt","r+") as count:
  17.         count = int("count") + 1
  18.     return int("count")
  19.  
  20.  
  21.  
  22.  
  23. if __name__ == '__main__':
  24.     app.run(debug=True)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top