Advertisement
Guest User

Untitled

a guest
May 16th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement